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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 #else | 1389 #else |
1390 UseFixed(instr->right(), rdi); | 1390 UseFixed(instr->right(), rdi); |
1391 #endif | 1391 #endif |
1392 LPower* result = new LPower(left, right); | 1392 LPower* result = new LPower(left, right); |
1393 return MarkAsCall(DefineFixedDouble(result, xmm1), instr, | 1393 return MarkAsCall(DefineFixedDouble(result, xmm1), instr, |
1394 CAN_DEOPTIMIZE_EAGERLY); | 1394 CAN_DEOPTIMIZE_EAGERLY); |
1395 } | 1395 } |
1396 | 1396 |
1397 | 1397 |
1398 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { | 1398 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
1399 Token::Value op = instr->token(); | |
1400 ASSERT(instr->left()->representation().IsTagged()); | 1399 ASSERT(instr->left()->representation().IsTagged()); |
1401 ASSERT(instr->right()->representation().IsTagged()); | 1400 ASSERT(instr->right()->representation().IsTagged()); |
1402 bool reversed = (op == Token::GT || op == Token::LTE); | 1401 LOperand* left = UseFixed(instr->left(), rdx); |
1403 LOperand* left = UseFixed(instr->left(), reversed ? rax : rdx); | 1402 LOperand* right = UseFixed(instr->right(), rax); |
1404 LOperand* right = UseFixed(instr->right(), reversed ? rdx : rax); | |
1405 LCmpT* result = new LCmpT(left, right); | 1403 LCmpT* result = new LCmpT(left, right); |
1406 return MarkAsCall(DefineFixed(result, rax), instr); | 1404 return MarkAsCall(DefineFixed(result, rax), instr); |
1407 } | 1405 } |
1408 | 1406 |
1409 | 1407 |
1410 LInstruction* LChunkBuilder::DoCompareIDAndBranch( | 1408 LInstruction* LChunkBuilder::DoCompareIDAndBranch( |
1411 HCompareIDAndBranch* instr) { | 1409 HCompareIDAndBranch* instr) { |
1412 Representation r = instr->GetInputRepresentation(); | 1410 Representation r = instr->GetInputRepresentation(); |
1413 if (r.IsInteger32()) { | 1411 if (r.IsInteger32()) { |
1414 ASSERT(instr->left()->representation().IsInteger32()); | 1412 ASSERT(instr->left()->representation().IsInteger32()); |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2177 LOperand* key = UseOrConstantAtStart(instr->key()); | 2175 LOperand* key = UseOrConstantAtStart(instr->key()); |
2178 LOperand* object = UseOrConstantAtStart(instr->object()); | 2176 LOperand* object = UseOrConstantAtStart(instr->object()); |
2179 LIn* result = new LIn(key, object); | 2177 LIn* result = new LIn(key, object); |
2180 return MarkAsCall(DefineFixed(result, rax), instr); | 2178 return MarkAsCall(DefineFixed(result, rax), instr); |
2181 } | 2179 } |
2182 | 2180 |
2183 | 2181 |
2184 } } // namespace v8::internal | 2182 } } // namespace v8::internal |
2185 | 2183 |
2186 #endif // V8_TARGET_ARCH_X64 | 2184 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |