| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 } | 183 } |
| 184 | 184 |
| 185 // Indicate that code has changed. | 185 // Indicate that code has changed. |
| 186 CPU::FlushICache(pc_, instruction_count); | 186 CPU::FlushICache(pc_, instruction_count); |
| 187 } | 187 } |
| 188 | 188 |
| 189 | 189 |
| 190 // ----------------------------------------------------------------------------- | 190 // ----------------------------------------------------------------------------- |
| 191 // Register constants. | 191 // Register constants. |
| 192 | 192 |
| 193 const int Register::registerCodeByAllocationIndex[kNumAllocatableRegisters] = { | 193 const int Register::kRegisterCodeByAllocationIndex[kNumAllocatableRegisters] = { |
| 194 // rax, rbx, rdx, rcx, rdi, r8, r9, r11, r14, r12 | 194 // rax, rbx, rdx, rcx, rdi, r8, r9, r11, r14, r12 |
| 195 0, 3, 2, 1, 7, 8, 9, 11, 14, 12 | 195 0, 3, 2, 1, 7, 8, 9, 11, 14, 12 |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 const int Register::allocationIndexByRegisterCode[kNumRegisters] = { | 198 const int Register::kAllocationIndexByRegisterCode[kNumRegisters] = { |
| 199 0, 3, 2, 1, -1, -1, -1, 4, 5, 6, -1, 7, 9, -1, 8, -1 | 199 0, 3, 2, 1, -1, -1, -1, 4, 5, 6, -1, 7, 9, -1, 8, -1 |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 | 202 |
| 203 const int Register::kRspIndexForPushAllByRegisterCode[kNumRegisters] = { |
| 204 10, 9, 8, 7, -1, -1, 6, 5, 4, 3, -1, 2, 1, -1, 0, -1 |
| 205 }; |
| 206 |
| 207 |
| 203 // ----------------------------------------------------------------------------- | 208 // ----------------------------------------------------------------------------- |
| 204 // Implementation of Operand | 209 // Implementation of Operand |
| 205 | 210 |
| 206 Operand::Operand(Register base, int32_t disp) : rex_(0) { | 211 Operand::Operand(Register base, int32_t disp) : rex_(0) { |
| 207 len_ = 1; | 212 len_ = 1; |
| 208 if (base.is(rsp) || base.is(r12)) { | 213 if (base.is(rsp) || base.is(r12)) { |
| 209 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). | 214 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). |
| 210 set_sib(times_1, rsp, base); | 215 set_sib(times_1, rsp, base); |
| 211 } | 216 } |
| 212 | 217 |
| (...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3131 // specially coded on x64 means that it is a relative 32 bit address, as used | 3136 // specially coded on x64 means that it is a relative 32 bit address, as used |
| 3132 // by branch instructions. | 3137 // by branch instructions. |
| 3133 return (1 << rmode_) & kApplyMask; | 3138 return (1 << rmode_) & kApplyMask; |
| 3134 } | 3139 } |
| 3135 | 3140 |
| 3136 | 3141 |
| 3137 | 3142 |
| 3138 } } // namespace v8::internal | 3143 } } // namespace v8::internal |
| 3139 | 3144 |
| 3140 #endif // V8_TARGET_ARCH_X64 | 3145 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |