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

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

Issue 11308134: MIPS: ARM: Fast path for integer inputs to EmitVFPTruncate (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased on r13080 Created 8 years 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/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.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 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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 return MarkAsCall(DefineFixedDouble(result, f4), instr); 1042 return MarkAsCall(DefineFixedDouble(result, f4), instr);
1043 } else if (op == kMathPowHalf) { 1043 } else if (op == kMathPowHalf) {
1044 // Input cannot be the same as the result. 1044 // Input cannot be the same as the result.
1045 // See lithium-codegen-mips.cc::DoMathPowHalf. 1045 // See lithium-codegen-mips.cc::DoMathPowHalf.
1046 LOperand* input = UseFixedDouble(instr->value(), f8); 1046 LOperand* input = UseFixedDouble(instr->value(), f8);
1047 LOperand* temp = FixedTemp(f6); 1047 LOperand* temp = FixedTemp(f6);
1048 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp); 1048 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp);
1049 return DefineFixedDouble(result, f4); 1049 return DefineFixedDouble(result, f4);
1050 } else { 1050 } else {
1051 LOperand* input = UseRegisterAtStart(instr->value()); 1051 LOperand* input = UseRegisterAtStart(instr->value());
1052 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; 1052
1053 LOperand* temp = (op == kMathRound) ? FixedTemp(f6) :
1054 (op == kMathFloor) ? TempRegister() : NULL;
1053 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp); 1055 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input, temp);
1054 switch (op) { 1056 switch (op) {
1055 case kMathAbs: 1057 case kMathAbs:
1056 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); 1058 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1057 case kMathFloor: 1059 case kMathFloor:
1058 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); 1060 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1059 case kMathSqrt: 1061 case kMathSqrt:
1060 return DefineAsRegister(result); 1062 return DefineAsRegister(result);
1061 case kMathRound: 1063 case kMathRound:
1062 return AssignEnvironment(DefineAsRegister(result)); 1064 return AssignEnvironment(DefineAsRegister(result));
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 } else { 1561 } else {
1560 ASSERT(to.IsInteger32()); 1562 ASSERT(to.IsInteger32());
1561 LOperand* value = UseRegisterAtStart(instr->value()); 1563 LOperand* value = UseRegisterAtStart(instr->value());
1562 LInstruction* res = NULL; 1564 LInstruction* res = NULL;
1563 if (instr->value()->type().IsSmi()) { 1565 if (instr->value()->type().IsSmi()) {
1564 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); 1566 res = DefineAsRegister(new(zone()) LSmiUntag(value, false));
1565 } else { 1567 } else {
1566 LOperand* temp1 = TempRegister(); 1568 LOperand* temp1 = TempRegister();
1567 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() 1569 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
1568 : NULL; 1570 : NULL;
1569 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(f22) 1571 LOperand* temp3 = FixedTemp(f22);
1570 : NULL;
1571 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, 1572 res = DefineSameAsFirst(new(zone()) LTaggedToI(value,
1572 temp1, 1573 temp1,
1573 temp2, 1574 temp2,
1574 temp3)); 1575 temp3));
1575 res = AssignEnvironment(res); 1576 res = AssignEnvironment(res);
1576 } 1577 }
1577 return res; 1578 return res;
1578 } 1579 }
1579 } else if (from.IsDouble()) { 1580 } else if (from.IsDouble()) {
1580 if (to.IsTagged()) { 1581 if (to.IsTagged()) {
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 2228
2228 2229
2229 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2230 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2230 LOperand* object = UseRegister(instr->object()); 2231 LOperand* object = UseRegister(instr->object());
2231 LOperand* index = UseRegister(instr->index()); 2232 LOperand* index = UseRegister(instr->index());
2232 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2233 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2233 } 2234 }
2234 2235
2235 2236
2236 } } // namespace v8::internal 2237 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698