Skip to content

Commit

Permalink
fix slag instruction (#107559)
Browse files Browse the repository at this point in the history
Fixes #107387
The slag instructions throws an undefined behavior when moving from Float to Int in OP_MOVE_I4_TO_F
  • Loading branch information
saitama951 authored Sep 11, 2024
1 parent 171f1a7 commit 4930e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini-s390x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3471,7 +3471,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
s390_srag (code, ins->dreg, ins->dreg, 0, 32);
break;
case OP_MOVE_I4_TO_F:
s390_slag (code, s390_r0, ins->sreg1, 0, 32);
s390_sllg (code, s390_r0, ins->sreg1, 0, 32);
s390_ldgr (code, ins->dreg, s390_r0);
break;
case OP_FCONV_TO_R4:
Expand Down

0 comments on commit 4930e1b

Please sign in to comment.