Skip to content

Commit

Permalink
arm64/sme: Manually encode ZT0 load and store instructions
Browse files Browse the repository at this point in the history
In order to avoid unrealistic toolchain requirements we manually encode the
instructions for loading and storing ZT0.

Signed-off-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
broonie authored and ctmarinas committed Jan 20, 2023
1 parent 8ef5560 commit 2cdeecd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions arch/arm64/include/asm/fpsimdmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,28 @@
| ((\offset) & 7)
.endm

/*
* LDR (ZT0)
*
* LDR ZT0, nx
*/
.macro _ldr_zt nx
_check_general_reg \nx
.inst 0xe11f8000 \
| (\nx << 5)
.endm

/*
* STR (ZT0)
*
* STR ZT0, nx
*/
.macro _str_zt nx
_check_general_reg \nx
.inst 0xe13f8000 \
| (\nx << 5)
.endm

/*
* Zero the entire ZA array
* ZERO ZA
Expand Down

0 comments on commit 2cdeecd

Please sign in to comment.