summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-17 14:41:49 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-17 14:41:49 +0000
commitac825d2999c39eefd8ba839dbc48259e5106f1a6 (patch)
treeccd6b7fd42d32991a045c9b70abc3608d011bc9a /gcc/emit-rtl.c
parent1ad985ea04d8d11f37f5367667b47a885ccf81ce (diff)
downloadgcc-ac825d2999c39eefd8ba839dbc48259e5106f1a6.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19267 138bc75d-0d04-0410-961f-82ee72b054a4
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 4d9361ce9bc..40b0aa54e51 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)