OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_S390 | 8 #if V8_TARGET_ARCH_S390 |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 } | 163 } |
164 | 164 |
165 void MacroAssembler::Call(Label* target) { b(r14, target); } | 165 void MacroAssembler::Call(Label* target) { b(r14, target); } |
166 | 166 |
167 void MacroAssembler::Push(Handle<Object> handle) { | 167 void MacroAssembler::Push(Handle<Object> handle) { |
168 mov(r0, Operand(handle)); | 168 mov(r0, Operand(handle)); |
169 push(r0); | 169 push(r0); |
170 } | 170 } |
171 | 171 |
172 void MacroAssembler::Move(Register dst, Handle<Object> value) { | 172 void MacroAssembler::Move(Register dst, Handle<Object> value) { |
173 AllowDeferredHandleDereference smi_check; | 173 mov(dst, Operand(value)); |
174 if (value->IsSmi()) { | |
175 LoadSmiLiteral(dst, reinterpret_cast<Smi*>(*value)); | |
176 } else { | |
177 DCHECK(value->IsHeapObject()); | |
178 if (isolate()->heap()->InNewSpace(*value)) { | |
179 Handle<Cell> cell = isolate()->factory()->NewCell(value); | |
180 mov(dst, Operand(cell)); | |
181 LoadP(dst, FieldMemOperand(dst, Cell::kValueOffset)); | |
182 } else { | |
183 mov(dst, Operand(value)); | |
184 } | |
185 } | |
186 } | 174 } |
187 | 175 |
188 void MacroAssembler::Move(Register dst, Register src, Condition cond) { | 176 void MacroAssembler::Move(Register dst, Register src, Condition cond) { |
189 if (!dst.is(src)) { | 177 if (!dst.is(src)) { |
190 LoadRR(dst, src); | 178 LoadRR(dst, src); |
191 } | 179 } |
192 } | 180 } |
193 | 181 |
194 void MacroAssembler::Move(DoubleRegister dst, DoubleRegister src) { | 182 void MacroAssembler::Move(DoubleRegister dst, DoubleRegister src) { |
195 if (!dst.is(src)) { | 183 if (!dst.is(src)) { |
(...skipping 5319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5515 } | 5503 } |
5516 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5504 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
5517 ExtractBit(r0, dividend, 31); | 5505 ExtractBit(r0, dividend, 31); |
5518 AddP(result, r0); | 5506 AddP(result, r0); |
5519 } | 5507 } |
5520 | 5508 |
5521 } // namespace internal | 5509 } // namespace internal |
5522 } // namespace v8 | 5510 } // namespace v8 |
5523 | 5511 |
5524 #endif // V8_TARGET_ARCH_S390 | 5512 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |