diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-20 20:37:54 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-20 20:37:54 +0000 |
commit | 54f36750bda23787b8f085da88aa1c05ce8a4cd4 (patch) | |
tree | 3472f0a527c8959b7c1b3332ff8443bd77ad9582 /gcc/config/m32c/m32c.c | |
parent | caff53db41781c14605bdbf1c6d38f2d59694c54 (diff) | |
download | gcc-54f36750bda23787b8f085da88aa1c05ce8a4cd4.tar.gz |
* config/m32c/m32c.c (m32c_option_override): Always disable
function-cse in 16-bit mode. Indirect calls are always worse than
direct calls as there is no 16-bit indirect call opcode.
(m32c_override_options_after_change): New, likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165737 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m32c/m32c.c')
-rw-r--r-- | gcc/config/m32c/m32c.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index d62b4f2321c..39b3393a672 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -429,6 +429,21 @@ m32c_option_override (void) /* This target defaults to strict volatile bitfields. */ if (flag_strict_volatile_bitfields < 0) flag_strict_volatile_bitfields = 1; + + /* r8c/m16c have no 16-bit indirect call, so thunks are involved. + This is always worse than an absolute call. */ + if (TARGET_A16) + flag_no_function_cse = 1; +} + +#undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE +#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE m32c_override_options_after_change + +static void +m32c_override_options_after_change (void) +{ + if (TARGET_A16) + flag_no_function_cse = 1; } /* Defining data structures for per-function information */ |