From 4850c88171a9970890ecf3d5fca1c0c7258b465e Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Wed, 12 Oct 2022 13:17:15 +0200 Subject: [PATCH] [mono][s390x] Fix wrong implementation of OP_CHECK_THIS (#76916) * Only access a single byte in memory for OP_CHECK_THIS * Remove unnecessary ltgr instruction * Fixes https://github.com/dotnet/runtime/issues/76915 --- src/mono/mono/mini/mini-s390x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mono/mono/mini/mini-s390x.c b/src/mono/mono/mini/mini-s390x.c index 7c7a936ed9701..26e6ba1d32a3b 100644 --- a/src/mono/mono/mini/mini-s390x.c +++ b/src/mono/mono/mini/mini-s390x.c @@ -3594,8 +3594,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) break; case OP_CHECK_THIS: { /* ensure ins->sreg1 is not NULL */ - s390_lg (code, s390_r0, 0, ins->sreg1, 0); - s390_ltgr (code, s390_r0, s390_r0); + s390_llgc (code, s390_r0, 0, ins->sreg1, 0); } break; case OP_ARGLIST: {