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

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

Issue 149483002: A64: Handle Smi representation in MathAbs and fix MathPowStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Do not smi-untag integer32 exponents in MathPower 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/code-stubs-a64.cc ('k') | src/a64/lithium-codegen-a64.cc » ('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 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2338 2338
2339 return new(zone()) LTypeofIsAndBranch( 2339 return new(zone()) LTypeofIsAndBranch(
2340 UseRegister(instr->value()), temp1, temp2); 2340 UseRegister(instr->value()), temp1, temp2);
2341 } 2341 }
2342 2342
2343 2343
2344 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 2344 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
2345 switch (instr->op()) { 2345 switch (instr->op()) {
2346 case kMathAbs: { 2346 case kMathAbs: {
2347 Representation r = instr->representation(); 2347 Representation r = instr->representation();
2348 if (r.IsTagged()) { 2348 if (r.IsTagged() || r.IsSmi()) {
2349 // The tagged case might need to allocate a HeapNumber for the result, 2349 // The tagged case might need to allocate a HeapNumber for the result,
2350 // so it is handled by a separate LInstruction. 2350 // so it is handled by a separate LInstruction.
2351 LOperand* input = UseRegister(instr->value()); 2351 LOperand* input = UseRegister(instr->value());
2352 LOperand* temp1 = TempRegister(); 2352 LOperand* temp1 = TempRegister();
2353 LOperand* temp2 = TempRegister(); 2353 LOperand* temp2 = TempRegister();
2354 LOperand* temp3 = TempRegister(); 2354 LOperand* temp3 = TempRegister();
2355 LMathAbsTagged* result = 2355 LMathAbsTagged* result =
2356 new(zone()) LMathAbsTagged(input, temp1, temp2, temp3); 2356 new(zone()) LMathAbsTagged(input, temp1, temp2, temp3);
2357 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); 2357 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
2358 } else { 2358 } else {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2504 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { 2504 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
2505 LOperand* receiver = UseRegister(instr->receiver()); 2505 LOperand* receiver = UseRegister(instr->receiver());
2506 LOperand* function = UseRegisterAtStart(instr->function()); 2506 LOperand* function = UseRegisterAtStart(instr->function());
2507 LOperand* temp = TempRegister(); 2507 LOperand* temp = TempRegister();
2508 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); 2508 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp);
2509 return AssignEnvironment(DefineAsRegister(result)); 2509 return AssignEnvironment(DefineAsRegister(result));
2510 } 2510 }
2511 2511
2512 2512
2513 } } // namespace v8::internal 2513 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/code-stubs-a64.cc ('k') | src/a64/lithium-codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698