| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 } | 1093 } |
| 1094 LoadSmiConstant(kScratchRegister, source); | 1094 LoadSmiConstant(kScratchRegister, source); |
| 1095 return kScratchRegister; | 1095 return kScratchRegister; |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 | 1098 |
| 1099 void MacroAssembler::LoadSmiConstant(Register dst, Smi* source) { | 1099 void MacroAssembler::LoadSmiConstant(Register dst, Smi* source) { |
| 1100 if (emit_debug_code()) { | 1100 if (emit_debug_code()) { |
| 1101 Move(dst, Smi::FromInt(kSmiConstantRegisterValue), | 1101 Move(dst, Smi::FromInt(kSmiConstantRegisterValue), |
| 1102 Assembler::RelocInfoNone()); | 1102 Assembler::RelocInfoNone()); |
| 1103 cmpq(dst, kSmiConstantRegister); | 1103 cmpp(dst, kSmiConstantRegister); |
| 1104 Assert(equal, kUninitializedKSmiConstantRegister); | 1104 Assert(equal, kUninitializedKSmiConstantRegister); |
| 1105 } | 1105 } |
| 1106 int value = source->value(); | 1106 int value = source->value(); |
| 1107 if (value == 0) { | 1107 if (value == 0) { |
| 1108 xorl(dst, dst); | 1108 xorl(dst, dst); |
| 1109 return; | 1109 return; |
| 1110 } | 1110 } |
| 1111 bool negative = value < 0; | 1111 bool negative = value < 0; |
| 1112 unsigned int uvalue = negative ? -value : value; | 1112 unsigned int uvalue = negative ? -value : value; |
| 1113 | 1113 |
| (...skipping 4236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5350 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); | 5350 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); |
| 5351 movl(rax, dividend); | 5351 movl(rax, dividend); |
| 5352 shrl(rax, Immediate(31)); | 5352 shrl(rax, Immediate(31)); |
| 5353 addl(rdx, rax); | 5353 addl(rdx, rax); |
| 5354 } | 5354 } |
| 5355 | 5355 |
| 5356 | 5356 |
| 5357 } } // namespace v8::internal | 5357 } } // namespace v8::internal |
| 5358 | 5358 |
| 5359 #endif // V8_TARGET_ARCH_X64 | 5359 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |