From a9a421e19912771fbf945624c8e878e4074f6b92 Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Thu, 17 Sep 2015 00:12:57 +0000 Subject: [PATCH] re PR target/67573 ([SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra) PR target/67573 * config/sh/sh.md: Add early clobber to scratch operand of *call_*pcrel insn_and_split so not to CSE scratch reg. From-SVN: r227837 --- gcc/ChangeLog | 7 +++++++ gcc/config/sh/sh.md | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f2432e252e7..babc86b28e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-09-16 Kaz Kojima + + PR target/67573 + * config/sh/sh.md (call_pcrel): Add early clobber to scratch + operand. + (call_value_pcrel, sibcall_pcrel, sibcall_value_pcrel): Likewise. + 2015-09-16 Manuel López-Ibáñez * toplev.h (check_global_declaration): Remove declaration. diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 4e7cd169f84..659c4c78b30 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -9464,7 +9464,7 @@ label: (use (reg:SI FPSCR_MODES_REG)) (use (reg:SI PIC_REG)) (clobber (reg:SI PR_REG)) - (clobber (match_scratch:SI 2 "=r"))] + (clobber (match_scratch:SI 2 "=&r"))] "TARGET_SH2" "#" "reload_completed" @@ -9595,7 +9595,7 @@ label: (use (reg:SI FPSCR_MODES_REG)) (use (reg:SI PIC_REG)) (clobber (reg:SI PR_REG)) - (clobber (match_scratch:SI 3 "=r"))] + (clobber (match_scratch:SI 3 "=&r"))] "TARGET_SH2" "#" "reload_completed" @@ -9993,7 +9993,7 @@ label: [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "")) (match_operand 1 "" "")) (use (reg:SI FPSCR_MODES_REG)) - (clobber (match_scratch:SI 2 "=k")) + (clobber (match_scratch:SI 2 "=&k")) (return)] "TARGET_SH2" "#" @@ -10185,7 +10185,7 @@ label: (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "")) (match_operand 2 "" ""))) (use (reg:SI FPSCR_MODES_REG)) - (clobber (match_scratch:SI 3 "=k")) + (clobber (match_scratch:SI 3 "=&k")) (return)] "TARGET_SH2" "#" -- 2.30.2