Skip to content

Commit

Permalink
target/arm: Implement MVE LCTP
Browse files Browse the repository at this point in the history
Implement the MVE LCTP instruction.

We put its decode and implementation with the other
low-overhead-branch insns because although it is only present if MVE
is implemented it is logically in the same group as the other LOB
insns.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: [email protected]
  • Loading branch information
pm215 committed Jun 16, 2021
1 parent 9a48685 commit 76c32d7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions target/arm/t32.decode
Original file line number Diff line number Diff line change
Expand Up @@ -674,5 +674,7 @@ BL 1111 0. .......... 11.1 ............ @branch24
DLS 1111 0 0000 100 rn:4 1110 0000 0000 0001
WLS 1111 0 0000 100 rn:4 1100 . .......... 1 imm=%lob_imm
LE 1111 0 0000 0 f:1 0 1111 1100 . .......... 1 imm=%lob_imm

LCTP 1111 0 0000 000 1111 1110 0000 0000 0001
]
}
24 changes: 24 additions & 0 deletions target/arm/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -8191,6 +8191,30 @@ static bool trans_LE(DisasContext *s, arg_LE *a)
return true;
}

static bool trans_LCTP(DisasContext *s, arg_LCTP *a)
{
/*
* M-profile Loop Clear with Tail Predication. Since our implementation
* doesn't cache branch information, all we need to do is reset
* FPSCR.LTPSIZE to 4.
*/
TCGv_i32 ltpsize;

if (!dc_isar_feature(aa32_lob, s) ||
!dc_isar_feature(aa32_mve, s)) {
return false;
}

if (!vfp_access_check(s)) {
return true;
}

ltpsize = tcg_const_i32(4);
store_cpu_field(ltpsize, v7m.ltpsize);
return true;
}


static bool op_tbranch(DisasContext *s, arg_tbranch *a, bool half)
{
TCGv_i32 addr, tmp;
Expand Down

0 comments on commit 76c32d7

Please sign in to comment.