Chromium Code Reviews| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 size += 3; // Need full four-byte displacement in lea. | 143 size += 3; // Need full four-byte displacement in lea. |
| 144 } | 144 } |
| 145 return size; | 145 return size; |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 // Size of movq(destination, src); | 148 // Size of movq(destination, src); |
| 149 return 10; | 149 return 10; |
| 150 } | 150 } |
| 151 | 151 |
| 152 | 152 |
| 153 void MacroAssembler::PushAddress(ExternalReference source) { | |
| 154 int64_t address = reinterpret_cast<int64_t>(source.address()); | |
| 155 if (is_int32(address) && !Serializer::enabled()) { | |
| 156 push(Immediate(static_cast<int32_t>(address))); | |
| 157 return; | |
| 158 } | |
| 159 LoadAddress(kScratchRegister, source); | |
| 160 push(kScratchRegister); | |
|
Erik Corry
2012/04/14 08:37:04
If we are emitting debug code we should zap the sc
Michael Starzinger
2012/04/16 10:53:55
Done.
| |
| 161 } | |
| 162 | |
| 163 | |
| 153 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { | 164 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { |
| 154 ASSERT(root_array_available_); | 165 ASSERT(root_array_available_); |
| 155 movq(destination, Operand(kRootRegister, | 166 movq(destination, Operand(kRootRegister, |
| 156 (index << kPointerSizeLog2) - kRootRegisterBias)); | 167 (index << kPointerSizeLog2) - kRootRegisterBias)); |
| 157 } | 168 } |
| 158 | 169 |
| 159 | 170 |
| 160 void MacroAssembler::LoadRootIndexed(Register destination, | 171 void MacroAssembler::LoadRootIndexed(Register destination, |
| 161 Register variable_offset, | 172 Register variable_offset, |
| 162 int fixed_offset) { | 173 int fixed_offset) { |
| (...skipping 4259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4422 bind(&check_prototype); | 4433 bind(&check_prototype); |
| 4423 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); | 4434 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); |
| 4424 cmpq(rcx, null_value); | 4435 cmpq(rcx, null_value); |
| 4425 j(not_equal, &next); | 4436 j(not_equal, &next); |
| 4426 } | 4437 } |
| 4427 | 4438 |
| 4428 | 4439 |
| 4429 } } // namespace v8::internal | 4440 } } // namespace v8::internal |
| 4430 | 4441 |
| 4431 #endif // V8_TARGET_ARCH_X64 | 4442 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |