aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop-manip.cc
diff options
context:
space:
mode:
authorYunQiang Su <syq@gcc.gnu.org>2024-01-15 09:28:51 +0800
committerYunQiang Su <syq@gcc.gnu.org>2024-01-17 10:38:04 +0800
commitb503c8787503943c2738058828c3d0037d024fea (patch)
tree92267127e89b8e0b5f4d32507f4350a150a6b5ba /gcc/tree-vect-loop-manip.cc
parentfce3f51f9c252c2650b2bf90401c72cda0eae088 (diff)
downloadgcc-b503c8787503943c2738058828c3d0037d024fea.zip
gcc-b503c8787503943c2738058828c3d0037d024fea.tar.gz
gcc-b503c8787503943c2738058828c3d0037d024fea.tar.bz2
MIPS: avoid $gp store if global_pointer is not $gp
$GP is used for expanding GOT load, but in the afterward passes, a temporary register is tried to replace $gp. If sucess, we have no need to store and reload $gp. The example of failure is that the function calls a preemtive function. We shouldn't use $GP for any other purpose in the code we generate. If a user's inline asm code clobbers $GP, it's their duty to save and restore $GP. gcc * config/mips/mips.cc (mips_compute_frame_info): If another register is used as global_pointer, mark $GP live false. gcc/testsuite * gcc.target/mips/mips.exp (mips_option_groups): Add -mxgot/-mno-xgot options. * gcc.target/mips/xgot-n32-avoid-gp.c: New test. * gcc.target/mips/xgot-n32-need-gp.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
0 files changed, 0 insertions, 0 deletions