aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorJohn Carr <jfc@mit.edu>1998-04-17 14:41:49 +0000
committerJim Wilson <wilson@gcc.gnu.org>1998-04-17 07:41:49 -0700
commit77e6b0eb6094880a5989fbd87a09fc772f73f575 (patch)
treeccd6b7fd42d32991a045c9b70abc3608d011bc9a /gcc/emit-rtl.c
parent27f4cfdb2fdd6bfa9328dd0be59ad37138236b34 (diff)
downloadgcc-77e6b0eb6094880a5989fbd87a09fc772f73f575.zip
gcc-77e6b0eb6094880a5989fbd87a09fc772f73f575.tar.gz
gcc-77e6b0eb6094880a5989fbd87a09fc772f73f575.tar.bz2
Patch from John Carr to fix sparc v9 failure.
* emit-rtl.c (operand_subword_force): If a register can not be accessed by words, copy it to a pseudo register. From-SVN: r19267
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 4d9361c..40b0aa5 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1380,7 +1380,14 @@ operand_subword_force (op, i, mode)
return result;
if (mode != BLKmode && mode != VOIDmode)
- op = force_reg (mode, op);
+ {
+ /* If this is a register which can not be accessed by words, copy it
+ to a pseudo register. */
+ if (GET_CODE (op) == REG)
+ op = copy_to_reg (op);
+ else
+ op = force_reg (mode, op);
+ }
result = operand_subword (op, i, 1, mode);
if (result == 0)