summaryrefslogtreecommitdiff
path: root/src/jit
diff options
context:
space:
mode:
authorKyungwoo Lee <kyulee@microsoft.com>2016-03-15 06:38:04 -0700
committerKyungwoo Lee <kyulee@microsoft.com>2016-03-15 06:38:04 -0700
commit8dd698b8fdceacef651bd37e55a732ac0d60313c (patch)
tree3ff436bc8c0739801865cd3641cac1c30741c686 /src/jit
parent09574f9e24052b7d384f96a98769b02460e05d6d (diff)
parent140c27c56dddc48a14400f8e29b1a41f8a2daba5 (diff)
downloadcoreclr-8dd698b8fdceacef651bd37e55a732ac0d60313c.tar.gz
coreclr-8dd698b8fdceacef651bd37e55a732ac0d60313c.tar.bz2
coreclr-8dd698b8fdceacef651bd37e55a732ac0d60313c.zip
Merge pull request #3698 from kyulee1/Fixovf
ARM64: Fix genJumpToThrowHlpBlk
Diffstat (limited to 'src/jit')
-rw-r--r--src/jit/codegencommon.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp
index c7e0d6120e..e3c1052e86 100644
--- a/src/jit/codegencommon.cpp
+++ b/src/jit/codegencommon.cpp
@@ -2674,15 +2674,22 @@ void CodeGen::genJumpToThrowHlpBlk(emitJumpKind jumpKind,
/* The code to throw the exception will be generated inline, and
we will jump around it in the normal non-exception case */
- BasicBlock * tgtBlk = genCreateTempLabel();
- jumpKind = emitter::emitReverseJumpKind(jumpKind);
- inst_JMP(jumpKind, tgtBlk);
+ BasicBlock * tgtBlk = nullptr;
+ emitJumpKind reverseJumpKind = emitter::emitReverseJumpKind(jumpKind);
+ if (reverseJumpKind != jumpKind)
+ {
+ tgtBlk = genCreateTempLabel();
+ inst_JMP(reverseJumpKind, tgtBlk);
+ }
genEmitHelperCall(compiler->acdHelper(codeKind), 0, EA_UNKNOWN);
/* Define the spot for the normal non-exception case to jump to */
-
- genDefineTempLabel(tgtBlk);
+ if (tgtBlk != nullptr)
+ {
+ assert(reverseJumpKind != jumpKind);
+ genDefineTempLabel(tgtBlk);
+ }
}
}