| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
| 4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
| 5 // met: | 5 // met: |
| 6 // | 6 // |
| 7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
| 8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
| 9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
| 10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 173 } |
| 174 | 174 |
| 175 | 175 |
| 176 // Patch the code at the current PC with a call to the target address. | 176 // Patch the code at the current PC with a call to the target address. |
| 177 // Additional guard instructions can be added if required. | 177 // Additional guard instructions can be added if required. |
| 178 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) { | 178 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) { |
| 179 UNIMPLEMENTED(); | 179 UNIMPLEMENTED(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 | 182 |
| 183 Register GetAllocatableRegisterThatIsNotOneOf(Register reg1, Register reg2, |
| 184 Register reg3, Register reg4) { |
| 185 CPURegList regs(reg1, reg2, reg3, reg4); |
| 186 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) { |
| 187 Register candidate = Register::FromAllocationIndex(i); |
| 188 if (regs.IncludesAliasOf(candidate)) continue; |
| 189 return candidate; |
| 190 } |
| 191 UNREACHABLE(); |
| 192 return NoReg; |
| 193 } |
| 194 |
| 195 |
| 183 bool AreAliased(const CPURegister& reg1, const CPURegister& reg2, | 196 bool AreAliased(const CPURegister& reg1, const CPURegister& reg2, |
| 184 const CPURegister& reg3, const CPURegister& reg4, | 197 const CPURegister& reg3, const CPURegister& reg4, |
| 185 const CPURegister& reg5, const CPURegister& reg6, | 198 const CPURegister& reg5, const CPURegister& reg6, |
| 186 const CPURegister& reg7, const CPURegister& reg8) { | 199 const CPURegister& reg7, const CPURegister& reg8) { |
| 187 int number_of_valid_regs = 0; | 200 int number_of_valid_regs = 0; |
| 188 int number_of_valid_fpregs = 0; | 201 int number_of_valid_fpregs = 0; |
| 189 | 202 |
| 190 RegList unique_regs = 0; | 203 RegList unique_regs = 0; |
| 191 RegList unique_fpregs = 0; | 204 RegList unique_fpregs = 0; |
| 192 | 205 |
| (...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2486 // code. | 2499 // code. |
| 2487 #ifdef ENABLE_DEBUGGER_SUPPORT | 2500 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 2488 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); | 2501 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); |
| 2489 #endif | 2502 #endif |
| 2490 } | 2503 } |
| 2491 | 2504 |
| 2492 | 2505 |
| 2493 } } // namespace v8::internal | 2506 } } // namespace v8::internal |
| 2494 | 2507 |
| 2495 #endif // V8_TARGET_ARCH_A64 | 2508 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |