Commit 86f8eff3 by Richard Kenner

*** empty log message ***

From-SVN: r417
parent 19b229d9
...@@ -553,18 +553,6 @@ assign_stack_local (mode, size, align) ...@@ -553,18 +553,6 @@ assign_stack_local (mode, size, align)
else else
alignment = align / BITS_PER_UNIT; alignment = align / BITS_PER_UNIT;
#if 0 /* Let's see if this is really needed--rms. */
#ifdef STRICT_ALIGNMENT
/* Supposedly sub-word sized units may later be accessed
with word intructions. It's not certain this is really true. */
if (mode != BLKmode && align == 0 && alignment < UNITS_PER_WORD)
alignment = UNITS_PER_WORD;
/* This is in case we just made the alignment bigger than the size. */
size = CEIL_ROUND (size, alignment);
#endif
#endif
/* Round frame offset to that alignment. /* Round frame offset to that alignment.
We must be careful here, since FRAME_OFFSET might be negative and We must be careful here, since FRAME_OFFSET might be negative and
division with a negative dividend isn't as well defined as we might division with a negative dividend isn't as well defined as we might
...@@ -642,18 +630,6 @@ assign_outer_stack_local (mode, size, align, function) ...@@ -642,18 +630,6 @@ assign_outer_stack_local (mode, size, align, function)
else else
alignment = align / BITS_PER_UNIT; alignment = align / BITS_PER_UNIT;
#if 0 /* Let's see if this is really needed--rms. */
#ifdef STRICT_ALIGNMENT
/* Sub-word sized units may later be accessed with word intructions.
This results from (SUBREG (MEM ...) ...). */
if (mode != BLKmode && align == 0 && alignment < UNITS_PER_WORD)
alignment = UNITS_PER_WORD;
/* This is in case we just made the alignment bigger than the size. */
size = CEIL_ROUND (size, alignment);
#endif
#endif
/* Round frame offset to that alignment. */ /* Round frame offset to that alignment. */
#ifdef FRAME_GROWS_DOWNWARD #ifdef FRAME_GROWS_DOWNWARD
frame_offset = FLOOR_ROUND (frame_offset, alignment); frame_offset = FLOOR_ROUND (frame_offset, alignment);
...@@ -1928,11 +1904,14 @@ instantiate_decls (fndecl, valid_only) ...@@ -1928,11 +1904,14 @@ instantiate_decls (fndecl, valid_only)
if (DECL_RTL (decl) && GET_CODE (DECL_RTL (decl)) == MEM) if (DECL_RTL (decl) && GET_CODE (DECL_RTL (decl)) == MEM)
instantiate_virtual_regs_1 (&XEXP (DECL_RTL (decl), 0), instantiate_virtual_regs_1 (&XEXP (DECL_RTL (decl), 0),
valid_only ? DECL_RTL (decl) : 0, 0); valid_only ? DECL_RTL (decl) : 0, 0);
#if 0 /* This is probably correct, but it seems to require fixes
elsewhere in order to work. Let's fix them in 2.1. */
if (DECL_INCOMING_RTL (decl) if (DECL_INCOMING_RTL (decl)
&& GET_CODE (DECL_INCOMING_RTL (decl)) == MEM) && GET_CODE (DECL_INCOMING_RTL (decl)) == MEM)
instantiate_virtual_regs_1 (&XEXP (DECL_INCOMING_RTL (decl), 0), instantiate_virtual_regs_1 (&XEXP (DECL_INCOMING_RTL (decl), 0),
valid_only ? DECL_INCOMING_RTL (decl) : 0, valid_only ? DECL_INCOMING_RTL (decl) : 0,
0); 0);
#endif
} }
/* Now process all variables defined in the function or its subblocks. */ /* Now process all variables defined in the function or its subblocks. */
...@@ -2831,7 +2810,21 @@ assign_parms (fndecl, second_time) ...@@ -2831,7 +2810,21 @@ assign_parms (fndecl, second_time)
/* Copy the value into the register. */ /* Copy the value into the register. */
if (GET_MODE (parmreg) != GET_MODE (entry_parm)) if (GET_MODE (parmreg) != GET_MODE (entry_parm))
convert_move (parmreg, validize_mem (entry_parm), 0); {
/* If ENTRY_PARM is a hard register, it might be in a register
not valid for operating in its mode (e.g., an odd-numbered
register for a DFmode). In that case, moves are the only
thing valid, so we can't do a convert from there. This
occurs when the calling sequence allow such misaligned
usages. */
if (GET_CODE (entry_parm) == REG
&& REGNO (entry_parm) < FIRST_PSEUDO_REGISTER
&& ! HARD_REGNO_MODE_OK (REGNO (entry_parm),
GET_MODE (entry_parm)))
convert_move (parmreg, copy_to_reg (entry_parm));
else
convert_move (parmreg, validize_mem (entry_parm), 0);
}
else else
emit_move_insn (parmreg, validize_mem (entry_parm)); emit_move_insn (parmreg, validize_mem (entry_parm));
...@@ -2872,8 +2865,15 @@ assign_parms (fndecl, second_time) ...@@ -2872,8 +2865,15 @@ assign_parms (fndecl, second_time)
during function execution. */ during function execution. */
if (passed_mode != nominal_mode) if (passed_mode != nominal_mode)
/* Conversion is required. */ {
entry_parm = convert_to_mode (nominal_mode, entry_parm, 0); /* Conversion is required. */
if (GET_CODE (entry_parm) == REG
&& REGNO (entry_parm) < FIRST_PSEUDO_REGISTER
&& ! HARD_REGNO_MODE_OK (REGNO (entry_parm), passed_mode))
entry_parm = copy_to_reg (entry_parm);
entry_parm = convert_to_mode (nominal_mode, entry_parm, 0);
}
if (entry_parm != stack_parm) if (entry_parm != stack_parm)
{ {
...@@ -3335,6 +3335,7 @@ fix_lexical_addr (addr, var) ...@@ -3335,6 +3335,7 @@ fix_lexical_addr (addr, var)
base = copy_to_reg (gen_rtx (MEM, Pmode, addr)); base = copy_to_reg (gen_rtx (MEM, Pmode, addr));
#else #else
displacement += (FIRST_PARM_OFFSET (context) - STARTING_FRAME_OFFSET); displacement += (FIRST_PARM_OFFSET (context) - STARTING_FRAME_OFFSET);
base = lookup_static_chain (var);
#endif #endif
} }
...@@ -3844,8 +3845,12 @@ expand_function_end (filename, line) ...@@ -3844,8 +3845,12 @@ expand_function_end (filename, line)
/* First make sure this compilation has a template for /* First make sure this compilation has a template for
initializing trampolines. */ initializing trampolines. */
if (initial_trampoline == 0) if (initial_trampoline == 0)
initial_trampoline {
= gen_rtx (MEM, BLKmode, assemble_trampoline_template ()); end_temporary_allocation ();
initial_trampoline
= gen_rtx (MEM, BLKmode, assemble_trampoline_template ());
resume_temporary_allocation ();
}
/* Generate insns to initialize the trampoline. */ /* Generate insns to initialize the trampoline. */
start_sequence (); start_sequence ();
......
...@@ -1495,12 +1495,12 @@ emit_cmp_insn (x, y, comparison, size, mode, unsignedp, align) ...@@ -1495,12 +1495,12 @@ emit_cmp_insn (x, y, comparison, size, mode, unsignedp, align)
#endif #endif
{ {
#ifdef TARGET_MEM_FUNCTIONS #ifdef TARGET_MEM_FUNCTIONS
emit_library_call (memcmp_libfunc, 0, emit_library_call (memcmp_libfunc, 1,
TYPE_MODE (integer_type_node), 3, TYPE_MODE (integer_type_node), 3,
XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, XEXP (x, 0), Pmode, XEXP (y, 0), Pmode,
size, Pmode); size, Pmode);
#else #else
emit_library_call (bcmp_libfunc, 0, emit_library_call (bcmp_libfunc, 1,
TYPE_MODE (integer_type_node), 3, TYPE_MODE (integer_type_node), 3,
XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, XEXP (x, 0), Pmode, XEXP (y, 0), Pmode,
size, Pmode); size, Pmode);
...@@ -1585,7 +1585,7 @@ emit_cmp_insn (x, y, comparison, size, mode, unsignedp, align) ...@@ -1585,7 +1585,7 @@ emit_cmp_insn (x, y, comparison, size, mode, unsignedp, align)
if (unsignedp && ucmp_optab->handlers[(int) mode].libfunc) if (unsignedp && ucmp_optab->handlers[(int) mode].libfunc)
libfunc = ucmp_optab->handlers[(int) mode].libfunc; libfunc = ucmp_optab->handlers[(int) mode].libfunc;
emit_library_call (libfunc, 0, emit_library_call (libfunc, 1,
SImode, 2, x, mode, y, mode); SImode, 2, x, mode, y, mode);
/* Integer comparison returns a result that must be compared against 1, /* Integer comparison returns a result that must be compared against 1,
...@@ -1706,7 +1706,7 @@ emit_float_lib_cmp (x, y, comparison) ...@@ -1706,7 +1706,7 @@ emit_float_lib_cmp (x, y, comparison)
abort (); abort ();
} }
emit_library_call (libfunc, 0, emit_library_call (libfunc, 1,
SImode, 2, x, mode, y, mode); SImode, 2, x, mode, y, mode);
emit_cmp_insn (hard_libcall_value (SImode), const0_rtx, comparison, emit_cmp_insn (hard_libcall_value (SImode), const0_rtx, comparison,
...@@ -2556,7 +2556,7 @@ expand_float (to, from, unsignedp) ...@@ -2556,7 +2556,7 @@ expand_float (to, from, unsignedp)
start_sequence (); start_sequence ();
emit_library_call (libfcn, 0, GET_MODE (to), 1, from, GET_MODE (from)); emit_library_call (libfcn, 1, GET_MODE (to), 1, from, GET_MODE (from));
insns = get_insns (); insns = get_insns ();
end_sequence (); end_sequence ();
...@@ -2752,7 +2752,7 @@ expand_fix (to, from, unsignedp) ...@@ -2752,7 +2752,7 @@ expand_fix (to, from, unsignedp)
start_sequence (); start_sequence ();
emit_library_call (libfcn, 0, GET_MODE (to), 1, from, GET_MODE (from)); emit_library_call (libfcn, 1, GET_MODE (to), 1, from, GET_MODE (from));
insns = get_insns (); insns = get_insns ();
end_sequence (); end_sequence ();
......
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