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

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

Issue 145893004: A64: Fix handling of Smis in lithium Load/Store. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Add static asserts. 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 | « no previous file | 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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 instr->RequiresHoleCheck()) 1646 instr->RequiresHoleCheck())
1647 ? TempRegister() 1647 ? TempRegister()
1648 : NULL; 1648 : NULL;
1649 1649
1650 LLoadKeyedFixedDouble* result = 1650 LLoadKeyedFixedDouble* result =
1651 new(zone()) LLoadKeyedFixedDouble(elements, key, temp); 1651 new(zone()) LLoadKeyedFixedDouble(elements, key, temp);
1652 return instr->RequiresHoleCheck() 1652 return instr->RequiresHoleCheck()
1653 ? AssignEnvironment(DefineAsRegister(result)) 1653 ? AssignEnvironment(DefineAsRegister(result))
1654 : DefineAsRegister(result); 1654 : DefineAsRegister(result);
1655 } else { 1655 } else {
1656 ASSERT(instr->representation().IsSmiOrTagged()); 1656 ASSERT(instr->representation().IsSmiOrTagged() ||
1657 instr->representation().IsInteger32());
1657 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); 1658 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister();
1658 LLoadKeyedFixed* result = 1659 LLoadKeyedFixed* result =
1659 new(zone()) LLoadKeyedFixed(elements, key, temp); 1660 new(zone()) LLoadKeyedFixed(elements, key, temp);
1660 return instr->RequiresHoleCheck() 1661 return instr->RequiresHoleCheck()
1661 ? AssignEnvironment(DefineAsRegister(result)) 1662 ? AssignEnvironment(DefineAsRegister(result))
1662 : DefineAsRegister(result); 1663 : DefineAsRegister(result);
1663 } 1664 }
1664 } else { 1665 } else {
1665 ASSERT((instr->representation().IsInteger32() && 1666 ASSERT((instr->representation().IsInteger32() &&
1666 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && 1667 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
2129 return new(zone()) LStoreKeyedExternal(elements, key, val, temp); 2130 return new(zone()) LStoreKeyedExternal(elements, key, val, temp);
2130 } else if (instr->value()->representation().IsDouble()) { 2131 } else if (instr->value()->representation().IsDouble()) {
2131 ASSERT(instr->elements()->representation().IsTagged()); 2132 ASSERT(instr->elements()->representation().IsTagged());
2132 2133
2133 // The constraint used here is UseRegister, even though the StoreKeyed 2134 // The constraint used here is UseRegister, even though the StoreKeyed
2134 // instruction may canonicalize the value in the register if it is a NaN. 2135 // instruction may canonicalize the value in the register if it is a NaN.
2135 temp = TempRegister(); 2136 temp = TempRegister();
2136 return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp); 2137 return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp);
2137 } else { 2138 } else {
2138 ASSERT(instr->elements()->representation().IsTagged()); 2139 ASSERT(instr->elements()->representation().IsTagged());
2139 ASSERT(instr->value()->representation().IsSmiOrTagged()); 2140 ASSERT(instr->value()->representation().IsSmiOrTagged() ||
2141 instr->value()->representation().IsInteger32());
2140 2142
2141 temp = TempRegister(); 2143 temp = TempRegister();
2142 return new(zone()) LStoreKeyedFixed(elements, key, val, temp); 2144 return new(zone()) LStoreKeyedFixed(elements, key, val, temp);
2143 } 2145 }
2144 } 2146 }
2145 2147
2146 2148
2147 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2149 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2148 LOperand* object = UseFixed(instr->object(), x2); 2150 LOperand* object = UseFixed(instr->object(), x2);
2149 LOperand* key = UseFixed(instr->key(), x1); 2151 LOperand* key = UseFixed(instr->key(), x1);
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { 2483 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
2482 LOperand* receiver = UseRegister(instr->receiver()); 2484 LOperand* receiver = UseRegister(instr->receiver());
2483 LOperand* function = UseRegisterAtStart(instr->function()); 2485 LOperand* function = UseRegisterAtStart(instr->function());
2484 LOperand* temp = TempRegister(); 2486 LOperand* temp = TempRegister();
2485 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); 2487 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp);
2486 return AssignEnvironment(DefineAsRegister(result)); 2488 return AssignEnvironment(DefineAsRegister(result));
2487 } 2489 }
2488 2490
2489 2491
2490 } } // namespace v8::internal 2492 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/a64/lithium-codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698