Skip to content

Commit ed4bad2

Browse files
wjsotaMichael Tokarev
authored andcommitted
target/arm: Make RETA[AB] UNDEF when pauth is not implemented
According to the Arm A-profile A64 Instruction Set Architecture, RETA[AB] should be decoded as UNDEF if the pauth feature is not implemented. We got this right in the initial implementation, but accidentally dropped the feature-check when we converted these insns to decodetree. Cc: [email protected] Fixes: 0ebbe90 ("target/arm: Convert BRA[AB]Z, BLR[AB]Z, RETA[AB] to decodetree") Signed-off-by: Solomon Tan <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]> (cherry picked from commit 9a3bf0e0ab628de7051b41a88c4628aa9e4d311b) Signed-off-by: Michael Tokarev <[email protected]>
1 parent 22909a1 commit ed4bad2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

target/arm/tcg/translate-a64.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,6 +1821,10 @@ static bool trans_RETA(DisasContext *s, arg_reta *a)
18211821
{
18221822
TCGv_i64 dst;
18231823

1824+
if (!dc_isar_feature(aa64_pauth, s)) {
1825+
return false;
1826+
}
1827+
18241828
dst = auth_branch_target(s, cpu_reg(s, 30), cpu_X[31], !a->m);
18251829
gen_a64_set_pc(s, dst);
18261830
s->base.is_jmp = DISAS_JUMP;

0 commit comments

Comments
 (0)