* config/sparc/sparc.c (sparc_initialize_trampoline): Use
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Mar 2002 13:53:38 +0000 (13:53 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Mar 2002 13:53:38 +0000 (13:53 +0000)
trunc_int_for_mode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50226 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sparc/sparc.c

index 3ca76f6..2b395d3 100644 (file)
@@ -1,5 +1,8 @@
 Sat Mar  2 06:30:14 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
+       * config/sparc/sparc.c (sparc_initialize_trampoline): Use
+       trunc_int_for_mode.
+
        * emit-rtl.c (offset_address): Call update_temp_slot_address.
 
 2002-03-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
index 4d8c443..e101fa7 100644 (file)
@@ -6263,37 +6263,39 @@ sparc_initialize_trampoline (tramp, fnaddr, cxt)
                      0, VOIDmode, 1, tramp, Pmode);
 #endif
 
-  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 0)),
-                 expand_binop (SImode, ior_optab,
-                               expand_shift (RSHIFT_EXPR, SImode, fnaddr,
-                                             size_int (10), 0, 1),
-                               GEN_INT (0x03000000),
-                               NULL_RTX, 1, OPTAB_DIRECT));
+  emit_move_insn
+    (gen_rtx_MEM (SImode, plus_constant (tramp, 0)),
+     expand_binop (SImode, ior_optab,
+                  expand_shift (RSHIFT_EXPR, SImode, fnaddr,
+                                size_int (10), 0, 1),
+                  GEN_INT (trunc_int_for_mode (0x03000000, SImode)),
+                  NULL_RTX, 1, OPTAB_DIRECT));
+
+  emit_move_insn
+    (gen_rtx_MEM (SImode, plus_constant (tramp, 4)),
+     expand_binop (SImode, ior_optab,
+                  expand_shift (RSHIFT_EXPR, SImode, cxt,
+                                size_int (10), 0, 1),
+                  GEN_INT (trunc_int_for_mode (0x05000000, SImode)),
+                  NULL_RTX, 1, OPTAB_DIRECT));
+
+  emit_move_insn
+    (gen_rtx_MEM (SImode, plus_constant (tramp, 8)),
+     expand_binop (SImode, ior_optab,
+                  expand_and (SImode, fnaddr, GEN_INT (0x3ff), NULL_RTX),
+                  GEN_INT (trunc_int_for_mode (0x81c06000, SImode)),
+                  NULL_RTX, 1, OPTAB_DIRECT));
+
+  emit_move_insn
+    (gen_rtx_MEM (SImode, plus_constant (tramp, 12)),
+     expand_binop (SImode, ior_optab,
+                  expand_and (SImode, cxt, GEN_INT (0x3ff), NULL_RTX),
+                  GEN_INT (trunc_int_for_mode (0x8410a000, SImode)),
+                  NULL_RTX, 1, OPTAB_DIRECT));
 
-  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 4)),
-                 expand_binop (SImode, ior_optab,
-                               expand_shift (RSHIFT_EXPR, SImode, cxt,
-                                             size_int (10), 0, 1),
-                               GEN_INT (0x05000000),
-                               NULL_RTX, 1, OPTAB_DIRECT));
-
-  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 8)),
-                 expand_binop (SImode, ior_optab,
-                               expand_and (SImode, fnaddr, GEN_INT (0x3ff),
-                                           NULL_RTX),
-                               GEN_INT (0x81c06000),
-                               NULL_RTX, 1, OPTAB_DIRECT));
-
-  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 12)),
-                 expand_binop (SImode, ior_optab,
-                               expand_and (SImode, cxt, GEN_INT (0x3ff),
-                                           NULL_RTX),
-                               GEN_INT (0x8410a000),
-                               NULL_RTX, 1, OPTAB_DIRECT));
-
-  emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode, tramp))));
   /* On UltraSPARC a flush flushes an entire cache line.  The trampoline is
      aligned on a 16 byte boundary so one flush clears it all.  */
+  emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode, tramp))));
   if (sparc_cpu != PROCESSOR_ULTRASPARC)
     emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode,
                                                     plus_constant (tramp, 8)))));