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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 LCheckMaps* result = new(zone()) LCheckMaps(value); | 1690 LCheckMaps* result = new(zone()) LCheckMaps(value); |
1691 return AssignEnvironment(result); | 1691 return AssignEnvironment(result); |
1692 } | 1692 } |
1693 | 1693 |
1694 | 1694 |
1695 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { | 1695 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
1696 HValue* value = instr->value(); | 1696 HValue* value = instr->value(); |
1697 Representation input_rep = value->representation(); | 1697 Representation input_rep = value->representation(); |
1698 LOperand* reg = UseRegister(value); | 1698 LOperand* reg = UseRegister(value); |
1699 if (input_rep.IsDouble()) { | 1699 if (input_rep.IsDouble()) { |
1700 return DefineAsRegister(new(zone()) LClampDToUint8(reg, | 1700 return DefineAsRegister(new(zone()) LClampDToUint8(reg)); |
1701 TempRegister())); | |
1702 } else if (input_rep.IsInteger32()) { | 1701 } else if (input_rep.IsInteger32()) { |
1703 return DefineSameAsFirst(new(zone()) LClampIToUint8(reg)); | 1702 return DefineSameAsFirst(new(zone()) LClampIToUint8(reg)); |
1704 } else { | 1703 } else { |
1705 ASSERT(input_rep.IsTagged()); | 1704 ASSERT(input_rep.IsTagged()); |
1706 // Register allocator doesn't (yet) support allocation of double | 1705 // Register allocator doesn't (yet) support allocation of double |
1707 // temps. Reserve xmm1 explicitly. | 1706 // temps. Reserve xmm1 explicitly. |
1708 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, | 1707 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, |
1709 TempRegister(), | |
1710 FixedTemp(xmm1)); | 1708 FixedTemp(xmm1)); |
1711 return AssignEnvironment(DefineSameAsFirst(result)); | 1709 return AssignEnvironment(DefineSameAsFirst(result)); |
1712 } | 1710 } |
1713 } | 1711 } |
1714 | 1712 |
1715 | 1713 |
1716 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1714 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
1717 return new(zone()) LReturn(UseFixed(instr->value(), rax)); | 1715 return new(zone()) LReturn(UseFixed(instr->value(), rax)); |
1718 } | 1716 } |
1719 | 1717 |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2312 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2310 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2313 LOperand* object = UseRegister(instr->object()); | 2311 LOperand* object = UseRegister(instr->object()); |
2314 LOperand* index = UseTempRegister(instr->index()); | 2312 LOperand* index = UseTempRegister(instr->index()); |
2315 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2313 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2316 } | 2314 } |
2317 | 2315 |
2318 | 2316 |
2319 } } // namespace v8::internal | 2317 } } // namespace v8::internal |
2320 | 2318 |
2321 #endif // V8_TARGET_ARCH_X64 | 2319 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |