Skip to content

Commit b0f4e63

Browse files
author
jake
committed
Scale SRO LD.H by 2
Same format as ST.H a couple lines below. Per the aurix manual: D[15] = sign_ext(M(A[b] + zero_ext(2 * off4), half-word));
1 parent 7c5db94 commit b0f4e63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

qemu/target/tricore/translate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4169,7 +4169,7 @@ static void decode_sro_opc(DisasContext *ctx, int op1)
41694169
gen_offset_ld(ctx, tcg_ctx->cpu_gpr_d[15], tcg_ctx->cpu_gpr_a[r2], address, MO_UB);
41704170
break;
41714171
case OPC1_16_SRO_LD_H:
4172-
gen_offset_ld(ctx, tcg_ctx->cpu_gpr_d[15], tcg_ctx->cpu_gpr_a[r2], address, MO_LESW);
4172+
gen_offset_ld(ctx, tcg_ctx->cpu_gpr_d[15], tcg_ctx->cpu_gpr_a[r2], address * 2, MO_LESW);
41734173
break;
41744174
case OPC1_16_SRO_LD_W:
41754175
gen_offset_ld(ctx, tcg_ctx->cpu_gpr_d[15], tcg_ctx->cpu_gpr_a[r2], address * 4, MO_LESL);

0 commit comments

Comments
 (0)