Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: src/a64/lithium-a64.cc

Issue 136643008: A64: Synchronize with r18256. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/a64/lithium-a64.h ('k') | src/a64/lithium-codegen-a64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 165
166 void LGoto::PrintDataTo(StringStream* stream) { 166 void LGoto::PrintDataTo(StringStream* stream) {
167 stream->Add("B%d", block_id()); 167 stream->Add("B%d", block_id());
168 } 168 }
169 169
170 170
171 void LInnerAllocatedObject::PrintDataTo(StringStream* stream) { 171 void LInnerAllocatedObject::PrintDataTo(StringStream* stream) {
172 stream->Add(" = "); 172 stream->Add(" = ");
173 base_object()->PrintTo(stream); 173 base_object()->PrintTo(stream);
174 stream->Add(" + %d", offset()); 174 stream->Add(" + ");
175 offset()->PrintTo(stream);
175 } 176 }
176 177
177 178
178 void LInvokeFunction::PrintDataTo(StringStream* stream) { 179 void LInvokeFunction::PrintDataTo(StringStream* stream) {
179 stream->Add("= "); 180 stream->Add("= ");
180 function()->PrintTo(stream); 181 function()->PrintTo(stream);
181 stream->Add(" #%d / ", arity()); 182 stream->Add(" #%d / ", arity());
182 } 183 }
183 184
184 185
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 1577
1577 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( 1578 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
1578 HHasInstanceTypeAndBranch* instr) { 1579 HHasInstanceTypeAndBranch* instr) {
1579 ASSERT(instr->value()->representation().IsTagged()); 1580 ASSERT(instr->value()->representation().IsTagged());
1580 LOperand* value = UseRegisterAtStart(instr->value()); 1581 LOperand* value = UseRegisterAtStart(instr->value());
1581 return new(zone()) LHasInstanceTypeAndBranch(value, TempRegister()); 1582 return new(zone()) LHasInstanceTypeAndBranch(value, TempRegister());
1582 } 1583 }
1583 1584
1584 1585
1585 LInstruction* LChunkBuilder::DoInnerAllocatedObject( 1586 LInstruction* LChunkBuilder::DoInnerAllocatedObject(
1586 HInnerAllocatedObject* inner_object) { 1587 HInnerAllocatedObject* instr) {
1587 LOperand* base_object = UseRegisterAtStart(inner_object->base_object()); 1588 LOperand* base_object = UseRegisterAtStart(instr->base_object());
1588 return DefineAsRegister(new(zone()) LInnerAllocatedObject(base_object)); 1589 LOperand* offset = UseRegisterOrConstantAtStart(instr->offset());
1590 return DefineAsRegister(
1591 new(zone()) LInnerAllocatedObject(base_object, offset));
1589 } 1592 }
1590 1593
1591 1594
1592 LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) { 1595 LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
1593 LInstanceOf* result = new(zone()) LInstanceOf( 1596 LInstanceOf* result = new(zone()) LInstanceOf(
1594 UseFixed(instr->left(), InstanceofStub::left()), 1597 UseFixed(instr->left(), InstanceofStub::left()),
1595 UseFixed(instr->right(), InstanceofStub::right())); 1598 UseFixed(instr->right(), InstanceofStub::right()));
1596 return MarkAsCall(DefineFixed(result, x0), instr); 1599 return MarkAsCall(DefineFixed(result, x0), instr);
1597 } 1600 }
1598 1601
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2435 // The Double case can never fail so it doesn't need an environment. 2438 // The Double case can never fail so it doesn't need an environment.
2436 return DefineAsRegister(result); 2439 return DefineAsRegister(result);
2437 } else { 2440 } else {
2438 ASSERT(r.IsInteger32() || r.IsSmi()); 2441 ASSERT(r.IsInteger32() || r.IsSmi());
2439 // The Integer32 and Smi cases need an environment because they can 2442 // The Integer32 and Smi cases need an environment because they can
2440 // deoptimize on minimum representable number. 2443 // deoptimize on minimum representable number.
2441 return AssignEnvironment(DefineAsRegister(result)); 2444 return AssignEnvironment(DefineAsRegister(result));
2442 } 2445 }
2443 } 2446 }
2444 } 2447 }
2445 case kMathCos: {
2446 ASSERT(instr->representation().IsDouble());
2447 ASSERT(instr->value()->representation().IsDouble());
2448 LOperand* input = UseFixedDouble(instr->value(), d0);
2449 LMathCos* result = new(zone()) LMathCos(input);
2450 return MarkAsCall(DefineFixedDouble(result, d0), instr);
2451 }
2452 case kMathExp: { 2448 case kMathExp: {
2453 ASSERT(instr->representation().IsDouble()); 2449 ASSERT(instr->representation().IsDouble());
2454 ASSERT(instr->value()->representation().IsDouble()); 2450 ASSERT(instr->value()->representation().IsDouble());
2455 LOperand* input = UseRegister(instr->value()); 2451 LOperand* input = UseRegister(instr->value());
2456 // TODO(all): Implement TempFPRegister. 2452 // TODO(all): Implement TempFPRegister.
2457 LOperand* double_temp1 = FixedTemp(d24); // This was chosen arbitrarily. 2453 LOperand* double_temp1 = FixedTemp(d24); // This was chosen arbitrarily.
2458 LOperand* temp1 = TempRegister(); 2454 LOperand* temp1 = TempRegister();
2459 LOperand* temp2 = TempRegister(); 2455 LOperand* temp2 = TempRegister();
2460 LOperand* temp3 = TempRegister(); 2456 LOperand* temp3 = TempRegister();
2461 LMathExp* result = new(zone()) LMathExp(input, double_temp1, 2457 LMathExp* result = new(zone()) LMathExp(input, double_temp1,
(...skipping 26 matching lines...) Expand all
2488 case kMathRound: { 2484 case kMathRound: {
2489 ASSERT(instr->representation().IsInteger32()); 2485 ASSERT(instr->representation().IsInteger32());
2490 ASSERT(instr->value()->representation().IsDouble()); 2486 ASSERT(instr->value()->representation().IsDouble());
2491 // TODO(jbramley): As with kMathFloor, we can probably handle double 2487 // TODO(jbramley): As with kMathFloor, we can probably handle double
2492 // results fairly easily, but we are never asked for them. 2488 // results fairly easily, but we are never asked for them.
2493 LOperand* input = UseRegister(instr->value()); 2489 LOperand* input = UseRegister(instr->value());
2494 LOperand* temp = FixedTemp(d24); // Choosen arbitrarily. 2490 LOperand* temp = FixedTemp(d24); // Choosen arbitrarily.
2495 LMathRound* result = new(zone()) LMathRound(input, temp); 2491 LMathRound* result = new(zone()) LMathRound(input, temp);
2496 return AssignEnvironment(DefineAsRegister(result)); 2492 return AssignEnvironment(DefineAsRegister(result));
2497 } 2493 }
2498 case kMathSin: {
2499 ASSERT(instr->representation().IsDouble());
2500 ASSERT(instr->value()->representation().IsDouble());
2501 LOperand* input = UseFixedDouble(instr->value(), d0);
2502 LMathSin* result = new(zone()) LMathSin(input);
2503 return MarkAsCall(DefineFixedDouble(result, d0), instr);
2504 }
2505 case kMathSqrt: { 2494 case kMathSqrt: {
2506 ASSERT(instr->representation().IsDouble()); 2495 ASSERT(instr->representation().IsDouble());
2507 ASSERT(instr->value()->representation().IsDouble()); 2496 ASSERT(instr->value()->representation().IsDouble());
2508 LOperand* input = UseRegisterAtStart(instr->value()); 2497 LOperand* input = UseRegisterAtStart(instr->value());
2509 return DefineAsRegister(new(zone()) LMathSqrt(input)); 2498 return DefineAsRegister(new(zone()) LMathSqrt(input));
2510 } 2499 }
2511 case kMathTan: {
2512 ASSERT(instr->representation().IsDouble());
2513 ASSERT(instr->value()->representation().IsDouble());
2514 LOperand* input = UseFixedDouble(instr->value(), d0);
2515 LMathTan* result = new(zone()) LMathTan(input);
2516 return MarkAsCall(DefineFixedDouble(result, d0), instr);
2517 }
2518 default: 2500 default:
2519 UNREACHABLE(); 2501 UNREACHABLE();
2520 return NULL; 2502 return NULL;
2521 } 2503 }
2522 } 2504 }
2523 2505
2524 2506
2525 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { 2507 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
2526 // Use an index that corresponds to the location in the unoptimized frame, 2508 // Use an index that corresponds to the location in the unoptimized frame,
2527 // which the optimized frame will subsume. 2509 // which the optimized frame will subsume.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { 2567 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
2586 LOperand* receiver = UseRegister(instr->receiver()); 2568 LOperand* receiver = UseRegister(instr->receiver());
2587 LOperand* function = UseRegisterAtStart(instr->function()); 2569 LOperand* function = UseRegisterAtStart(instr->function());
2588 LOperand* temp = TempRegister(); 2570 LOperand* temp = TempRegister();
2589 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); 2571 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp);
2590 return AssignEnvironment(DefineAsRegister(result)); 2572 return AssignEnvironment(DefineAsRegister(result));
2591 } 2573 }
2592 2574
2593 2575
2594 } } // namespace v8::internal 2576 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/lithium-a64.h ('k') | src/a64/lithium-codegen-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698