aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2001-11-27 15:32:18 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2001-11-27 15:32:18 +0000
commitec8e621da9820b3bb8d316a29195da93c926e8c1 (patch)
tree0ebd56d67867b2fffb18604276462ab609a63247 /gcc
parent4a2fadaeccab5f82e7ab4d5d681fdc456ca0a990 (diff)
downloadgcc-ec8e621da9820b3bb8d316a29195da93c926e8c1.zip
gcc-ec8e621da9820b3bb8d316a29195da93c926e8c1.tar.gz
gcc-ec8e621da9820b3bb8d316a29195da93c926e8c1.tar.bz2
aix.h (REG_SIZE): Don't #undef.
* ia64/aix.h (REG_SIZE): Don't #undef. * sparc.h (REG_SIZE): Delete. * flow.c (mark_used_regs): Don't use REG_SIZE. * regs.h (REG_SIZE): Delete. From-SVN: r47378
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/ia64/aix.h5
-rw-r--r--gcc/config/sparc/sparc.h19
-rw-r--r--gcc/flow.c5
-rw-r--r--gcc/regs.h18
5 files changed, 15 insertions, 39 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5670af7..5d9e6a0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2001-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ia64/aix.h (REG_SIZE): Don't #undef.
+ * sparc.h (REG_SIZE): Delete.
+ * flow.c (mark_used_regs): Don't use REG_SIZE.
+ * regs.h (REG_SIZE): Delete.
+
2001-11-27 Andreas Schwab <schwab@suse.de>
* gcc.c: Fix typo PREFERRED_DEBUGGING_FORMAT ->
diff --git a/gcc/config/ia64/aix.h b/gcc/config/ia64/aix.h
index cc6b8c8..cee7621 100644
--- a/gcc/config/ia64/aix.h
+++ b/gcc/config/ia64/aix.h
@@ -248,11 +248,6 @@ extern unsigned int ia64_section_threshold;
#define WCHAR_TYPE "unsigned short"
#endif
-/* Have to get rid of the system's definition so that we can use gcc's
- instead. */
-#include <sys/machine.h>
-#undef REG_SIZE
-
/* Define the `__builtin_va_list' type for AIX. Use char* b/c that's what the
system headers expect. */
#define BUILD_VA_LIST_TYPE(VALIST) \
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 0d96aca..310942f 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -1099,23 +1099,8 @@ while (0)
: (GET_MODE_SIZE (MODE) + 3) / 4) \
: ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
-/* Due to the ARCH64 descrepancy above we must override these
- next two macros too. */
-#define REG_SIZE(R) \
- (TARGET_ARCH64 \
- && ((GET_CODE (R) == REG \
- && ((REGNO (R) >= FIRST_PSEUDO_REGISTER \
- && FLOAT_MODE_P (GET_MODE (R))) \
- || (REGNO (R) < FIRST_PSEUDO_REGISTER \
- && REGNO (R) >= 32))) \
- || (GET_CODE (R) == SUBREG \
- && ((REGNO (SUBREG_REG (R)) >= FIRST_PSEUDO_REGISTER \
- && FLOAT_MODE_P (GET_MODE (SUBREG_REG (R)))) \
- || (REGNO (SUBREG_REG (R)) < FIRST_PSEUDO_REGISTER \
- && REGNO (SUBREG_REG (R)) >= 32)))) \
- ? (GET_MODE_SIZE (GET_MODE (R)) + 3) / 4 \
- : (GET_MODE_SIZE (GET_MODE (R)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-
+/* Due to the ARCH64 descrepancy above we must override this next
+ macro too. */
#define REGMODE_NATURAL_SIZE(MODE) \
((TARGET_ARCH64 && FLOAT_MODE_P (MODE)) ? 4 : UNITS_PER_WORD)
diff --git a/gcc/flow.c b/gcc/flow.c
index fd5bf32..df27edc 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -3630,7 +3630,10 @@ mark_used_regs (pbi, x, cond, insn)
does not use any of the old value. But these other
ways of storing in a register do use the old value. */
if (GET_CODE (testreg) == SUBREG
- && !(REG_SIZE (SUBREG_REG (testreg)) > REG_SIZE (testreg)))
+ && !((REG_BYTES (SUBREG_REG (testreg))
+ + UNITS_PER_WORD - 1) / UNITS_PER_WORD
+ > (REG_BYTES (testreg)
+ + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
;
else
mark_dest = 1;
diff --git a/gcc/regs.h b/gcc/regs.h
index e55c807..0b35f07 100644
--- a/gcc/regs.h
+++ b/gcc/regs.h
@@ -24,24 +24,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define REG_BYTES(R) mode_size[(int) GET_MODE (R)]
-/* Get the number of consecutive hard regs required to hold the REG or
- SUBREG rtx R.
- When something may be an explicit hard reg, REG_SIZE is the only
- valid way to get this value. You cannot get it from the regno.
-
- A target may override this definition, the case where you would do
- this is where there are registers which are smaller than WORD_SIZE
- such as the SFmode registers on sparc64. */
-
-#ifndef REG_SIZE
-#define REG_SIZE(R) \
- ((mode_size[(int) GET_MODE (R)] + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-#endif
-
/* When you only have the mode of a pseudo register before it has a hard
register chosen for it, this reports the size of each hard register
- a pseudo in such a mode would get allocated to. Like REG_SIZE, a
- target may override this. */
+ a pseudo in such a mode would get allocated to. A target may
+ override this. */
#ifndef REGMODE_NATURAL_SIZE
#define REGMODE_NATURAL_SIZE(MODE) UNITS_PER_WORD