diff options
author | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-16 17:04:13 +0000 |
---|---|---|
committer | aesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-16 17:04:13 +0000 |
commit | 7d7d492267e2f1b8053bfd232c98a0f9fbde5982 (patch) | |
tree | ed2d7e4f6adfd9ce164b3ac8aaabcd47a00bdb1b | |
parent | 1afd7cdadd6000d069b7574423bca27ce7b301a3 (diff) | |
download | gcc-7d7d492267e2f1b8053bfd232c98a0f9fbde5982.tar.gz |
* config/m32c/m32c.h (PREFERRED_RELOAD_CLASS,
PREFERRED_OUTPUT_RELOAD_CLASS): Remove macro.
* config/m32c/m32c-protos.h (m32c_preferred_reload_class,
m32c_preferred_output_reload_class): Remove.
* config/m32c/m32c.c (m32c_preferred_reload_class): Make static.
Change rclass argument and return types to reg_class_t. Use
reg_class_subset_p instead of class_sizes.
(m32c_preferred_output_reload_class): Make static. Change rclass
argument and return types to reg_class_t.
(TARGET_PREFERRED_RELOAD_CLASS,
TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177790 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/config/m32c/m32c-protos.h | 2 | ||||
-rw-r--r-- | gcc/config/m32c/m32c.c | 24 | ||||
-rw-r--r-- | gcc/config/m32c/m32c.h | 2 |
4 files changed, 30 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a38e9132b2d..59176fccb34 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2011-08-16 Anatoly Sokolov <aesok@post.ru> + + * config/m32c/m32c.h (PREFERRED_RELOAD_CLASS, + PREFERRED_OUTPUT_RELOAD_CLASS): Remove macro. + * config/m32c/m32c-protos.h (m32c_preferred_reload_class, + m32c_preferred_output_reload_class): Remove. + * config/m32c/m32c.c (m32c_preferred_reload_class): Make static. + Change rclass argument and return types to reg_class_t. Use + reg_class_subset_p instead of class_sizes. + (m32c_preferred_output_reload_class): Make static. Change rclass + argument and return types to reg_class_t. + (TARGET_PREFERRED_RELOAD_CLASS, + TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define. + 2011-08-16 Kai Tietz <ktietz@redhat.com> * config/i386/mingw32.h (GOMP_SELF_SPEC): Add -pthread option. diff --git a/gcc/config/m32c/m32c-protos.h b/gcc/config/m32c/m32c-protos.h index e858e150a06..eb242e0018f 100644 --- a/gcc/config/m32c/m32c-protos.h +++ b/gcc/config/m32c/m32c-protos.h @@ -66,8 +66,6 @@ int m32c_limit_reload_class (enum machine_mode, int); int m32c_modes_tieable_p (enum machine_mode, enum machine_mode); bool m32c_mov_ok (rtx *, enum machine_mode); char * m32c_output_compare (rtx, rtx *); -int m32c_preferred_output_reload_class (rtx, int); -int m32c_preferred_reload_class (rtx, int); int m32c_prepare_move (rtx *, enum machine_mode); int m32c_prepare_shift (rtx *, int, int); int m32c_reg_ok_for_base_p (rtx, int); diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 4aeeb3d9ebb..a967e217135 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -729,12 +729,16 @@ m32c_regno_ok_for_base_p (int regno) #define DEBUG_RELOAD 0 -/* Implements PREFERRED_RELOAD_CLASS. In general, prefer general +/* Implements TARGET_PREFERRED_RELOAD_CLASS. In general, prefer general registers of the appropriate size. */ -int -m32c_preferred_reload_class (rtx x, int rclass) + +#undef TARGET_PREFERRED_RELOAD_CLASS +#define TARGET_PREFERRED_RELOAD_CLASS m32c_preferred_reload_class + +static reg_class_t +m32c_preferred_reload_class (rtx x, reg_class_t rclass) { - int newclass = rclass; + reg_class_t newclass = rclass; #if DEBUG_RELOAD fprintf (stderr, "\npreferred_reload_class for %s is ", @@ -759,7 +763,7 @@ m32c_preferred_reload_class (rtx x, int rclass) else if (newclass == QI_REGS && GET_MODE_SIZE (GET_MODE (x)) > 2) newclass = SI_REGS; else if (GET_MODE_SIZE (GET_MODE (x)) > 4 - && ~class_contents[rclass][0] & 0x000f) + && ! reg_class_subset_p (R03_REGS, rclass)) newclass = DI_REGS; rclass = reduce_class (rclass, newclass, rclass); @@ -779,9 +783,13 @@ m32c_preferred_reload_class (rtx x, int rclass) return rclass; } -/* Implements PREFERRED_OUTPUT_RELOAD_CLASS. */ -int -m32c_preferred_output_reload_class (rtx x, int rclass) +/* Implements TARGET_PREFERRED_OUTPUT_RELOAD_CLASS. */ + +#undef TARGET_PREFERRED_OUTPUT_RELOAD_CLASS +#define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS m32c_preferred_output_reload_class + +static reg_class_t +m32c_preferred_output_reload_class (rtx x, reg_class_t rclass) { return m32c_preferred_reload_class (x, rclass); } diff --git a/gcc/config/m32c/m32c.h b/gcc/config/m32c/m32c.h index e7b388b6f00..8239aa0a3ff 100644 --- a/gcc/config/m32c/m32c.h +++ b/gcc/config/m32c/m32c.h @@ -417,8 +417,6 @@ enum reg_class #define REGNO_OK_FOR_BASE_P(NUM) m32c_regno_ok_for_base_p (NUM) #define REGNO_OK_FOR_INDEX_P(NUM) 0 -#define PREFERRED_RELOAD_CLASS(X,CLASS) m32c_preferred_reload_class (X, CLASS) -#define PREFERRED_OUTPUT_RELOAD_CLASS(X,CLASS) m32c_preferred_output_reload_class (X, CLASS) #define LIMIT_RELOAD_CLASS(MODE,CLASS) \ (enum reg_class) m32c_limit_reload_class (MODE, CLASS) |