From: John Carr Date: Fri, 17 Apr 1998 14:41:49 +0000 (+0000) Subject: Patch from John Carr to fix sparc v9 failure. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77e6b0eb6094880a5989fbd87a09fc772f73f575;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d19b93ea7b6..97902681319 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 17 14:30:37 1998 John Carr + + * emit-rtl.c (operand_subword_force): If a register can not be + accessed by words, copy it to a pseudo register. + Fri Apr 17 14:30:37 1998 Jim Wilson * rs6000/vxppc.h (CPP_SPEC): Add support for mrelocatable*. 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)