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 "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 __ vldr(i.OutputFloat64Register(), i.InputOffset()); | 1139 __ vldr(i.OutputFloat64Register(), i.InputOffset()); |
1140 DCHECK_EQ(LeaveCC, i.OutputSBit()); | 1140 DCHECK_EQ(LeaveCC, i.OutputSBit()); |
1141 break; | 1141 break; |
1142 case kArmVstrF64: { | 1142 case kArmVstrF64: { |
1143 size_t index = 0; | 1143 size_t index = 0; |
1144 MemOperand operand = i.InputOffset(&index); | 1144 MemOperand operand = i.InputOffset(&index); |
1145 __ vstr(i.InputFloat64Register(index), operand); | 1145 __ vstr(i.InputFloat64Register(index), operand); |
1146 DCHECK_EQ(LeaveCC, i.OutputSBit()); | 1146 DCHECK_EQ(LeaveCC, i.OutputSBit()); |
1147 break; | 1147 break; |
1148 } | 1148 } |
| 1149 case kArmFloat32Max: { |
| 1150 CpuFeatureScope scope(masm(), ARMv8); |
| 1151 // (b < a) ? a : b |
| 1152 SwVfpRegister a = i.InputFloat32Register(0); |
| 1153 SwVfpRegister b = i.InputFloat32Register(1); |
| 1154 SwVfpRegister result = i.OutputFloat32Register(0); |
| 1155 __ VFPCompareAndSetFlags(a, b); |
| 1156 __ vsel(gt, result, a, b); |
| 1157 break; |
| 1158 } |
| 1159 case kArmFloat32Min: { |
| 1160 CpuFeatureScope scope(masm(), ARMv8); |
| 1161 // (a < b) ? a : b |
| 1162 SwVfpRegister a = i.InputFloat32Register(0); |
| 1163 SwVfpRegister b = i.InputFloat32Register(1); |
| 1164 SwVfpRegister result = i.OutputFloat32Register(0); |
| 1165 __ VFPCompareAndSetFlags(b, a); |
| 1166 __ vsel(gt, result, a, b); |
| 1167 break; |
| 1168 } |
| 1169 case kArmFloat64Max: { |
| 1170 CpuFeatureScope scope(masm(), ARMv8); |
| 1171 // (b < a) ? a : b |
| 1172 DwVfpRegister a = i.InputFloat64Register(0); |
| 1173 DwVfpRegister b = i.InputFloat64Register(1); |
| 1174 DwVfpRegister result = i.OutputFloat64Register(0); |
| 1175 __ VFPCompareAndSetFlags(a, b); |
| 1176 __ vsel(gt, result, a, b); |
| 1177 break; |
| 1178 } |
| 1179 case kArmFloat64Min: { |
| 1180 CpuFeatureScope scope(masm(), ARMv8); |
| 1181 // (a < b) ? a : b |
| 1182 DwVfpRegister a = i.InputFloat64Register(0); |
| 1183 DwVfpRegister b = i.InputFloat64Register(1); |
| 1184 DwVfpRegister result = i.OutputFloat64Register(0); |
| 1185 __ VFPCompareAndSetFlags(b, a); |
| 1186 __ vsel(gt, result, a, b); |
| 1187 break; |
| 1188 } |
1149 case kArmPush: | 1189 case kArmPush: |
1150 if (instr->InputAt(0)->IsDoubleRegister()) { | 1190 if (instr->InputAt(0)->IsDoubleRegister()) { |
1151 __ vpush(i.InputDoubleRegister(0)); | 1191 __ vpush(i.InputDoubleRegister(0)); |
1152 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); | 1192 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
1153 } else { | 1193 } else { |
1154 __ push(i.InputRegister(0)); | 1194 __ push(i.InputRegister(0)); |
1155 frame_access_state()->IncreaseSPDelta(1); | 1195 frame_access_state()->IncreaseSPDelta(1); |
1156 } | 1196 } |
1157 DCHECK_EQ(LeaveCC, i.OutputSBit()); | 1197 DCHECK_EQ(LeaveCC, i.OutputSBit()); |
1158 break; | 1198 break; |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1583 padding_size -= v8::internal::Assembler::kInstrSize; | 1623 padding_size -= v8::internal::Assembler::kInstrSize; |
1584 } | 1624 } |
1585 } | 1625 } |
1586 } | 1626 } |
1587 | 1627 |
1588 #undef __ | 1628 #undef __ |
1589 | 1629 |
1590 } // namespace compiler | 1630 } // namespace compiler |
1591 } // namespace internal | 1631 } // namespace internal |
1592 } // namespace v8 | 1632 } // namespace v8 |
OLD | NEW |