OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 3399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3410 // Slow case: Call the runtime system to do the number allocation. | 3410 // Slow case: Call the runtime system to do the number allocation. |
3411 __ bind(&slow); | 3411 __ bind(&slow); |
3412 CallRuntimeFromDeferred( | 3412 CallRuntimeFromDeferred( |
3413 Runtime::kAllocateHeapNumber, 0, instr, instr->context()); | 3413 Runtime::kAllocateHeapNumber, 0, instr, instr->context()); |
3414 // Set the pointer to the new heap number in tmp. | 3414 // Set the pointer to the new heap number in tmp. |
3415 if (!tmp.is(rax)) __ movp(tmp, rax); | 3415 if (!tmp.is(rax)) __ movp(tmp, rax); |
3416 // Restore input_reg after call to runtime. | 3416 // Restore input_reg after call to runtime. |
3417 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); | 3417 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); |
3418 | 3418 |
3419 __ bind(&allocated); | 3419 __ bind(&allocated); |
3420 __ MoveDouble(tmp2, FieldOperand(input_reg, HeapNumber::kValueOffset)); | 3420 __ movq(tmp2, FieldOperand(input_reg, HeapNumber::kValueOffset)); |
3421 __ shl(tmp2, Immediate(1)); | 3421 __ shl(tmp2, Immediate(1)); |
3422 __ shr(tmp2, Immediate(1)); | 3422 __ shr(tmp2, Immediate(1)); |
3423 __ MoveDouble(FieldOperand(tmp, HeapNumber::kValueOffset), tmp2); | 3423 __ movq(FieldOperand(tmp, HeapNumber::kValueOffset), tmp2); |
3424 __ StoreToSafepointRegisterSlot(input_reg, tmp); | 3424 __ StoreToSafepointRegisterSlot(input_reg, tmp); |
3425 | 3425 |
3426 __ bind(&done); | 3426 __ bind(&done); |
3427 } | 3427 } |
3428 | 3428 |
3429 | 3429 |
3430 void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) { | 3430 void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) { |
3431 Register input_reg = ToRegister(instr->value()); | 3431 Register input_reg = ToRegister(instr->value()); |
3432 __ testl(input_reg, input_reg); | 3432 __ testl(input_reg, input_reg); |
3433 Label is_positive; | 3433 Label is_positive; |
(...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5545 FixedArray::kHeaderSize - kPointerSize)); | 5545 FixedArray::kHeaderSize - kPointerSize)); |
5546 __ bind(&done); | 5546 __ bind(&done); |
5547 } | 5547 } |
5548 | 5548 |
5549 | 5549 |
5550 #undef __ | 5550 #undef __ |
5551 | 5551 |
5552 } } // namespace v8::internal | 5552 } } // namespace v8::internal |
5553 | 5553 |
5554 #endif // V8_TARGET_ARCH_X64 | 5554 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |