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

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

Issue 12082043: Unbreak non-SSE2 ia32 platforms. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 7 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 | « no previous file | src/ia32/lithium-ia32.h » ('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 4568 matching lines...) Expand 10 before | Expand all | Expand 10 after
4579 } else { 4579 } else {
4580 __ push(reg); 4580 __ push(reg);
4581 __ fild_s(Operand(esp, 0)); 4581 __ fild_s(Operand(esp, 0));
4582 __ pop(reg); 4582 __ pop(reg);
4583 } 4583 }
4584 } else { 4584 } else {
4585 if (CpuFeatures::IsSupported(SSE2)) { 4585 if (CpuFeatures::IsSupported(SSE2)) {
4586 CpuFeatures::Scope feature_scope(SSE2); 4586 CpuFeatures::Scope feature_scope(SSE2);
4587 __ LoadUint32(xmm0, reg, xmm1); 4587 __ LoadUint32(xmm0, reg, xmm1);
4588 } else { 4588 } else {
4589 UNREACHABLE(); 4589 // There's no fild variant for unsigned values, so zero-extend to a 64-bit
4590 // int manually.
4591 __ push(Immediate(0));
4592 __ push(reg);
4593 __ fild_d(Operand(esp, 0));
4594 __ pop(reg);
4595 __ pop(reg);
4590 } 4596 }
4591 } 4597 }
4592 4598
4593 if (FLAG_inline_new) { 4599 if (FLAG_inline_new) {
4594 __ AllocateHeapNumber(reg, tmp, no_reg, &slow); 4600 __ AllocateHeapNumber(reg, tmp, no_reg, &slow);
4595 __ jmp(&done, Label::kNear); 4601 __ jmp(&done, Label::kNear);
4596 } 4602 }
4597 4603
4598 // Slow case: Call the runtime system to do the number allocation. 4604 // Slow case: Call the runtime system to do the number allocation.
4599 __ bind(&slow); 4605 __ bind(&slow);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
4631 public: 4637 public:
4632 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) 4638 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
4633 : LDeferredCode(codegen), instr_(instr) { } 4639 : LDeferredCode(codegen), instr_(instr) { }
4634 virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } 4640 virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); }
4635 virtual LInstruction* instr() { return instr_; } 4641 virtual LInstruction* instr() { return instr_; }
4636 private: 4642 private:
4637 LNumberTagD* instr_; 4643 LNumberTagD* instr_;
4638 }; 4644 };
4639 4645
4640 Register reg = ToRegister(instr->result()); 4646 Register reg = ToRegister(instr->result());
4641 Register tmp = ToRegister(instr->temp());
4642 4647
4643 DeferredNumberTagD* deferred = new(zone()) DeferredNumberTagD(this, instr); 4648 DeferredNumberTagD* deferred = new(zone()) DeferredNumberTagD(this, instr);
4644 if (FLAG_inline_new) { 4649 if (FLAG_inline_new) {
4650 Register tmp = ToRegister(instr->temp());
4645 __ AllocateHeapNumber(reg, tmp, no_reg, deferred->entry()); 4651 __ AllocateHeapNumber(reg, tmp, no_reg, deferred->entry());
4646 } else { 4652 } else {
4647 __ jmp(deferred->entry()); 4653 __ jmp(deferred->entry());
4648 } 4654 }
4649 __ bind(deferred->exit()); 4655 __ bind(deferred->exit());
4650 if (CpuFeatures::IsSupported(SSE2)) { 4656 if (CpuFeatures::IsSupported(SSE2)) {
4651 CpuFeatures::Scope scope(SSE2); 4657 CpuFeatures::Scope scope(SSE2);
4652 XMMRegister input_reg = ToDoubleRegister(instr->value()); 4658 XMMRegister input_reg = ToDoubleRegister(instr->value());
4653 __ movdbl(FieldOperand(reg, HeapNumber::kValueOffset), input_reg); 4659 __ movdbl(FieldOperand(reg, HeapNumber::kValueOffset), input_reg);
4654 } else { 4660 } else {
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after
5975 FixedArray::kHeaderSize - kPointerSize)); 5981 FixedArray::kHeaderSize - kPointerSize));
5976 __ bind(&done); 5982 __ bind(&done);
5977 } 5983 }
5978 5984
5979 5985
5980 #undef __ 5986 #undef __
5981 5987
5982 } } // namespace v8::internal 5988 } } // namespace v8::internal
5983 5989
5984 #endif // V8_TARGET_ARCH_IA32 5990 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698