diff options
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 4925544..22fdaf6 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1136,12 +1136,16 @@ operand_subword (op, i, validate_address, mode) if (mode == VOIDmode) abort (); - /* If OP is narrower than a word or if we want a word outside OP, fail. */ + /* If OP is narrower than a word, fail. */ if (mode != BLKmode - && (GET_MODE_SIZE (mode) < UNITS_PER_WORD - || (i + 1) * UNITS_PER_WORD > GET_MODE_SIZE (mode))) + && (GET_MODE_SIZE (mode) < UNITS_PER_WORD)) return 0; + /* If we want a word outside OP, return zero. */ + if (mode != BLKmode + && (i + 1) * UNITS_PER_WORD > GET_MODE_SIZE (mode)) + return const0_rtx; + /* If OP is already an integer word, return it. */ if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE_SIZE (mode) == UNITS_PER_WORD) |