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

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

Issue 11049025: ARM: Fast path for integer inputs to EmitVFPTruncate (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 2 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/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.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 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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 LOperand* input = UseFixedDouble(instr->value(), d2); 1033 LOperand* input = UseFixedDouble(instr->value(), d2);
1034 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, NULL); 1034 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, NULL);
1035 return MarkAsCall(DefineFixedDouble(result, d2), instr); 1035 return MarkAsCall(DefineFixedDouble(result, d2), instr);
1036 } else if (op == kMathPowHalf) { 1036 } else if (op == kMathPowHalf) {
1037 LOperand* input = UseFixedDouble(instr->value(), d2); 1037 LOperand* input = UseFixedDouble(instr->value(), d2);
1038 LOperand* temp = FixedTemp(d3); 1038 LOperand* temp = FixedTemp(d3);
1039 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp); 1039 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp);
1040 return DefineFixedDouble(result, d2); 1040 return DefineFixedDouble(result, d2);
1041 } else { 1041 } else {
1042 LOperand* input = UseRegisterAtStart(instr->value()); 1042 LOperand* input = UseRegisterAtStart(instr->value());
1043 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; 1043
1044 LOperand* temp = (op == kMathRound) ? FixedTemp(d3) : NULL;
1044 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp); 1045 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp);
1045 switch (op) { 1046 switch (op) {
1046 case kMathAbs: 1047 case kMathAbs:
1047 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); 1048 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1048 case kMathFloor: 1049 case kMathFloor:
1049 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); 1050 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1050 case kMathSqrt: 1051 case kMathSqrt:
1051 return DefineAsRegister(result); 1052 return DefineAsRegister(result);
1052 case kMathRound: 1053 case kMathRound:
1053 return AssignEnvironment(DefineAsRegister(result)); 1054 return AssignEnvironment(DefineAsRegister(result));
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 } else { 1610 } else {
1610 ASSERT(to.IsInteger32()); 1611 ASSERT(to.IsInteger32());
1611 LOperand* value = UseRegisterAtStart(instr->value()); 1612 LOperand* value = UseRegisterAtStart(instr->value());
1612 LInstruction* res = NULL; 1613 LInstruction* res = NULL;
1613 if (instr->value()->type().IsSmi()) { 1614 if (instr->value()->type().IsSmi()) {
1614 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); 1615 res = DefineAsRegister(new(zone()) LSmiUntag(value, false));
1615 } else { 1616 } else {
1616 LOperand* temp1 = TempRegister(); 1617 LOperand* temp1 = TempRegister();
1617 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() 1618 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
1618 : NULL; 1619 : NULL;
1619 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(d11) 1620 LOperand* temp3 = FixedTemp(d11);
1620 : NULL;
1621 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, 1621 res = DefineSameAsFirst(new(zone()) LTaggedToI(value,
1622 temp1, 1622 temp1,
1623 temp2, 1623 temp2,
1624 temp3)); 1624 temp3));
1625 res = AssignEnvironment(res); 1625 res = AssignEnvironment(res);
1626 } 1626 }
1627 return res; 1627 return res;
1628 } 1628 }
1629 } else if (from.IsDouble()) { 1629 } else if (from.IsDouble()) {
1630 if (to.IsTagged()) { 1630 if (to.IsTagged()) {
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 2310
2311 2311
2312 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2312 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2313 LOperand* object = UseRegister(instr->object()); 2313 LOperand* object = UseRegister(instr->object());
2314 LOperand* index = UseRegister(instr->index()); 2314 LOperand* index = UseRegister(instr->index());
2315 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2315 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2316 } 2316 }
2317 2317
2318 2318
2319 } } // namespace v8::internal 2319 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698