Commit 35aa3c1c by Richard Kenner Committed by Richard Kenner

sparc.c (sparc_initialize_trampoline): Use trunc_int_for_mode.

	* config/sparc/sparc.c (sparc_initialize_trampoline): Use
	trunc_int_for_mode.

From-SVN: r50226
parent f6041ed8
Sat Mar 2 06:30:14 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 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. * emit-rtl.c (offset_address): Call update_temp_slot_address.
2002-03-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2002-03-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
......
...@@ -6263,37 +6263,39 @@ sparc_initialize_trampoline (tramp, fnaddr, cxt) ...@@ -6263,37 +6263,39 @@ sparc_initialize_trampoline (tramp, fnaddr, cxt)
0, VOIDmode, 1, tramp, Pmode); 0, VOIDmode, 1, tramp, Pmode);
#endif #endif
emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 0)), emit_move_insn
(gen_rtx_MEM (SImode, plus_constant (tramp, 0)),
expand_binop (SImode, ior_optab, expand_binop (SImode, ior_optab,
expand_shift (RSHIFT_EXPR, SImode, fnaddr, expand_shift (RSHIFT_EXPR, SImode, fnaddr,
size_int (10), 0, 1), size_int (10), 0, 1),
GEN_INT (0x03000000), GEN_INT (trunc_int_for_mode (0x03000000, SImode)),
NULL_RTX, 1, OPTAB_DIRECT)); NULL_RTX, 1, OPTAB_DIRECT));
emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 4)), emit_move_insn
(gen_rtx_MEM (SImode, plus_constant (tramp, 4)),
expand_binop (SImode, ior_optab, expand_binop (SImode, ior_optab,
expand_shift (RSHIFT_EXPR, SImode, cxt, expand_shift (RSHIFT_EXPR, SImode, cxt,
size_int (10), 0, 1), size_int (10), 0, 1),
GEN_INT (0x05000000), GEN_INT (trunc_int_for_mode (0x05000000, SImode)),
NULL_RTX, 1, OPTAB_DIRECT)); NULL_RTX, 1, OPTAB_DIRECT));
emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 8)), emit_move_insn
(gen_rtx_MEM (SImode, plus_constant (tramp, 8)),
expand_binop (SImode, ior_optab, expand_binop (SImode, ior_optab,
expand_and (SImode, fnaddr, GEN_INT (0x3ff), expand_and (SImode, fnaddr, GEN_INT (0x3ff), NULL_RTX),
NULL_RTX), GEN_INT (trunc_int_for_mode (0x81c06000, SImode)),
GEN_INT (0x81c06000),
NULL_RTX, 1, OPTAB_DIRECT)); NULL_RTX, 1, OPTAB_DIRECT));
emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 12)), emit_move_insn
(gen_rtx_MEM (SImode, plus_constant (tramp, 12)),
expand_binop (SImode, ior_optab, expand_binop (SImode, ior_optab,
expand_and (SImode, cxt, GEN_INT (0x3ff), expand_and (SImode, cxt, GEN_INT (0x3ff), NULL_RTX),
NULL_RTX), GEN_INT (trunc_int_for_mode (0x8410a000, SImode)),
GEN_INT (0x8410a000),
NULL_RTX, 1, OPTAB_DIRECT)); 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 /* On UltraSPARC a flush flushes an entire cache line. The trampoline is
aligned on a 16 byte boundary so one flush clears it all. */ 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) if (sparc_cpu != PROCESSOR_ULTRASPARC)
emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode, emit_insn (gen_flush (validize_mem (gen_rtx_MEM (SImode,
plus_constant (tramp, 8))))); plus_constant (tramp, 8)))));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment