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 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 ASSERT(instr->left()->representation().IsDouble()); | 1597 ASSERT(instr->left()->representation().IsDouble()); |
1598 LOperand* left = UseFixedDouble(instr->left(), xmm2); | 1598 LOperand* left = UseFixedDouble(instr->left(), xmm2); |
1599 LOperand* right = exponent_type.IsDouble() ? | 1599 LOperand* right = exponent_type.IsDouble() ? |
1600 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx); | 1600 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx); |
1601 LPower* result = new(zone()) LPower(left, right); | 1601 LPower* result = new(zone()) LPower(left, right); |
1602 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, | 1602 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, |
1603 CAN_DEOPTIMIZE_EAGERLY); | 1603 CAN_DEOPTIMIZE_EAGERLY); |
1604 } | 1604 } |
1605 | 1605 |
1606 | 1606 |
1607 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { | |
1608 ASSERT(instr->representation().IsDouble()); | |
1609 ASSERT(instr->global_object()->representation().IsTagged()); | |
1610 LOperand* global_object = UseTempRegister(instr->global_object()); | |
1611 LOperand* scratch = TempRegister(); | |
1612 LOperand* scratch2 = TempRegister(); | |
1613 LOperand* scratch3 = TempRegister(); | |
1614 LRandom* result = new(zone()) LRandom( | |
1615 global_object, scratch, scratch2, scratch3); | |
1616 return DefineFixedDouble(result, xmm1); | |
1617 } | |
1618 | |
1619 | |
1620 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { | 1607 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
1621 ASSERT(instr->left()->representation().IsTagged()); | 1608 ASSERT(instr->left()->representation().IsTagged()); |
1622 ASSERT(instr->right()->representation().IsTagged()); | 1609 ASSERT(instr->right()->representation().IsTagged()); |
1623 LOperand* context = UseFixed(instr->context(), rsi); | 1610 LOperand* context = UseFixed(instr->context(), rsi); |
1624 LOperand* left = UseFixed(instr->left(), rdx); | 1611 LOperand* left = UseFixed(instr->left(), rdx); |
1625 LOperand* right = UseFixed(instr->right(), rax); | 1612 LOperand* right = UseFixed(instr->right(), rax); |
1626 LCmpT* result = new(zone()) LCmpT(context, left, right); | 1613 LCmpT* result = new(zone()) LCmpT(context, left, right); |
1627 return MarkAsCall(DefineFixed(result, rax), instr); | 1614 return MarkAsCall(DefineFixed(result, rax), instr); |
1628 } | 1615 } |
1629 | 1616 |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2585 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2599 LOperand* object = UseRegister(instr->object()); | 2586 LOperand* object = UseRegister(instr->object()); |
2600 LOperand* index = UseTempRegister(instr->index()); | 2587 LOperand* index = UseTempRegister(instr->index()); |
2601 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2588 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2602 } | 2589 } |
2603 | 2590 |
2604 | 2591 |
2605 } } // namespace v8::internal | 2592 } } // namespace v8::internal |
2606 | 2593 |
2607 #endif // V8_TARGET_ARCH_X64 | 2594 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |