 Chromium Code Reviews
 Chromium Code Reviews Issue 1669443002:
  Subzero. Uses fixups to calculate addend to relocations.  (Closed) 
  Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
    
  
    Issue 1669443002:
  Subzero. Uses fixups to calculate addend to relocations.  (Closed) 
  Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master| OLD | NEW | 
|---|---|
| 1 | 1 | 
| 2 //===- subzero/unittest/unittest/AssemblerX8664/TestUtil.h ------*- C++ -*-===// | 2 //===- subzero/unittest/unittest/AssemblerX8664/TestUtil.h ------*- C++ -*-===// | 
| 3 // | 3 // | 
| 4 // The Subzero Code Generator | 4 // The Subzero Code Generator | 
| 5 // | 5 // | 
| 6 // This file is distributed under the University of Illinois Open Source | 6 // This file is distributed under the University of Illinois Open Source | 
| 7 // License. See LICENSE.TXT for details. | 7 // License. See LICENSE.TXT for details. | 
| 8 // | 8 // | 
| 9 //===----------------------------------------------------------------------===// | 9 //===----------------------------------------------------------------------===// | 
| 10 // | 10 // | 
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 906 size_t Size; | 906 size_t Size; | 
| 907 }; | 907 }; | 
| 908 | 908 | 
| 909 // assemble created an AssembledTest with the jitted code. The first time | 909 // assemble created an AssembledTest with the jitted code. The first time | 
| 910 // assemble is executed it will add the epilogue to the jitted code (which is | 910 // assemble is executed it will add the epilogue to the jitted code (which is | 
| 911 // the reason why this method is not const qualified. | 911 // the reason why this method is not const qualified. | 
| 912 AssembledTest assemble() { | 912 AssembledTest assemble() { | 
| 913 if (NeedsEpilogue) { | 913 if (NeedsEpilogue) { | 
| 914 addEpilogue(); | 914 addEpilogue(); | 
| 915 } | 915 } | 
| 916 NeedsEpilogue = false; | |
| 916 | 917 | 
| 917 NeedsEpilogue = false; | 918 for (auto *Fixup : assembler()->fixups()) { | 
| 
Jim Stichnoth
2016/02/03 23:18:27
const auto * ?
 
John
2016/02/04 18:28:50
Done.
 | |
| 919 Fixup->emitOffset(assembler()); | |
| 920 } | |
| 921 | |
| 918 return AssembledTest(codeBytes(), codeBytesSize(), NumAllocatedDwords); | 922 return AssembledTest(codeBytes(), codeBytesSize(), NumAllocatedDwords); | 
| 919 } | 923 } | 
| 920 | 924 | 
| 921 // Allocates a new dword slot in the test's scratchpad area. | 925 // Allocates a new dword slot in the test's scratchpad area. | 
| 922 uint32_t allocateDword() { return NumAllocatedDwords++; } | 926 uint32_t allocateDword() { return NumAllocatedDwords++; } | 
| 923 | 927 | 
| 924 // Allocates a new qword slot in the test's scratchpad area. | 928 // Allocates a new qword slot in the test's scratchpad area. | 
| 925 uint32_t allocateQword() { | 929 uint32_t allocateQword() { | 
| 926 uint32_t InitialDword = allocateDword(); | 930 uint32_t InitialDword = allocateDword(); | 
| 927 allocateDword(); | 931 allocateDword(); | 
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1094 | 1098 | 
| 1095 bool NeedsEpilogue; | 1099 bool NeedsEpilogue; | 
| 1096 uint32_t NumAllocatedDwords; | 1100 uint32_t NumAllocatedDwords; | 
| 1097 }; | 1101 }; | 
| 1098 | 1102 | 
| 1099 } // end of namespace Test | 1103 } // end of namespace Test | 
| 1100 } // end of namespace X8664 | 1104 } // end of namespace X8664 | 
| 1101 } // end of namespace Ice | 1105 } // end of namespace Ice | 
| 1102 | 1106 | 
| 1103 #endif // ASSEMBLERX8664_TESTUTIL_H_ | 1107 #endif // ASSEMBLERX8664_TESTUTIL_H_ | 
| OLD | NEW |