Skip to contentSkip to conversation

target/arm: Make RETA[AB] UNDEF when pauth is not implemented

PATCH In review Solomon Tan 4 participants 4 messages Jun 16, 2025 – Jun 30, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 0ebbe9021254f ("target/arm: Convert BRA[AB]Z, BLR[AB]Z, RETA[AB] to decodetree")
---
 target/arm/tcg/translate-a64.c | 4 ++++
 1 file changed, 4 insertions(+)
target/arm/tcg/translate-a64.c +4 -0
index ac80f572a2..d0719b5665 100644
@@ -1816,6 +1816,10 @@ static bool trans_RETA(DisasContext *s, arg_reta *a)
 {
     TCGv_i64 dst;
 
+    if (!dc_isar_feature(aa64_pauth, s)) {
+        return false;
+    }
+
     dst = auth_branch_target(s, cpu_reg(s, 30), cpu_X[31], !a->m);
     gen_a64_set_pc(s, dst);
     s->base.is_jmp = DISAS_JUMP;
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Solomon Tan

According to the Arm A-profile A64 Instruction Set Architecture, RETA[AB] should be decoded as UNDEF if the pauth feature is not implemented.

Fixes 0ebbe9021254f ("target/arm: Convert BRA[AB]Z, BLR[AB]Z, RETA[AB] to decodetree")
Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
Reviewed-by on v1 1/1
#2 lore raw
In reply to Solomon Tan
Quoted 9 lines · Solomon Tan

According to the Arm A-profile A64 Instruction Set Architecture, RETA[AB] should be decoded as UNDEF if the pauth feature is not implemented.

Fixes 0ebbe9021254f ("target/arm: Convert BRA[AB]Z, BLR[AB]Z, RETA[AB] to decodetree")
---
  target/arm/tcg/translate-a64.c | 4 ++++
  1 file changed, 4 insertions(+)

r~

#3 lore raw
In reply to Solomon Tan
Quoted 10 lines · Solomon Tan

According to the Arm A-profile A64 Instruction Set Architecture, RETA[AB] should be decoded as UNDEF if the pauth feature is not implemented.

Fixes 0ebbe9021254f ("target/arm: Convert BRA[AB]Z, BLR[AB]Z, RETA[AB] to decodetree")
---
 target/arm/tcg/translate-a64.c | 4 ++++
 1 file changed, 4 insertions(+)

Thanks for your patch! I've applied it to target-arm.next, and it should get into upstream git within a week or so.

-- PMM