aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@vrull.eu>2024-05-01 18:50:38 +0200
committerChristoph Müllner <christoph.muellner@vrull.eu>2024-05-15 13:01:45 +0200
commit04cd8ccaec90405ccf7471252c0e06ba7f5437dc (patch)
treefe9aa87be1536132a28197a3e9f15ae5e61c4869 /gcc/cp/parser.cc
parent00029408387e9cc64e135324c22d15cd5a70e946 (diff)
downloadgcc-04cd8ccaec90405ccf7471252c0e06ba7f5437dc.zip
gcc-04cd8ccaec90405ccf7471252c0e06ba7f5437dc.tar.gz
gcc-04cd8ccaec90405ccf7471252c0e06ba7f5437dc.tar.bz2
RISC-V: Allow unaligned accesses in cpymemsi expansion
The RISC-V cpymemsi expansion is called, whenever the by-pieces infrastructure will not take care of the builtin expansion. The code emitted by the by-pieces infrastructure may emits code, that includes unaligned accesses if riscv_slow_unaligned_access_p is false. The RISC-V cpymemsi expansion is handled via riscv_expand_block_move(). The current implementation of this function does not check riscv_slow_unaligned_access_p and never emits unaligned accesses. Since by-pieces emits unaligned accesses, it is reasonable to implement the same behaviour in the cpymemsi expansion. And that's what this patch is doing. The patch checks riscv_slow_unaligned_access_p at the entry and sets the allowed alignment accordingly. This alignment is then propagated down to the routines that emit the actual instructions. The changes introduced by this patch can be seen in the adjustments of the cpymem tests. gcc/ChangeLog: * config/riscv/riscv-string.cc (riscv_block_move_straight): Add parameter align. (riscv_adjust_block_mem): Replace parameter length by align. (riscv_block_move_loop): Add parameter align. (riscv_expand_block_move_scalar): Set alignment properly if the target has fast unaligned access. gcc/testsuite/ChangeLog: * gcc.target/riscv/cpymem-32-ooo.c: Adjust for unaligned access. * gcc.target/riscv/cpymem-64-ooo.c: Likewise. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions