diff options
author | YunQiang Su <yunqiang.su@cipunited.com> | 2023-05-31 17:55:50 +0800 |
---|---|---|
committer | YunQiang Su <yunqiang.su@cipunited.com> | 2023-07-05 17:26:02 +0800 |
commit | 5f5e37dcbc19cbbaec58789fc532cb9940413258 (patch) | |
tree | 49a8ebc71361f0cce79e88ad5cb1f13af7b0bb90 /gcc/lto | |
parent | a9c6db31cbe9bedd2dde1c50a7007a67750a0f50 (diff) | |
download | gcc-5f5e37dcbc19cbbaec58789fc532cb9940413258.zip gcc-5f5e37dcbc19cbbaec58789fc532cb9940413258.tar.gz gcc-5f5e37dcbc19cbbaec58789fc532cb9940413258.tar.bz2 |
MIPS: Use unaligned access to expand block_move on r6
MIPSr6 support unaligned memory access with normal lh/sh/lw/sw/ld/sd
instructions, and thus lwl/lwr/ldl/ldr and swl/swr/sdl/sdr is removed.
For microarchitecture, these memory access instructions issue 2
operation if the address is not aligned, which is like what lwl family
do.
For some situation (such as accessing boundary of pages) on some
microarchitectures, the unaligned access may not be good enough,
then the kernel should trap&emu it: the kernel may need
-mno-unalgined-access option.
gcc/
* config/mips/mips.cc (mips_expand_block_move): don't expand for
r6 with -mno-unaligned-access option if one or both of src and
dest are unaligned. restruct: return directly if length is not const.
(mips_block_move_straight): emit_move if ISA_HAS_UNALIGNED_ACCESS.
gcc/testsuite/
* gcc.target/mips/expand-block-move-r6-no-unaligned.c: new test.
* gcc.target/mips/expand-block-move-r6.c: new test.
Diffstat (limited to 'gcc/lto')
0 files changed, 0 insertions, 0 deletions