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

Side by Side Diff: src/compiler/s390/code-generator-s390.cc

Issue 1853973002: S390: Use FIEBRA/FIDBRA for FP Floor/Ceil (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | src/s390/disasm-s390.cc » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 __ ltgr(i.OutputRegister(), r0); // Copy R0: Remainder to output 1196 __ ltgr(i.OutputRegister(), r0); // Copy R0: Remainder to output
1197 break; 1197 break;
1198 #endif 1198 #endif
1199 case kS390_AbsFloat: 1199 case kS390_AbsFloat:
1200 __ lpebr(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1200 __ lpebr(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1201 break; 1201 break;
1202 case kS390_SqrtFloat: 1202 case kS390_SqrtFloat:
1203 ASSEMBLE_FLOAT_UNOP(sqebr); 1203 ASSEMBLE_FLOAT_UNOP(sqebr);
1204 break; 1204 break;
1205 case kS390_FloorFloat: 1205 case kS390_FloorFloat:
1206 // ASSEMBLE_FLOAT_UNOP_RC(frim); 1206 __ fiebra(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1207 __ FloatFloor32(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1207 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_NEG_INF);
1208 kScratchReg);
1209 break; 1208 break;
1210 case kS390_CeilFloat: 1209 case kS390_CeilFloat:
1211 __ FloatCeiling32(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1210 __ fiebra(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1212 kScratchReg, kScratchDoubleReg); 1211 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_POS_INF);
1213 break; 1212 break;
1214 case kS390_TruncateFloat: 1213 case kS390_TruncateFloat:
1215 __ fiebra(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1214 __ fiebra(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1216 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_0); 1215 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_0);
1217 break; 1216 break;
1218 // Double operations 1217 // Double operations
1219 case kS390_ModDouble: 1218 case kS390_ModDouble:
1220 ASSEMBLE_FLOAT_MODULO(); 1219 ASSEMBLE_FLOAT_MODULO();
1221 break; 1220 break;
1222 case kS390_Neg: 1221 case kS390_Neg:
1223 __ LoadComplementRR(i.OutputRegister(), i.InputRegister(0)); 1222 __ LoadComplementRR(i.OutputRegister(), i.InputRegister(0));
1224 break; 1223 break;
1225 case kS390_MaxDouble: 1224 case kS390_MaxDouble:
1226 ASSEMBLE_FLOAT_MAX(kScratchDoubleReg, kScratchReg); 1225 ASSEMBLE_FLOAT_MAX(kScratchDoubleReg, kScratchReg);
1227 break; 1226 break;
1228 case kS390_MinDouble: 1227 case kS390_MinDouble:
1229 ASSEMBLE_FLOAT_MIN(kScratchDoubleReg, kScratchReg); 1228 ASSEMBLE_FLOAT_MIN(kScratchDoubleReg, kScratchReg);
1230 break; 1229 break;
1231 case kS390_AbsDouble: 1230 case kS390_AbsDouble:
1232 __ lpdbr(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1231 __ lpdbr(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1233 break; 1232 break;
1234 case kS390_SqrtDouble: 1233 case kS390_SqrtDouble:
1235 ASSEMBLE_FLOAT_UNOP(sqdbr); 1234 ASSEMBLE_FLOAT_UNOP(sqdbr);
1236 break; 1235 break;
1237 case kS390_FloorDouble: 1236 case kS390_FloorDouble:
1238 __ FloatFloor64(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1237 __ fidbra(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1239 kScratchReg); 1238 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_NEG_INF);
1240 break; 1239 break;
1241 case kS390_CeilDouble: 1240 case kS390_CeilDouble:
1242 __ FloatCeiling64(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1241 __ fidbra(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1243 kScratchReg, kScratchDoubleReg); 1242 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_POS_INF);
1244 break; 1243 break;
1245 case kS390_TruncateDouble: 1244 case kS390_TruncateDouble:
1246 __ fidbra(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1245 __ fidbra(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1247 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_0); 1246 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_0);
1248 break; 1247 break;
1249 case kS390_RoundDouble: 1248 case kS390_RoundDouble:
1250 __ fidbra(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1249 __ fidbra(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1251 v8::internal::Assembler::FIDBRA_ROUND_TO_NEAREST_AWAY_FROM_0); 1250 v8::internal::Assembler::FIDBRA_ROUND_TO_NEAREST_AWAY_FROM_0);
1252 break; 1251 break;
1253 case kS390_NegDouble: 1252 case kS390_NegDouble:
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 padding_size -= 2; 2077 padding_size -= 2;
2079 } 2078 }
2080 } 2079 }
2081 } 2080 }
2082 2081
2083 #undef __ 2082 #undef __
2084 2083
2085 } // namespace compiler 2084 } // namespace compiler
2086 } // namespace internal 2085 } // namespace internal
2087 } // namespace v8 2086 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/s390/disasm-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698