OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // Indicate that code has changed. | 133 // Indicate that code has changed. |
134 CPU::FlushICache(pc_, instruction_count); | 134 CPU::FlushICache(pc_, instruction_count); |
135 } | 135 } |
136 | 136 |
137 | 137 |
138 // ----------------------------------------------------------------------------- | 138 // ----------------------------------------------------------------------------- |
139 // Register constants. | 139 // Register constants. |
140 | 140 |
141 const int | 141 const int |
142 Register::kRegisterCodeByAllocationIndex[kMaxNumAllocatableRegisters] = { | 142 Register::kRegisterCodeByAllocationIndex[kMaxNumAllocatableRegisters] = { |
143 // rax, rbx, rdx, rcx, rdi, r8, r9, r11, r14, r15 | 143 // rax, rbx, rdx, rcx, rsi, rdi, r8, r9, r11, r14, r15 |
144 0, 3, 2, 1, 7, 8, 9, 11, 14, 15 | 144 0, 3, 2, 1, 6, 7, 8, 9, 11, 14, 15 |
145 }; | 145 }; |
146 | 146 |
147 const int Register::kAllocationIndexByRegisterCode[kNumRegisters] = { | 147 const int Register::kAllocationIndexByRegisterCode[kNumRegisters] = { |
148 0, 3, 2, 1, -1, -1, -1, 4, 5, 6, -1, 7, -1, -1, 8, 9 | 148 0, 3, 2, 1, -1, -1, 4, 5, 6, 7, -1, 8, -1, -1, 9, 10 |
149 }; | 149 }; |
150 | 150 |
151 | 151 |
152 // ----------------------------------------------------------------------------- | 152 // ----------------------------------------------------------------------------- |
153 // Implementation of Operand | 153 // Implementation of Operand |
154 | 154 |
155 Operand::Operand(Register base, int32_t disp) : rex_(0) { | 155 Operand::Operand(Register base, int32_t disp) : rex_(0) { |
156 len_ = 1; | 156 len_ = 1; |
157 if (base.is(rsp) || base.is(r12)) { | 157 if (base.is(rsp) || base.is(r12)) { |
158 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). | 158 // SIB byte is needed to encode (rsp + offset) or (r12 + offset). |
(...skipping 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3089 bool RelocInfo::IsCodedSpecially() { | 3089 bool RelocInfo::IsCodedSpecially() { |
3090 // The deserializer needs to know whether a pointer is specially coded. Being | 3090 // The deserializer needs to know whether a pointer is specially coded. Being |
3091 // specially coded on x64 means that it is a relative 32 bit address, as used | 3091 // specially coded on x64 means that it is a relative 32 bit address, as used |
3092 // by branch instructions. | 3092 // by branch instructions. |
3093 return (1 << rmode_) & kApplyMask; | 3093 return (1 << rmode_) & kApplyMask; |
3094 } | 3094 } |
3095 | 3095 |
3096 } } // namespace v8::internal | 3096 } } // namespace v8::internal |
3097 | 3097 |
3098 #endif // V8_TARGET_ARCH_X64 | 3098 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |