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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 15932011: Don't explicitly pass requested representations to constants; implement ConstantS (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 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 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 } 1749 }
1750 } 1750 }
1751 1751
1752 1752
1753 void LCodeGen::DoConstantI(LConstantI* instr) { 1753 void LCodeGen::DoConstantI(LConstantI* instr) {
1754 ASSERT(instr->result()->IsRegister()); 1754 ASSERT(instr->result()->IsRegister());
1755 __ Set(ToRegister(instr->result()), Immediate(instr->value())); 1755 __ Set(ToRegister(instr->result()), Immediate(instr->value()));
1756 } 1756 }
1757 1757
1758 1758
1759 void LCodeGen::DoConstantS(LConstantS* instr) {
1760 ASSERT(instr->result()->IsRegister());
Jakob Kummerow 2013/05/29 10:12:53 We don't need this ASSERT; ToRegister(foo) does an
1761 __ Set(ToRegister(instr->result()), Immediate(instr->value()));
1762 }
1763
1764
1759 void LCodeGen::DoConstantD(LConstantD* instr) { 1765 void LCodeGen::DoConstantD(LConstantD* instr) {
1760 double v = instr->value(); 1766 double v = instr->value();
1761 uint64_t int_val = BitCast<uint64_t, double>(v); 1767 uint64_t int_val = BitCast<uint64_t, double>(v);
1762 int32_t lower = static_cast<int32_t>(int_val); 1768 int32_t lower = static_cast<int32_t>(int_val);
1763 int32_t upper = static_cast<int32_t>(int_val >> (kBitsPerInt)); 1769 int32_t upper = static_cast<int32_t>(int_val >> (kBitsPerInt));
1764 1770
1765 if (!CpuFeatures::IsSafeForSnapshot(SSE2)) { 1771 if (!CpuFeatures::IsSafeForSnapshot(SSE2)) {
1766 __ push(Immediate(lower)); 1772 __ push(Immediate(lower));
1767 __ push(Immediate(upper)); 1773 __ push(Immediate(upper));
1768 PushX87DoubleOperand(Operand(esp, 0)); 1774 PushX87DoubleOperand(Operand(esp, 0));
(...skipping 4812 matching lines...) Expand 10 before | Expand all | Expand 10 after
6581 FixedArray::kHeaderSize - kPointerSize)); 6587 FixedArray::kHeaderSize - kPointerSize));
6582 __ bind(&done); 6588 __ bind(&done);
6583 } 6589 }
6584 6590
6585 6591
6586 #undef __ 6592 #undef __
6587 6593
6588 } } // namespace v8::internal 6594 } } // namespace v8::internal
6589 6595
6590 #endif // V8_TARGET_ARCH_IA32 6596 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698