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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 __ Swap(r0, r1, r2); | 1086 __ Swap(r0, r1, r2); |
1087 } else if (left.is(r0)) { | 1087 } else if (left.is(r0)) { |
1088 ASSERT(!right.is(r1)); | 1088 ASSERT(!right.is(r1)); |
1089 __ mov(r1, r0); | 1089 __ mov(r1, r0); |
1090 __ mov(r0, right); | 1090 __ mov(r0, right); |
1091 } else { | 1091 } else { |
1092 ASSERT(!left.is(r0) && !right.is(r0)); | 1092 ASSERT(!left.is(r0) && !right.is(r0)); |
1093 __ mov(r0, right); | 1093 __ mov(r0, right); |
1094 __ mov(r1, left); | 1094 __ mov(r1, left); |
1095 } | 1095 } |
1096 TypeRecordingBinaryOpStub stub(op, OVERWRITE_LEFT); | 1096 BinaryOpStub stub(op, OVERWRITE_LEFT); |
1097 __ CallStub(&stub); | 1097 __ CallStub(&stub); |
1098 RecordSafepointWithRegistersAndDoubles(instr->pointer_map(), | 1098 RecordSafepointWithRegistersAndDoubles(instr->pointer_map(), |
1099 0, | 1099 0, |
1100 Safepoint::kNoDeoptimizationIndex); | 1100 Safepoint::kNoDeoptimizationIndex); |
1101 // Overwrite the stored value of r0 with the result of the stub. | 1101 // Overwrite the stored value of r0 with the result of the stub. |
1102 __ StoreToSafepointRegistersAndDoublesSlot(r0, r0); | 1102 __ StoreToSafepointRegistersAndDoublesSlot(r0, r0); |
1103 } | 1103 } |
1104 | 1104 |
1105 | 1105 |
1106 void LCodeGen::DoMulI(LMulI* instr) { | 1106 void LCodeGen::DoMulI(LMulI* instr) { |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 break; | 1392 break; |
1393 } | 1393 } |
1394 } | 1394 } |
1395 | 1395 |
1396 | 1396 |
1397 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 1397 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
1398 ASSERT(ToRegister(instr->InputAt(0)).is(r1)); | 1398 ASSERT(ToRegister(instr->InputAt(0)).is(r1)); |
1399 ASSERT(ToRegister(instr->InputAt(1)).is(r0)); | 1399 ASSERT(ToRegister(instr->InputAt(1)).is(r0)); |
1400 ASSERT(ToRegister(instr->result()).is(r0)); | 1400 ASSERT(ToRegister(instr->result()).is(r0)); |
1401 | 1401 |
1402 TypeRecordingBinaryOpStub stub(instr->op(), NO_OVERWRITE); | 1402 BinaryOpStub stub(instr->op(), NO_OVERWRITE); |
1403 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 1403 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
1404 } | 1404 } |
1405 | 1405 |
1406 | 1406 |
1407 int LCodeGen::GetNextEmittedBlock(int block) { | 1407 int LCodeGen::GetNextEmittedBlock(int block) { |
1408 for (int i = block + 1; i < graph()->blocks()->length(); ++i) { | 1408 for (int i = block + 1; i < graph()->blocks()->length(); ++i) { |
1409 LLabel* label = chunk_->GetLabel(i); | 1409 LLabel* label = chunk_->GetLabel(i); |
1410 if (!label->HasReplacement()) return i; | 1410 if (!label->HasReplacement()) return i; |
1411 } | 1411 } |
1412 return -1; | 1412 return -1; |
(...skipping 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4496 ASSERT(osr_pc_offset_ == -1); | 4496 ASSERT(osr_pc_offset_ == -1); |
4497 osr_pc_offset_ = masm()->pc_offset(); | 4497 osr_pc_offset_ = masm()->pc_offset(); |
4498 } | 4498 } |
4499 | 4499 |
4500 | 4500 |
4501 | 4501 |
4502 | 4502 |
4503 #undef __ | 4503 #undef __ |
4504 | 4504 |
4505 } } // namespace v8::internal | 4505 } } // namespace v8::internal |
OLD | NEW |