| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Modified by the Subzero authors. | 5 // Modified by the Subzero authors. |
| 6 // | 6 // |
| 7 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ----------------===// | 7 //===- subzero/src/assembler_ia32.h - Assembler for x86-32 ----------------===// |
| 8 // | 8 // |
| 9 // The Subzero Code Generator | 9 // The Subzero Code Generator |
| 10 // | 10 // |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 void cmpl(GPRRegister reg, const Immediate &imm); | 564 void cmpl(GPRRegister reg, const Immediate &imm); |
| 565 void cmpl(GPRRegister reg0, GPRRegister reg1); | 565 void cmpl(GPRRegister reg0, GPRRegister reg1); |
| 566 void cmpl(GPRRegister reg, const Address &address); | 566 void cmpl(GPRRegister reg, const Address &address); |
| 567 void cmpl(const Address &address, GPRRegister reg); | 567 void cmpl(const Address &address, GPRRegister reg); |
| 568 void cmpl(const Address &address, const Immediate &imm); | 568 void cmpl(const Address &address, const Immediate &imm); |
| 569 void cmpb(const Address &address, const Immediate &imm); | 569 void cmpb(const Address &address, const Immediate &imm); |
| 570 | 570 |
| 571 void testl(GPRRegister reg1, GPRRegister reg2); | 571 void testl(GPRRegister reg1, GPRRegister reg2); |
| 572 void testl(GPRRegister reg, const Immediate &imm); | 572 void testl(GPRRegister reg, const Immediate &imm); |
| 573 | 573 |
| 574 void andl(GPRRegister dst, const Immediate &imm); | 574 void And(Type Ty, GPRRegister dst, GPRRegister src); |
| 575 void andl(GPRRegister dst, GPRRegister src); | 575 void And(Type Ty, GPRRegister dst, const Address &address); |
| 576 void andl(GPRRegister dst, const Address &address); | 576 void And(Type Ty, GPRRegister dst, const Immediate &imm); |
| 577 | 577 |
| 578 void orl(GPRRegister dst, const Immediate &imm); | 578 void Or(Type Ty, GPRRegister dst, GPRRegister src); |
| 579 void orl(GPRRegister dst, GPRRegister src); | 579 void Or(Type Ty, GPRRegister dst, const Address &address); |
| 580 void orl(GPRRegister dst, const Address &address); | 580 void Or(Type Ty, GPRRegister dst, const Immediate &imm); |
| 581 | 581 |
| 582 void xorl(GPRRegister dst, const Immediate &imm); | 582 void Xor(Type Ty, GPRRegister dst, GPRRegister src); |
| 583 void xorl(GPRRegister dst, GPRRegister src); | 583 void Xor(Type Ty, GPRRegister dst, const Address &address); |
| 584 void xorl(GPRRegister dst, const Address &address); | 584 void Xor(Type Ty, GPRRegister dst, const Immediate &imm); |
| 585 | 585 |
| 586 void addl(GPRRegister dst, GPRRegister src); | 586 void add(Type Ty, GPRRegister dst, GPRRegister src); |
| 587 void addl(GPRRegister reg, const Immediate &imm); | 587 void add(Type Ty, GPRRegister reg, const Address &address); |
| 588 void addl(GPRRegister reg, const Address &address); | 588 void add(Type Ty, GPRRegister reg, const Immediate &imm); |
| 589 | 589 |
| 590 void addl(const Address &address, GPRRegister reg); | 590 void adc(Type Ty, GPRRegister dst, GPRRegister src); |
| 591 void addl(const Address &address, const Immediate &imm); | 591 void adc(Type Ty, GPRRegister dst, const Address &address); |
| 592 void adc(Type Ty, GPRRegister reg, const Immediate &imm); |
| 592 | 593 |
| 593 void adcl(GPRRegister dst, GPRRegister src); | 594 void sub(Type Ty, GPRRegister dst, GPRRegister src); |
| 594 void adcl(GPRRegister reg, const Immediate &imm); | 595 void sub(Type Ty, GPRRegister reg, const Address &address); |
| 595 void adcl(GPRRegister dst, const Address &address); | 596 void sub(Type Ty, GPRRegister reg, const Immediate &imm); |
| 596 void adcl(const Address &dst, GPRRegister src); | |
| 597 | 597 |
| 598 void subl(GPRRegister dst, GPRRegister src); | 598 void sbb(Type Ty, GPRRegister dst, GPRRegister src); |
| 599 void subl(GPRRegister reg, const Immediate &imm); | 599 void sbb(Type Ty, GPRRegister reg, const Address &address); |
| 600 void subl(GPRRegister reg, const Address &address); | 600 void sbb(Type Ty, GPRRegister reg, const Immediate &imm); |
| 601 void subl(const Address &address, GPRRegister reg); | |
| 602 | 601 |
| 603 void cbw(); | 602 void cbw(); |
| 604 void cwd(); | 603 void cwd(); |
| 605 void cdq(); | 604 void cdq(); |
| 606 | 605 |
| 607 void idivl(GPRRegister reg); | 606 void div(Type Ty, GPRRegister reg); |
| 607 void div(Type Ty, const Address &address); |
| 608 |
| 609 void idiv(Type Ty, GPRRegister reg); |
| 610 void idiv(Type Ty, const Address &address); |
| 608 | 611 |
| 609 void imull(GPRRegister dst, GPRRegister src); | 612 void imull(GPRRegister dst, GPRRegister src); |
| 610 void imull(GPRRegister reg, const Immediate &imm); | 613 void imull(GPRRegister reg, const Immediate &imm); |
| 611 void imull(GPRRegister reg, const Address &address); | 614 void imull(GPRRegister reg, const Address &address); |
| 612 | 615 |
| 613 void imull(GPRRegister reg); | 616 void imull(GPRRegister reg); |
| 614 void imull(const Address &address); | 617 void imull(const Address &address); |
| 615 | 618 |
| 616 void mull(GPRRegister reg); | 619 void mul(Type Ty, GPRRegister reg); |
| 617 void mull(const Address &address); | 620 void mul(Type Ty, const Address &address); |
| 618 | |
| 619 void sbbl(GPRRegister dst, GPRRegister src); | |
| 620 void sbbl(GPRRegister reg, const Immediate &imm); | |
| 621 void sbbl(GPRRegister reg, const Address &address); | |
| 622 void sbbl(const Address &address, GPRRegister reg); | |
| 623 | 621 |
| 624 void incl(GPRRegister reg); | 622 void incl(GPRRegister reg); |
| 625 void incl(const Address &address); | 623 void incl(const Address &address); |
| 626 | 624 |
| 627 void decl(GPRRegister reg); | 625 void decl(GPRRegister reg); |
| 628 void decl(const Address &address); | 626 void decl(const Address &address); |
| 629 | 627 |
| 630 void shll(GPRRegister reg, const Immediate &imm); | 628 void shll(GPRRegister reg, const Immediate &imm); |
| 631 void shll(GPRRegister operand, GPRRegister shifter); | 629 void shll(GPRRegister operand, GPRRegister shifter); |
| 632 void shll(const Address &operand, GPRRegister shifter); | 630 void shll(const Address &operand, GPRRegister shifter); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 663 void int3(); | 661 void int3(); |
| 664 void hlt(); | 662 void hlt(); |
| 665 | 663 |
| 666 void j(CondX86::BrCond condition, Label *label, bool near = kFarJump); | 664 void j(CondX86::BrCond condition, Label *label, bool near = kFarJump); |
| 667 void j(CondX86::BrCond condition, const ConstantRelocatable *label); | 665 void j(CondX86::BrCond condition, const ConstantRelocatable *label); |
| 668 | 666 |
| 669 void jmp(GPRRegister reg); | 667 void jmp(GPRRegister reg); |
| 670 void jmp(Label *label, bool near = kFarJump); | 668 void jmp(Label *label, bool near = kFarJump); |
| 671 void jmp(const ConstantRelocatable *label); | 669 void jmp(const ConstantRelocatable *label); |
| 672 | 670 |
| 671 void mfence(); |
| 672 |
| 673 void lock(); | 673 void lock(); |
| 674 void cmpxchg(Type Ty, const Address &address, GPRRegister reg); | 674 void cmpxchg(Type Ty, const Address &address, GPRRegister reg); |
| 675 void cmpxchg8b(const Address &address); | 675 void cmpxchg8b(const Address &address); |
| 676 void xadd(Type Ty, const Address &address, GPRRegister reg); | 676 void xadd(Type Ty, const Address &address, GPRRegister reg); |
| 677 void xchg(Type Ty, const Address &address, GPRRegister reg); | 677 void xchg(Type Ty, const Address &address, GPRRegister reg); |
| 678 | 678 |
| 679 void LockCmpxchg(Type Ty, const Address &address, GPRRegister reg) { | 679 void LockCmpxchg(Type Ty, const Address &address, GPRRegister reg) { |
| 680 lock(); | 680 lock(); |
| 681 cmpxchg(Ty, address, reg); | 681 cmpxchg(Ty, address, reg); |
| 682 } | 682 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 inline void AssemblerX86::EmitFixup(AssemblerFixup *fixup) { | 744 inline void AssemblerX86::EmitFixup(AssemblerFixup *fixup) { |
| 745 buffer_.EmitFixup(fixup); | 745 buffer_.EmitFixup(fixup); |
| 746 } | 746 } |
| 747 | 747 |
| 748 inline void AssemblerX86::EmitOperandSizeOverride() { EmitUint8(0x66); } | 748 inline void AssemblerX86::EmitOperandSizeOverride() { EmitUint8(0x66); } |
| 749 | 749 |
| 750 } // end of namespace x86 | 750 } // end of namespace x86 |
| 751 } // end of namespace Ice | 751 } // end of namespace Ice |
| 752 | 752 |
| 753 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H_ | 753 #endif // SUBZERO_SRC_ASSEMBLER_IA32_H_ |
| OLD | NEW |