summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPat Gavlin <pgavlin@gmail.com>2017-05-25 14:35:24 -0700
committerGitHub <noreply@github.com>2017-05-25 14:35:24 -0700
commita30462946d3bc1e3f829adc05cae459cea8f130e (patch)
treeac6bdb4378564efb569e2371a7a0d53f8077c613 /src
parent7ca2692405f255ce4a87d2c3ec263d938cf274fc (diff)
parentda9da2996d04b76ffb210013f4a2254eb5262ca4 (diff)
downloadcoreclr-a30462946d3bc1e3f829adc05cae459cea8f130e.tar.gz
coreclr-a30462946d3bc1e3f829adc05cae459cea8f130e.tar.bz2
coreclr-a30462946d3bc1e3f829adc05cae459cea8f130e.zip
Merge pull request #11880 from mskvortsov/FixSetRegToCond
[RyuJIT/arm32] Fix genRegSetToCond() for FP case
Diffstat (limited to 'src')
-rw-r--r--src/jit/codegenarm.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/jit/codegenarm.cpp b/src/jit/codegenarm.cpp
index fa9dcc2a5d..124e99448b 100644
--- a/src/jit/codegenarm.cpp
+++ b/src/jit/codegenarm.cpp
@@ -1597,7 +1597,8 @@ void CodeGen::genSetRegToCond(regNumber dstReg, GenTreePtr tree)
{
// Emit code like that:
// ...
- // bgt True
+ // beq True
+ // bvs True ; this second branch is typically absent
// movs rD, #0
// b Next
// True:
@@ -1605,11 +1606,17 @@ void CodeGen::genSetRegToCond(regNumber dstReg, GenTreePtr tree)
// Next:
// ...
- CompareKind compareKind = ((tree->gtFlags & GTF_UNSIGNED) != 0) ? CK_UNSIGNED : CK_SIGNED;
- emitJumpKind jmpKind = genJumpKindForOper(tree->gtOper, compareKind);
+ emitJumpKind jumpKind[2];
+ bool branchToTrueLabel[2];
+ genJumpKindsForTree(tree, jumpKind, branchToTrueLabel);
BasicBlock* labelTrue = genCreateTempLabel();
- getEmitter()->emitIns_J(emitter::emitJumpKindToIns(jmpKind), labelTrue);
+ getEmitter()->emitIns_J(emitter::emitJumpKindToIns(jumpKind[0]), labelTrue);
+
+ if (jumpKind[1] != EJ_NONE)
+ {
+ getEmitter()->emitIns_J(emitter::emitJumpKindToIns(jumpKind[1]), labelTrue);
+ }
getEmitter()->emitIns_R_I(INS_mov, emitActualTypeSize(tree->gtType), dstReg, 0);