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

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

Issue 68723002: Implement Math.random() purely in JavaScript. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments only Created 7 years, 1 month 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/x64/lithium-x64.h ('k') | test/cctest/test-weaktypedarrays.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 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 ASSERT(instr->left()->representation().IsDouble()); 1599 ASSERT(instr->left()->representation().IsDouble());
1600 LOperand* left = UseFixedDouble(instr->left(), xmm2); 1600 LOperand* left = UseFixedDouble(instr->left(), xmm2);
1601 LOperand* right = exponent_type.IsDouble() ? 1601 LOperand* right = exponent_type.IsDouble() ?
1602 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx); 1602 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx);
1603 LPower* result = new(zone()) LPower(left, right); 1603 LPower* result = new(zone()) LPower(left, right);
1604 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, 1604 return MarkAsCall(DefineFixedDouble(result, xmm3), instr,
1605 CAN_DEOPTIMIZE_EAGERLY); 1605 CAN_DEOPTIMIZE_EAGERLY);
1606 } 1606 }
1607 1607
1608 1608
1609 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1610 ASSERT(instr->representation().IsDouble());
1611 ASSERT(instr->global_object()->representation().IsTagged());
1612 LOperand* global_object = UseTempRegister(instr->global_object());
1613 LOperand* scratch = TempRegister();
1614 LOperand* scratch2 = TempRegister();
1615 LOperand* scratch3 = TempRegister();
1616 LRandom* result = new(zone()) LRandom(
1617 global_object, scratch, scratch2, scratch3);
1618 return DefineFixedDouble(result, xmm1);
1619 }
1620
1621
1622 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1609 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1623 ASSERT(instr->left()->representation().IsTagged()); 1610 ASSERT(instr->left()->representation().IsTagged());
1624 ASSERT(instr->right()->representation().IsTagged()); 1611 ASSERT(instr->right()->representation().IsTagged());
1625 LOperand* context = UseFixed(instr->context(), rsi); 1612 LOperand* context = UseFixed(instr->context(), rsi);
1626 LOperand* left = UseFixed(instr->left(), rdx); 1613 LOperand* left = UseFixed(instr->left(), rdx);
1627 LOperand* right = UseFixed(instr->right(), rax); 1614 LOperand* right = UseFixed(instr->right(), rax);
1628 LCmpT* result = new(zone()) LCmpT(context, left, right); 1615 LCmpT* result = new(zone()) LCmpT(context, left, right);
1629 return MarkAsCall(DefineFixed(result, rax), instr); 1616 return MarkAsCall(DefineFixed(result, rax), instr);
1630 } 1617 }
1631 1618
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
2613 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2600 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2614 LOperand* object = UseRegister(instr->object()); 2601 LOperand* object = UseRegister(instr->object());
2615 LOperand* index = UseTempRegister(instr->index()); 2602 LOperand* index = UseTempRegister(instr->index());
2616 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2603 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2617 } 2604 }
2618 2605
2619 2606
2620 } } // namespace v8::internal 2607 } } // namespace v8::internal
2621 2608
2622 #endif // V8_TARGET_ARCH_X64 2609 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | test/cctest/test-weaktypedarrays.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698