summaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-05-19 07:10:42 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-05-19 07:10:42 +0000
commit9188b2863c0a2b6c91dbd6e6e373fada6b34f225 (patch)
treeb85ed03cf9e1c089c04a38231fdb767555930dc3 /gcc/rtl.h
parent8deccbb7c8e1a654f96a396125fd55a06d908de8 (diff)
downloadgcc-9188b2863c0a2b6c91dbd6e6e373fada6b34f225.tar.gz
rtl.h (reg_info): Add an nregs field.
gcc/ * rtl.h (reg_info): Add an nregs field. (REG_NREGS): Use it. (SET_REGNO_RAW): Delete. (set_regno_raw): New function. * regs.h (END_HARD_REGNO): Make equivalent to END_REGNO. (END_REGNO): Redefine in terms of REG_NREGS. * read-rtl.c (read_rtx_code): Call set_regno_raw instead of SET_REGNO_RAW. * emit-rtl.c (set_mode_and_regno): Likewise. * df-scan.c (df_ref_change_reg_with_loc): Use set_mode_and_regno instead of SET_REGNO_RAW. From-SVN: r223342
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 955ce7d027d..e7d06c2ecdd 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -210,7 +210,9 @@ struct GTY(()) reg_info {
/* The value of REGNO. */
unsigned int regno;
- unsigned int unused : 32;
+ /* The value of REG_NREGS. */
+ unsigned int nregs : 8;
+ unsigned int unused : 24;
/* The value of REG_ATTRS. */
reg_attrs *attrs;
@@ -1712,15 +1714,11 @@ inline rtx_insn *JUMP_LABEL_AS_INSN (const rtx_insn *insn)
be used on RHS. Use SET_REGNO to change the value. */
#define REGNO(RTX) (rhs_regno(RTX))
#define SET_REGNO(RTX, N) (df_ref_change_reg_with_loc (RTX, N))
-#define SET_REGNO_RAW(RTX, N) (REG_CHECK (RTX)->regno = N)
/* Return the number of consecutive registers in a REG. This is always
1 for pseudo registers and is determined by HARD_REGNO_NREGS for
hard registers. */
-#define REG_NREGS(RTX) \
- (REGNO (RTX) < FIRST_PSEUDO_REGISTER \
- ? (unsigned int) hard_regno_nregs[REGNO (RTX)][GET_MODE (RTX)] \
- : 1)
+#define REG_NREGS(RTX) (REG_CHECK (RTX)->nregs)
/* ORIGINAL_REGNO holds the number the register originally had; for a
pseudo register turned into a hard reg this will hold the old pseudo
@@ -1735,6 +1733,15 @@ rhs_regno (const_rtx x)
return REG_CHECK (x)->regno;
}
+/* Change the REGNO and REG_NREGS of REG X to the specified values,
+ bypassing the df machinery. */
+static inline void
+set_regno_raw (rtx x, unsigned int regno, unsigned int nregs)
+{
+ reg_info *reg = REG_CHECK (x);
+ reg->regno = regno;
+ reg->nregs = nregs;
+}
/* 1 if RTX is a reg or parallel that is the current function's return
value. */