| OLD | NEW |
| 1 //===- subzero/unittest/unittest/AssemblerX8632/TestUtil.h ------*- C++ -*-===// | 1 //===- subzero/unittest/unittest/AssemblerX8632/TestUtil.h ------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // Utility classes for testing the X8632 Assembler. | 10 // Utility classes for testing the X8632 Assembler. |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 } | 744 } |
| 745 | 745 |
| 746 // Allocates a new dqword slot in the test's scratchpad area. | 746 // Allocates a new dqword slot in the test's scratchpad area. |
| 747 uint32_t allocateDqword() { | 747 uint32_t allocateDqword() { |
| 748 uint32_t InitialDword = allocateQword(); | 748 uint32_t InitialDword = allocateQword(); |
| 749 allocateQword(); | 749 allocateQword(); |
| 750 return InitialDword; | 750 return InitialDword; |
| 751 } | 751 } |
| 752 | 752 |
| 753 Address dwordAddress(uint32_t Dword) { | 753 Address dwordAddress(uint32_t Dword) { |
| 754 return Address(GPRRegister::Encoded_Reg_ebp, dwordDisp(Dword)); | 754 return Address(GPRRegister::Encoded_Reg_ebp, dwordDisp(Dword), nullptr); |
| 755 } | 755 } |
| 756 | 756 |
| 757 private: | 757 private: |
| 758 // e??SlotAddress returns an AssemblerX8632::Traits::Address that can be used | 758 // e??SlotAddress returns an AssemblerX8632::Traits::Address that can be used |
| 759 // by the test cases to encode an address operand for accessing the slot for | 759 // by the test cases to encode an address operand for accessing the slot for |
| 760 // the specified register. These are all private for, when jitting the test | 760 // the specified register. These are all private for, when jitting the test |
| 761 // code, tests should not tamper with these values. Besides, during the test | 761 // code, tests should not tamper with these values. Besides, during the test |
| 762 // execution these slots' contents are undefined and should not be accessed. | 762 // execution these slots' contents are undefined and should not be accessed. |
| 763 Address eaxSlotAddress() { return dwordAddress(AssembledTest::EaxSlot); } | 763 Address eaxSlotAddress() { return dwordAddress(AssembledTest::EaxSlot); } |
| 764 Address ebxSlotAddress() { return dwordAddress(AssembledTest::EbxSlot); } | 764 Address ebxSlotAddress() { return dwordAddress(AssembledTest::EbxSlot); } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 | 840 |
| 841 bool NeedsEpilogue; | 841 bool NeedsEpilogue; |
| 842 uint32_t NumAllocatedDwords; | 842 uint32_t NumAllocatedDwords; |
| 843 }; | 843 }; |
| 844 | 844 |
| 845 } // end of namespace Test | 845 } // end of namespace Test |
| 846 } // end of namespace X8632 | 846 } // end of namespace X8632 |
| 847 } // end of namespace Ice | 847 } // end of namespace Ice |
| 848 | 848 |
| 849 #endif // ASSEMBLERX8632_TESTUTIL_H_ | 849 #endif // ASSEMBLERX8632_TESTUTIL_H_ |
| OLD | NEW |