This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
More alignment problems
- To: kenner at vlsi1 dot ultra dot nyu dot edu
- Subject: More alignment problems
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 30 Mar 2000 13:30:27 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
You indicated that align is supposed to be in bits. That's fine, but
at least one of the callers of emit_block_move is passing in an alignment
in bytes.
In function.c:
6440 #ifdef TRAMPOLINE_TEMPLATE
6441 blktramp = change_address (initial_trampoline, BLKmode, tramp);
6442 emit_block_move (blktramp, initial_trampoline,
6443 GEN_INT (TRAMPOLINE_SIZE),
6444 TRAMPOLINE_ALIGNMENT / BITS_PER_UNIT);
6445 #endif
TRAMPOLINE_ALIGNMENT/BITS_PER_UNIT gives us an alignment in bytes which gets
passed to emit_block_move.
This causes most of the trampoline related tests to fail on the PA and
maybe on other targets.
Given that GCC doesn't use nested functions within its own source I only
ran the testsuite after applying this patch. Lots of improvement, no
regressions. I believe the remaining failures are not related to your
changes.
* function.c (expand_function_end): Pass alignment argument to
emit_block_move in bits, not bytes.
Index: function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.186
diff -c -3 -p -r1.186 function.c
*** function.c 2000/03/30 13:46:04 1.186
--- function.c 2000/03/30 20:07:30
*************** expand_function_end (filename, line, end
*** 6441,6447 ****
blktramp = change_address (initial_trampoline, BLKmode, tramp);
emit_block_move (blktramp, initial_trampoline,
GEN_INT (TRAMPOLINE_SIZE),
! TRAMPOLINE_ALIGNMENT / BITS_PER_UNIT);
#endif
INITIALIZE_TRAMPOLINE (tramp, XEXP (DECL_RTL (function), 0), context);
seq = get_insns ();
--- 6441,6447 ----
blktramp = change_address (initial_trampoline, BLKmode, tramp);
emit_block_move (blktramp, initial_trampoline,
GEN_INT (TRAMPOLINE_SIZE),
! TRAMPOLINE_ALIGNMENT);
#endif
INITIALIZE_TRAMPOLINE (tramp, XEXP (DECL_RTL (function), 0), context);
seq = get_insns ();