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

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

Issue 172133003: Harmony: optimize Math.clz32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix 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/lithium-a64.h ('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 2359 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 LOperand* temp = FixedTemp(d24); // Choosen arbitrarily. 2370 LOperand* temp = FixedTemp(d24); // Choosen arbitrarily.
2371 LMathRound* result = new(zone()) LMathRound(input, temp); 2371 LMathRound* result = new(zone()) LMathRound(input, temp);
2372 return AssignEnvironment(DefineAsRegister(result)); 2372 return AssignEnvironment(DefineAsRegister(result));
2373 } 2373 }
2374 case kMathSqrt: { 2374 case kMathSqrt: {
2375 ASSERT(instr->representation().IsDouble()); 2375 ASSERT(instr->representation().IsDouble());
2376 ASSERT(instr->value()->representation().IsDouble()); 2376 ASSERT(instr->value()->representation().IsDouble());
2377 LOperand* input = UseRegisterAtStart(instr->value()); 2377 LOperand* input = UseRegisterAtStart(instr->value());
2378 return DefineAsRegister(new(zone()) LMathSqrt(input)); 2378 return DefineAsRegister(new(zone()) LMathSqrt(input));
2379 } 2379 }
2380 case kMathClz32: {
2381 ASSERT(instr->representation().IsInteger32());
2382 ASSERT(instr->value()->representation().IsInteger32());
2383 LOperand* input = UseRegisterAtStart(instr->value());
2384 return DefineAsRegister(new(zone()) LMathClz32(input));
2385 }
2380 default: 2386 default:
2381 UNREACHABLE(); 2387 UNREACHABLE();
2382 return NULL; 2388 return NULL;
2383 } 2389 }
2384 } 2390 }
2385 2391
2386 2392
2387 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { 2393 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
2388 // Use an index that corresponds to the location in the unoptimized frame, 2394 // Use an index that corresponds to the location in the unoptimized frame,
2389 // which the optimized frame will subsume. 2395 // which the optimized frame will subsume.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2440 2446
2441 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { 2447 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
2442 LOperand* receiver = UseRegister(instr->receiver()); 2448 LOperand* receiver = UseRegister(instr->receiver());
2443 LOperand* function = UseRegister(instr->function()); 2449 LOperand* function = UseRegister(instr->function());
2444 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); 2450 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function);
2445 return AssignEnvironment(DefineAsRegister(result)); 2451 return AssignEnvironment(DefineAsRegister(result));
2446 } 2452 }
2447 2453
2448 2454
2449 } } // namespace v8::internal 2455 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/lithium-a64.h ('k') | src/a64/lithium-codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698