diff options
author | eager <eager@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-19 23:05:40 +0000 |
---|---|---|
committer | eager <eager@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-19 23:05:40 +0000 |
commit | dd21a8f3a734bf39f01dbfe827a32d33e75f0d1c (patch) | |
tree | 33dd06db317ab7fd847303bd864c7ad0e8bd94e6 | |
parent | 1859244f5b230af24823d9a6fff6d6af0bc2ba07 (diff) | |
download | gcc-dd21a8f3a734bf39f01dbfe827a32d33e75f0d1c.tar.gz |
* config/microblaze/microblaze.md (call_value_intern): Check symbol is
function before branching.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196157 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/microblaze/microblaze.md | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd1eef34a46..98b01b4b9dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-02-19 Edgar E. Iglesias <edgar.iglesias@gmail.com> + + * config/microblaze/microblaze.md (call_value_intern): Check symbol is + function before branching. + 2012-02-19 Andrey Belevantsev <abel@ispras.ru> * sel-sched-dump.c (dump_insn_rtx_flags): Explicitly set diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md index 1d55a167be4..b3d0514ded9 100644 --- a/gcc/config/microblaze/microblaze.md +++ b/gcc/config/microblaze/microblaze.md @@ -2128,9 +2128,17 @@ register rtx target = operands[1]; register rtx target2=gen_rtx_REG (Pmode,GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM); - if (GET_CODE (target) == SYMBOL_REF){ - gen_rtx_CLOBBER (VOIDmode,target2); - return "brlid\tr15,%1\;%#"; + if (GET_CODE (target) == SYMBOL_REF) + { + gen_rtx_CLOBBER (VOIDmode,target2); + if (SYMBOL_REF_FLAGS (target) & SYMBOL_FLAG_FUNCTION) + { + return "brlid\tr15,%1\;%#"; + } + else + { + return "bralid\tr15,%1\;%#"; + } } else if (GET_CODE (target) == CONST_INT) return "la\t%@,r0,%1\;brald\tr15,%@\;%#"; |