aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAdrian Straetling <straetling@de.ibm.com>2005-07-07 10:21:05 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2005-07-07 10:21:05 +0000
commit9ed929017c682714d2a81f840fbe97a8a56fbe96 (patch)
tree4ae6d3184c3aa9f403df202e9e611d95966d8385 /gcc
parent1a9cb483e692b788e45ec39c4eba6bdadd1f7433 (diff)
downloadgcc-9ed929017c682714d2a81f840fbe97a8a56fbe96.zip
gcc-9ed929017c682714d2a81f840fbe97a8a56fbe96.tar.gz
gcc-9ed929017c682714d2a81f840fbe97a8a56fbe96.tar.bz2
expr.c: (set_storage_via_setmem): Convert opchar to mode defined by back-end.
2005-07-07 Adrian Straetling <straetling@de.ibm.com> * expr.c: (set_storage_via_setmem): Convert opchar to mode defined by back-end. From-SVN: r101703
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/expr.c16
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e13a1fa..c54bf1b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-07 Adrian Straetling <straetling@de.ibm.com>
+
+ * expr.c: (set_storage_via_setmem): Convert opchar to mode
+ defined by back-end.
+
2005-07-07 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.md (stack_protect_testsi): Put clobbers after
diff --git a/gcc/expr.c b/gcc/expr.c
index 2a1ecab..d778b59 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2608,7 +2608,8 @@ set_storage_via_setmem (rtx object, rtx size, rtx val, unsigned int align)
&& ((pred = insn_data[(int) code].operand[3].predicate) == 0
|| (*pred) (opalign, VOIDmode)))
{
- rtx opsize,opchar;
+ rtx opsize, opchar;
+ enum machine_mode char_mode;
rtx last = get_last_insn ();
rtx pat;
@@ -2617,10 +2618,15 @@ set_storage_via_setmem (rtx object, rtx size, rtx val, unsigned int align)
if (pred != 0 && ! (*pred) (opsize, mode))
opsize = copy_to_mode_reg (mode, opsize);
- opchar = convert_to_mode (mode, val, 1);
- pred = insn_data[(int) code].operand[2].predicate;
- if (pred != 0 && ! (*pred) (opchar, mode))
- opchar = copy_to_mode_reg (mode, opchar);
+ opchar = val;
+ char_mode = insn_data[(int) code].operand[2].mode;
+ if (char_mode != VOIDmode)
+ {
+ opchar = convert_to_mode (char_mode, opchar, 1);
+ pred = insn_data[(int) code].operand[2].predicate;
+ if (pred != 0 && ! (*pred) (opchar, char_mode))
+ opchar = copy_to_mode_reg (char_mode, opchar);
+ }
pat = GEN_FCN ((int) code) (object, opsize, opchar, opalign);
if (pat)