diff options
author | Anatoly Sokolov <aesok@post.ru> | 2011-08-16 21:04:13 +0400 |
---|---|---|
committer | Anatoly Sokolov <aesok@gcc.gnu.org> | 2011-08-16 21:04:13 +0400 |
commit | b05933f5277f7a0f09670f205af31b082e0e4976 (patch) | |
tree | ed2d7e4f6adfd9ce164b3ac8aaabcd47a00bdb1b | |
parent | c9c8f2e82792603bfc587b49841b2f43ee60d121 (diff) | |
download | gcc-b05933f5277f7a0f09670f205af31b082e0e4976.zip gcc-b05933f5277f7a0f09670f205af31b082e0e4976.tar.gz gcc-b05933f5277f7a0f09670f205af31b082e0e4976.tar.bz2 |
m32c.h (PREFERRED_RELOAD_CLASS, [...]): Remove macro.
* 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.
From-SVN: r177790
-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 a38e913..59176fc 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 e858e15..eb242e0 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 4aeeb3d..a967e21 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 e7b388b..8239aa0 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) |