OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
827 void LCodeGen::DoBitI(LBitI* instr) { | 827 void LCodeGen::DoBitI(LBitI* instr) { |
828 Abort("Unimplemented: %s", "DoBitI");} | 828 Abort("Unimplemented: %s", "DoBitI");} |
829 | 829 |
830 | 830 |
831 void LCodeGen::DoShiftI(LShiftI* instr) { | 831 void LCodeGen::DoShiftI(LShiftI* instr) { |
832 Abort("Unimplemented: %s", "DoShiftI"); | 832 Abort("Unimplemented: %s", "DoShiftI"); |
833 } | 833 } |
834 | 834 |
835 | 835 |
836 void LCodeGen::DoSubI(LSubI* instr) { | 836 void LCodeGen::DoSubI(LSubI* instr) { |
837 Abort("Unimplemented: %s", "DoSubI"); | 837 LOperand* left = instr->InputAt(0); |
838 LOperand* right = instr->InputAt(1); | |
839 ASSERT(left->Equals(instr->result())); | |
840 | |
841 if (right->IsConstantOperand()) { | |
842 __ subl(ToRegister(left), | |
843 Immediate(ToInteger32(LConstantOperand::cast(right)))); | |
844 } else if (right->IsRegister()) { | |
845 __ subl(ToRegister(left), ToRegister(right)); | |
846 } else { | |
847 __ subl(ToRegister(left), ToOperand(right)); | |
848 } | |
849 | |
850 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { | |
851 DeoptimizeIf(overflow, instr->environment()); | |
852 } | |
838 } | 853 } |
839 | 854 |
840 | 855 |
841 void LCodeGen::DoConstantI(LConstantI* instr) { | 856 void LCodeGen::DoConstantI(LConstantI* instr) { |
842 ASSERT(instr->result()->IsRegister()); | 857 ASSERT(instr->result()->IsRegister()); |
843 __ movl(ToRegister(instr->result()), Immediate(instr->value())); | 858 __ movl(ToRegister(instr->result()), Immediate(instr->value())); |
844 } | 859 } |
845 | 860 |
846 | 861 |
847 void LCodeGen::DoConstantD(LConstantD* instr) { | 862 void LCodeGen::DoConstantD(LConstantD* instr) { |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1570 Abort("Unimplemented: %s", "DoApplyArguments"); | 1585 Abort("Unimplemented: %s", "DoApplyArguments"); |
1571 } | 1586 } |
1572 | 1587 |
1573 | 1588 |
1574 void LCodeGen::DoPushArgument(LPushArgument* instr) { | 1589 void LCodeGen::DoPushArgument(LPushArgument* instr) { |
1575 Abort("Unimplemented: %s", "DoPushArgument"); | 1590 Abort("Unimplemented: %s", "DoPushArgument"); |
1576 } | 1591 } |
1577 | 1592 |
1578 | 1593 |
1579 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { | 1594 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { |
1580 Abort("Unimplemented: %s", "DoGlobalObject"); | 1595 Register result = ToRegister(instr->result()); |
William Hesse
2011/01/25 11:12:20
GlobalObjectOperand()
| |
1596 __ movq(result, Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX))); | |
1581 } | 1597 } |
1582 | 1598 |
1583 | 1599 |
1584 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { | 1600 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { |
1585 Abort("Unimplemented: %s", "DoGlobalReceiver"); | 1601 Abort("Unimplemented: %s", "DoGlobalReceiver"); |
1586 } | 1602 } |
1587 | 1603 |
1588 | 1604 |
1589 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 1605 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
1590 int arity, | 1606 int arity, |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1946 | 1962 |
1947 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { | 1963 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { |
1948 Abort("Unimplemented: %s", "DoOsrEntry"); | 1964 Abort("Unimplemented: %s", "DoOsrEntry"); |
1949 } | 1965 } |
1950 | 1966 |
1951 #undef __ | 1967 #undef __ |
1952 | 1968 |
1953 } } // namespace v8::internal | 1969 } } // namespace v8::internal |
1954 | 1970 |
1955 #endif // V8_TARGET_ARCH_X64 | 1971 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |