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 3317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3328 | 3328 |
3329 // Slow case: Call the runtime system to do the number allocation. | 3329 // Slow case: Call the runtime system to do the number allocation. |
3330 __ bind(&slow); | 3330 __ bind(&slow); |
3331 CallRuntimeFromDeferred(Runtime::kAllocateHeapNumber, 0, instr); | 3331 CallRuntimeFromDeferred(Runtime::kAllocateHeapNumber, 0, instr); |
3332 // Set the pointer to the new heap number in tmp. | 3332 // Set the pointer to the new heap number in tmp. |
3333 if (!tmp.is(rax)) __ movq(tmp, rax); | 3333 if (!tmp.is(rax)) __ movq(tmp, rax); |
3334 // Restore input_reg after call to runtime. | 3334 // Restore input_reg after call to runtime. |
3335 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); | 3335 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); |
3336 | 3336 |
3337 __ bind(&allocated); | 3337 __ bind(&allocated); |
3338 __ movq(tmp2, FieldOperand(input_reg, HeapNumber::kValueOffset)); | 3338 __ MoveDouble(tmp2, FieldOperand(input_reg, HeapNumber::kValueOffset)); |
3339 __ shl(tmp2, Immediate(1)); | 3339 __ shl(tmp2, Immediate(1)); |
3340 __ shr(tmp2, Immediate(1)); | 3340 __ shr(tmp2, Immediate(1)); |
3341 __ movq(FieldOperand(tmp, HeapNumber::kValueOffset), tmp2); | 3341 __ MoveDouble(FieldOperand(tmp, HeapNumber::kValueOffset), tmp2); |
3342 __ StoreToSafepointRegisterSlot(input_reg, tmp); | 3342 __ StoreToSafepointRegisterSlot(input_reg, tmp); |
3343 | 3343 |
3344 __ bind(&done); | 3344 __ bind(&done); |
3345 } | 3345 } |
3346 | 3346 |
3347 | 3347 |
3348 void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) { | 3348 void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) { |
3349 Register input_reg = ToRegister(instr->value()); | 3349 Register input_reg = ToRegister(instr->value()); |
3350 __ testl(input_reg, input_reg); | 3350 __ testl(input_reg, input_reg); |
3351 Label is_positive; | 3351 Label is_positive; |
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5458 FixedArray::kHeaderSize - kPointerSize)); | 5458 FixedArray::kHeaderSize - kPointerSize)); |
5459 __ bind(&done); | 5459 __ bind(&done); |
5460 } | 5460 } |
5461 | 5461 |
5462 | 5462 |
5463 #undef __ | 5463 #undef __ |
5464 | 5464 |
5465 } } // namespace v8::internal | 5465 } } // namespace v8::internal |
5466 | 5466 |
5467 #endif // V8_TARGET_ARCH_X64 | 5467 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |