Skip to content

Commit

Permalink
target/arm: Implement the CPY* instructions
Browse files Browse the repository at this point in the history
The FEAT_MOPS CPY* instructions implement memory copies. These
come in both "always forwards" (memcpy-style) and "overlap OK"
(memmove-style) flavours.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230912140434.1333369-12-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Sep 21, 2023
1 parent 69c51dc commit 5d7b37b
Show file tree
Hide file tree
Showing 4 changed files with 535 additions and 0 deletions.
14 changes: 14 additions & 0 deletions target/arm/tcg/a64.decode
Original file line number Diff line number Diff line change
Expand Up @@ -575,3 +575,17 @@ SETE 00 011001110 ..... 10 . . 01 ..... ..... @set
SETGP 00 011101110 ..... 00 . . 01 ..... ..... @set
SETGM 00 011101110 ..... 01 . . 01 ..... ..... @set
SETGE 00 011101110 ..... 10 . . 01 ..... ..... @set

# Memmove/Memcopy: the CPY insns allow overlapping src/dest and
# copy in the correct direction; the CPYF insns always copy forwards.
#
# options has the nontemporal and unpriv bits for src and dest
&cpy rs rn rd options
@cpy .. ... . ..... rs:5 options:4 .. rn:5 rd:5 &cpy

CPYFP 00 011 0 01000 ..... .... 01 ..... ..... @cpy
CPYFM 00 011 0 01010 ..... .... 01 ..... ..... @cpy
CPYFE 00 011 0 01100 ..... .... 01 ..... ..... @cpy
CPYP 00 011 1 01000 ..... .... 01 ..... ..... @cpy
CPYM 00 011 1 01010 ..... .... 01 ..... ..... @cpy
CPYE 00 011 1 01100 ..... .... 01 ..... ..... @cpy

0 comments on commit 5d7b37b

Please sign in to comment.