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

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

Issue 2070583002: S390: [turbofan] Prevent storing signalling NaNs into holey double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/compiler/s390/instruction-codes-s390.h » ('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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 do { \ 389 do { \
390 /* TODO(bmeurer): We should really get rid of this special instruction, */ \ 390 /* TODO(bmeurer): We should really get rid of this special instruction, */ \
391 /* and generate a CallAddress instruction instead. */ \ 391 /* and generate a CallAddress instruction instead. */ \
392 FrameScope scope(masm(), StackFrame::MANUAL); \ 392 FrameScope scope(masm(), StackFrame::MANUAL); \
393 __ PrepareCallCFunction(0, 1, kScratchReg); \ 393 __ PrepareCallCFunction(0, 1, kScratchReg); \
394 __ MovToFloatParameter(i.InputDoubleRegister(0)); \ 394 __ MovToFloatParameter(i.InputDoubleRegister(0)); \
395 __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \ 395 __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \
396 0, 1); \ 396 0, 1); \
397 /* Move the result in the double result register. */ \ 397 /* Move the result in the double result register. */ \
398 __ MovFromFloatResult(i.OutputDoubleRegister()); \ 398 __ MovFromFloatResult(i.OutputDoubleRegister()); \
399 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \
400 } while (0) 399 } while (0)
401 400
402 #define ASSEMBLE_IEEE754_BINOP(name) \ 401 #define ASSEMBLE_IEEE754_BINOP(name) \
403 do { \ 402 do { \
404 /* TODO(bmeurer): We should really get rid of this special instruction, */ \ 403 /* TODO(bmeurer): We should really get rid of this special instruction, */ \
405 /* and generate a CallAddress instruction instead. */ \ 404 /* and generate a CallAddress instruction instead. */ \
406 FrameScope scope(masm(), StackFrame::MANUAL); \ 405 FrameScope scope(masm(), StackFrame::MANUAL); \
407 __ PrepareCallCFunction(0, 2, kScratchReg); \ 406 __ PrepareCallCFunction(0, 2, kScratchReg); \
408 __ MovToFloatParameters(i.InputDoubleRegister(0), \ 407 __ MovToFloatParameters(i.InputDoubleRegister(0), \
409 i.InputDoubleRegister(1)); \ 408 i.InputDoubleRegister(1)); \
410 __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \ 409 __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \
411 0, 2); \ 410 0, 2); \
412 /* Move the result in the double result register. */ \ 411 /* Move the result in the double result register. */ \
413 __ MovFromFloatResult(i.OutputDoubleRegister()); \ 412 __ MovFromFloatResult(i.OutputDoubleRegister()); \
414 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \
415 } while (0) 413 } while (0)
416 414
417 #define ASSEMBLE_FLOAT_MAX(double_scratch_reg, general_scratch_reg) \ 415 #define ASSEMBLE_FLOAT_MAX(double_scratch_reg, general_scratch_reg) \
418 do { \ 416 do { \
419 Label ge, done; \ 417 Label ge, done; \
420 __ cdbr(i.InputDoubleRegister(0), i.InputDoubleRegister(1)); \ 418 __ cdbr(i.InputDoubleRegister(0), i.InputDoubleRegister(1)); \
421 __ bge(&ge, Label::kNear); \ 419 __ bge(&ge, Label::kNear); \
422 __ Move(i.OutputDoubleRegister(), i.InputDoubleRegister(1)); \ 420 __ Move(i.OutputDoubleRegister(), i.InputDoubleRegister(1)); \
423 __ b(&done, Label::kNear); \ 421 __ b(&done, Label::kNear); \
424 __ bind(&ge); \ 422 __ bind(&ge); \
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 break; 1336 break;
1339 #if V8_TARGET_ARCH_S390X 1337 #if V8_TARGET_ARCH_S390X
1340 case kS390_Tst64: 1338 case kS390_Tst64:
1341 if (HasRegisterInput(instr, 1)) { 1339 if (HasRegisterInput(instr, 1)) {
1342 __ AndP(r0, i.InputRegister(0), i.InputRegister(1)); 1340 __ AndP(r0, i.InputRegister(0), i.InputRegister(1));
1343 } else { 1341 } else {
1344 __ AndP(r0, i.InputRegister(0), i.InputImmediate(1)); 1342 __ AndP(r0, i.InputRegister(0), i.InputImmediate(1));
1345 } 1343 }
1346 break; 1344 break;
1347 #endif 1345 #endif
1346 case kS390_Float64SilenceNaN: {
1347 DoubleRegister value = i.InputDoubleRegister(0);
1348 DoubleRegister result = i.OutputDoubleRegister();
1349 __ CanonicalizeNaN(result, value);
1350 break;
1351 }
1348 case kS390_Push: 1352 case kS390_Push:
1349 if (instr->InputAt(0)->IsFPRegister()) { 1353 if (instr->InputAt(0)->IsFPRegister()) {
1350 __ lay(sp, MemOperand(sp, -kDoubleSize)); 1354 __ lay(sp, MemOperand(sp, -kDoubleSize));
1351 __ StoreDouble(i.InputDoubleRegister(0), MemOperand(sp)); 1355 __ StoreDouble(i.InputDoubleRegister(0), MemOperand(sp));
1352 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); 1356 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize);
1353 } else { 1357 } else {
1354 __ Push(i.InputRegister(0)); 1358 __ Push(i.InputRegister(0));
1355 frame_access_state()->IncreaseSPDelta(1); 1359 frame_access_state()->IncreaseSPDelta(1);
1356 } 1360 }
1357 break; 1361 break;
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 padding_size -= 2; 2199 padding_size -= 2;
2196 } 2200 }
2197 } 2201 }
2198 } 2202 }
2199 2203
2200 #undef __ 2204 #undef __
2201 2205
2202 } // namespace compiler 2206 } // namespace compiler
2203 } // namespace internal 2207 } // namespace internal
2204 } // namespace v8 2208 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/s390/instruction-codes-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698