(arm_reload_in_hi): New function.
authorRichard Earnshaw <erich@gnu.org>
Sun, 2 Oct 1994 15:10:48 +0000 (15:10 +0000)
committerRichard Earnshaw <erich@gnu.org>
Sun, 2 Oct 1994 15:10:48 +0000 (15:10 +0000)
From-SVN: r8201

gcc/config/arm/arm.c

index 5ddb7c2..cff93d2 100644 (file)
@@ -1472,8 +1472,8 @@ store_multiple_operation (op, mode)
 
 int
 multi_register_push (op, mode)
-  rtx op;
-  enum machine_mode mode;
+     rtx op;
+     enum machine_mode mode;
 {
   if (GET_CODE (op) != PARALLEL
       || (GET_CODE (XVECEXP (op, 0, 0)) != SET)
@@ -1714,6 +1714,35 @@ gen_compare_reg (code, x, y, fp)
 }
 
 void
+arm_reload_in_hi (operands)
+     rtx *operands;
+{
+  rtx base = find_replacement (&XEXP (operands[1], 0));
+
+  emit_insn (gen_zero_extendqisi2 (operands[2], gen_rtx (MEM, QImode, base)));
+  emit_insn (gen_zero_extendqisi2 (gen_rtx (SUBREG, SImode, operands[0], 0),
+                                  gen_rtx (MEM, QImode, 
+                                           plus_constant (base, 1))));
+  if (BYTES_BIG_ENDIAN)
+    emit_insn (gen_rtx (SET, VOIDmode, gen_rtx (SUBREG, SImode, 
+                                               operands[0], 0),
+                       gen_rtx (IOR, SImode, 
+                                gen_rtx (ASHIFT, SImode,
+                                         gen_rtx (SUBREG, SImode,
+                                                  operands[0], 0),
+                                         GEN_INT (8)),
+                                operands[2])));
+  else
+    emit_insn (gen_rtx (SET, VOIDmode, gen_rtx (SUBREG, SImode, 
+                                               operands[0], 0),
+                       gen_rtx (IOR, SImode, 
+                                gen_rtx (ASHIFT, SImode,
+                                         operands[2],
+                                         GEN_INT (8)),
+                                gen_rtx (SUBREG, SImode, operands[0], 0))));
+}
+
+void
 arm_reload_out_hi (operands)
      rtx *operands;
 {