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

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

Issue 145693002: A64: Implement HRandom. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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
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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 // it will be loaded multiple times. Unfortunatly crankshaft already 1241 // it will be loaded multiple times. Unfortunatly crankshaft already
1242 // duplicates constant loads, but we should modify the code below once this 1242 // duplicates constant loads, but we should modify the code below once this
1243 // issue has been addressed in crankshaft. 1243 // issue has been addressed in crankshaft.
1244 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1244 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1245 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); 1245 LOperand* right = UseRegisterOrConstantAtStart(instr->right());
1246 return new(zone()) LCmpIDAndBranch(left, right); 1246 return new(zone()) LCmpIDAndBranch(left, right);
1247 } 1247 }
1248 } 1248 }
1249 1249
1250 1250
1251 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1252 ASSERT(instr->representation().IsDouble());
1253 ASSERT(instr->global_object()->representation().IsTagged());
1254 LOperand* global_object = UseFixed(instr->global_object(), x0);
1255 LRandom* result = new(zone()) LRandom(global_object);
1256 return MarkAsCall(DefineFixedDouble(result, d7), instr);
Rodolph Perfetta 2014/01/23 15:02:14 Use d0 to be consistent with other uses.
1257 }
1258
1259
1251 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1260 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1252 ASSERT(instr->left()->representation().IsTagged()); 1261 ASSERT(instr->left()->representation().IsTagged());
1253 ASSERT(instr->right()->representation().IsTagged()); 1262 ASSERT(instr->right()->representation().IsTagged());
1254 LOperand* left = UseFixed(instr->left(), x1); 1263 LOperand* left = UseFixed(instr->left(), x1);
1255 LOperand* right = UseFixed(instr->right(), x0); 1264 LOperand* right = UseFixed(instr->right(), x0);
1256 LCmpT* result = new(zone()) LCmpT(left, right); 1265 LCmpT* result = new(zone()) LCmpT(left, right);
1257 return MarkAsCall(DefineFixed(result, x0), instr); 1266 return MarkAsCall(DefineFixed(result, x0), instr);
1258 } 1267 }
1259 1268
1260 1269
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 } 1875 }
1867 1876
1868 1877
1869 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { 1878 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
1870 ++argument_count_; 1879 ++argument_count_;
1871 LOperand* argument = UseRegister(instr->argument()); 1880 LOperand* argument = UseRegister(instr->argument());
1872 return new(zone()) LPushArgument(argument); 1881 return new(zone()) LPushArgument(argument);
1873 } 1882 }
1874 1883
1875 1884
1876 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1877 UNIMPLEMENTED_INSTRUCTION();
1878 }
1879
1880
1881 LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) { 1885 LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) {
1882 return MarkAsCall(DefineFixed(new(zone()) LRegExpLiteral, x0), instr); 1886 return MarkAsCall(DefineFixed(new(zone()) LRegExpLiteral, x0), instr);
1883 } 1887 }
1884 1888
1885 1889
1886 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { 1890 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
1887 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); 1891 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count());
1888 return new(zone()) LReturn(UseFixed(instr->value(), x0), parameter_count); 1892 return new(zone()) LReturn(UseFixed(instr->value(), x0), parameter_count);
1889 } 1893 }
1890 1894
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2451 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { 2455 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
2452 LOperand* receiver = UseRegister(instr->receiver()); 2456 LOperand* receiver = UseRegister(instr->receiver());
2453 LOperand* function = UseRegisterAtStart(instr->function()); 2457 LOperand* function = UseRegisterAtStart(instr->function());
2454 LOperand* temp = TempRegister(); 2458 LOperand* temp = TempRegister();
2455 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); 2459 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp);
2456 return AssignEnvironment(DefineAsRegister(result)); 2460 return AssignEnvironment(DefineAsRegister(result));
2457 } 2461 }
2458 2462
2459 2463
2460 } } // namespace v8::internal 2464 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698