| 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 3114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3125 // This should really move to be in macro-assembler as it | 3125 // This should really move to be in macro-assembler as it |
| 3126 // is really a pseudo instruction | 3126 // is really a pseudo instruction |
| 3127 // Some usages of this intend for a FIXED_SEQUENCE to be used | 3127 // Some usages of this intend for a FIXED_SEQUENCE to be used |
| 3128 // @TODO - break this dependency so we can optimize mov() in general | 3128 // @TODO - break this dependency so we can optimize mov() in general |
| 3129 // and only use the generic version when we require a fixed sequence | 3129 // and only use the generic version when we require a fixed sequence |
| 3130 void MacroAssembler::LoadRepresentation(Register dst, const MemOperand& mem, | 3130 void MacroAssembler::LoadRepresentation(Register dst, const MemOperand& mem, |
| 3131 Representation r, Register scratch) { | 3131 Representation r, Register scratch) { |
| 3132 DCHECK(!r.IsDouble()); | 3132 DCHECK(!r.IsDouble()); |
| 3133 if (r.IsInteger8()) { | 3133 if (r.IsInteger8()) { |
| 3134 LoadB(dst, mem); | 3134 LoadB(dst, mem); |
| 3135 lgbr(dst, dst); | |
| 3136 } else if (r.IsUInteger8()) { | 3135 } else if (r.IsUInteger8()) { |
| 3137 LoadlB(dst, mem); | 3136 LoadlB(dst, mem); |
| 3138 } else if (r.IsInteger16()) { | 3137 } else if (r.IsInteger16()) { |
| 3139 LoadHalfWordP(dst, mem, scratch); | 3138 LoadHalfWordP(dst, mem, scratch); |
| 3140 lghr(dst, dst); | |
| 3141 } else if (r.IsUInteger16()) { | 3139 } else if (r.IsUInteger16()) { |
| 3142 LoadHalfWordP(dst, mem, scratch); | 3140 LoadHalfWordP(dst, mem, scratch); |
| 3143 #if V8_TARGET_ARCH_S390X | 3141 #if V8_TARGET_ARCH_S390X |
| 3144 } else if (r.IsInteger32()) { | 3142 } else if (r.IsInteger32()) { |
| 3145 LoadW(dst, mem, scratch); | 3143 LoadW(dst, mem, scratch); |
| 3146 #endif | 3144 #endif |
| 3147 } else { | 3145 } else { |
| 3148 LoadP(dst, mem, scratch); | 3146 LoadP(dst, mem, scratch); |
| 3149 } | 3147 } |
| 3150 } | 3148 } |
| (...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5141 } | 5139 } |
| 5142 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5140 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
| 5143 ExtractBit(r0, dividend, 31); | 5141 ExtractBit(r0, dividend, 31); |
| 5144 AddP(result, r0); | 5142 AddP(result, r0); |
| 5145 } | 5143 } |
| 5146 | 5144 |
| 5147 } // namespace internal | 5145 } // namespace internal |
| 5148 } // namespace v8 | 5146 } // namespace v8 |
| 5149 | 5147 |
| 5150 #endif // V8_TARGET_ARCH_S390 | 5148 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |