aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-04-18 01:31:41 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2003-04-17 23:31:41 +0000
commit04c5580f371b08c0cccb05a520b69097512e3f62 (patch)
tree0bb84f63ed128b54b740a46b5532d57a1116b085 /gcc/emit-rtl.c
parentc409ea0d30ef28e68ff6b4fcb699ba013ee947f1 (diff)
downloadgcc-04c5580f371b08c0cccb05a520b69097512e3f62.zip
gcc-04c5580f371b08c0cccb05a520b69097512e3f62.tar.gz
gcc-04c5580f371b08c0cccb05a520b69097512e3f62.tar.bz2
emit-rtl.c (subreg_hard_regno): Check that register is representable.
* emit-rtl.c (subreg_hard_regno): Check that register is representable. * reload.c (reload_inner_reg_of_subreg): When register is not representable, reload the whole thing. (find_reloads): Likewsie. * rtlanal.c (subreg_representable_p): New function. * profile.c (compute_branch_probabilities): Cleanup sanity checking; allow negative probabilities for edges from the call to exit. (branch_prob): Do not add fake edges for functions that may return twice From-SVN: r65757
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 058100c..7048aee 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1081,7 +1081,11 @@ subreg_hard_regno (x, check_mode)
abort ();
if (check_mode && ! HARD_REGNO_MODE_OK (base_regno, GET_MODE (reg)))
abort ();
-
+#ifdef ENABLE_CHECKING
+ if (!subreg_offset_representable_p (REGNO (reg), GET_MODE (reg),
+ SUBREG_BYTE (x), mode))
+ abort ();
+#endif
/* Catch non-congruent offsets too. */
byte_offset = SUBREG_BYTE (x);
if ((byte_offset % GET_MODE_SIZE (mode)) != 0)