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

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

Issue 82763005: Reland "Implement Math.random() purely in JavaScript" plus fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added assertion 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') | no next file » | 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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 ASSERT(instr->left()->representation().IsDouble()); 1594 ASSERT(instr->left()->representation().IsDouble());
1595 LOperand* left = UseFixedDouble(instr->left(), xmm2); 1595 LOperand* left = UseFixedDouble(instr->left(), xmm2);
1596 LOperand* right = exponent_type.IsDouble() ? 1596 LOperand* right = exponent_type.IsDouble() ?
1597 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx); 1597 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx);
1598 LPower* result = new(zone()) LPower(left, right); 1598 LPower* result = new(zone()) LPower(left, right);
1599 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, 1599 return MarkAsCall(DefineFixedDouble(result, xmm3), instr,
1600 CAN_DEOPTIMIZE_EAGERLY); 1600 CAN_DEOPTIMIZE_EAGERLY);
1601 } 1601 }
1602 1602
1603 1603
1604 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1605 ASSERT(instr->representation().IsDouble());
1606 ASSERT(instr->global_object()->representation().IsTagged());
1607 LOperand* global_object = UseTempRegister(instr->global_object());
1608 LOperand* scratch = TempRegister();
1609 LOperand* scratch2 = TempRegister();
1610 LOperand* scratch3 = TempRegister();
1611 LRandom* result = new(zone()) LRandom(
1612 global_object, scratch, scratch2, scratch3);
1613 return DefineFixedDouble(result, xmm1);
1614 }
1615
1616
1617 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1604 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1618 ASSERT(instr->left()->representation().IsTagged()); 1605 ASSERT(instr->left()->representation().IsTagged());
1619 ASSERT(instr->right()->representation().IsTagged()); 1606 ASSERT(instr->right()->representation().IsTagged());
1620 LOperand* context = UseFixed(instr->context(), rsi); 1607 LOperand* context = UseFixed(instr->context(), rsi);
1621 LOperand* left = UseFixed(instr->left(), rdx); 1608 LOperand* left = UseFixed(instr->left(), rdx);
1622 LOperand* right = UseFixed(instr->right(), rax); 1609 LOperand* right = UseFixed(instr->right(), rax);
1623 LCmpT* result = new(zone()) LCmpT(context, left, right); 1610 LCmpT* result = new(zone()) LCmpT(context, left, right);
1624 return MarkAsCall(DefineFixed(result, rax), instr); 1611 return MarkAsCall(DefineFixed(result, rax), instr);
1625 } 1612 }
1626 1613
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2608 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2622 LOperand* object = UseRegister(instr->object()); 2609 LOperand* object = UseRegister(instr->object());
2623 LOperand* index = UseTempRegister(instr->index()); 2610 LOperand* index = UseTempRegister(instr->index());
2624 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2611 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2625 } 2612 }
2626 2613
2627 2614
2628 } } // namespace v8::internal 2615 } } // namespace v8::internal
2629 2616
2630 #endif // V8_TARGET_ARCH_X64 2617 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698