OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 // Reserve space for the stack slots needed by the code. | 130 // Reserve space for the stack slots needed by the code. |
131 int slots = StackSlotCount(); | 131 int slots = StackSlotCount(); |
132 if (slots > 0) { | 132 if (slots > 0) { |
133 if (FLAG_debug_code) { | 133 if (FLAG_debug_code) { |
134 __ mov(r0, Operand(slots)); | 134 __ mov(r0, Operand(slots)); |
135 __ mov(r2, Operand(kSlotsZapValue)); | 135 __ mov(r2, Operand(kSlotsZapValue)); |
136 Label loop; | 136 Label loop; |
137 __ bind(&loop); | 137 __ bind(&loop); |
138 __ push(r2); | 138 __ push(r2); |
139 __ sub(r0, r0, Operand(1), SetCC); | 139 __ sub(r0, r0, Operand(1)); |
140 __ b(ne, &loop); | 140 __ b(ne, &loop); |
141 } else { | 141 } else { |
142 __ sub(sp, sp, Operand(slots * kPointerSize)); | 142 __ sub(sp, sp, Operand(slots * kPointerSize)); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 // Trace the call. | 146 // Trace the call. |
147 if (FLAG_trace) { | 147 if (FLAG_trace) { |
148 __ CallRuntime(Runtime::kTraceEnter, 0); | 148 __ CallRuntime(Runtime::kTraceEnter, 0); |
149 } | 149 } |
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 public: | 1726 public: |
1727 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) | 1727 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) |
1728 : LDeferredCode(codegen), instr_(instr) { } | 1728 : LDeferredCode(codegen), instr_(instr) { } |
1729 virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } | 1729 virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } |
1730 private: | 1730 private: |
1731 LNumberTagD* instr_; | 1731 LNumberTagD* instr_; |
1732 }; | 1732 }; |
1733 | 1733 |
1734 DoubleRegister input_reg = ToDoubleRegister(instr->input()); | 1734 DoubleRegister input_reg = ToDoubleRegister(instr->input()); |
1735 Register reg = ToRegister(instr->result()); | 1735 Register reg = ToRegister(instr->result()); |
1736 Register temp1 = ToRegister(instr->temp1()); | 1736 Register tmp = ToRegister(instr->temp()); |
1737 Register temp2 = ToRegister(instr->temp2()); | |
1738 Register scratch = r9; | 1737 Register scratch = r9; |
1739 | 1738 |
1740 DeferredNumberTagD* deferred = new DeferredNumberTagD(this, instr); | 1739 DeferredNumberTagD* deferred = new DeferredNumberTagD(this, instr); |
1741 if (FLAG_inline_new) { | 1740 if (FLAG_inline_new) { |
1742 __ LoadRoot(scratch, Heap::kHeapNumberMapRootIndex); | 1741 __ LoadRoot(scratch, Heap::kHeapNumberMapRootIndex); |
1743 __ AllocateHeapNumber(reg, temp1, temp2, scratch, deferred->entry()); | 1742 __ AllocateHeapNumber(reg, tmp, ip, scratch, deferred->entry()); |
1744 } else { | 1743 } else { |
1745 __ jmp(deferred->entry()); | 1744 __ jmp(deferred->entry()); |
1746 } | 1745 } |
1747 __ bind(deferred->exit()); | 1746 __ bind(deferred->exit()); |
1748 __ sub(ip, reg, Operand(kHeapObjectTag)); | 1747 __ sub(ip, reg, Operand(kHeapObjectTag)); |
1749 __ vstr(input_reg, ip, HeapNumber::kValueOffset); | 1748 __ vstr(input_reg, ip, HeapNumber::kValueOffset); |
1750 } | 1749 } |
1751 | 1750 |
1752 | 1751 |
1753 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { | 1752 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2138 | 2137 |
2139 | 2138 |
2140 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { | 2139 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { |
2141 Abort("DoOsrEntry unimplemented."); | 2140 Abort("DoOsrEntry unimplemented."); |
2142 } | 2141 } |
2143 | 2142 |
2144 | 2143 |
2145 #undef __ | 2144 #undef __ |
2146 | 2145 |
2147 } } // namespace v8::internal | 2146 } } // namespace v8::internal |
OLD | NEW |