With mixed code and data emission, bundles could be misaligned. While there appearantly was a previous attempt to address this (producing an error in such a case), the change below tries to get this in line with how the Intel assembler deals with this - forcing the required alignment. Perhaps the previously added code would then be superfluous and could be removed. Built and tested on ia64-unknown-linux-gnu. Jan gas/ 2005-01-24 Jan Beulich * config/tc-ia64.c (emit_one_bundle): Align fragment to 16 bytes. gas/testsuite/ 2005-01-24 Jan Beulich * gas/ia64/balign[.ds]: New. * gas/ia64/ia64.exp: Run new test. --- /home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/config/tc-ia64.c 2005-01-18 10:43:33.000000000 +0100 +++ 2005-01-24.08.40/gas/config/tc-ia64.c 2005-01-24 10:21:43.572025489 +0100 @@ -6191,6 +6191,7 @@ emit_one_bundle () for (i = 0; i < 3; ++i) insn[i] = nop[ia64_templ_desc[template].exec_unit[i]]; + frag_align (4, 0, 0); f = frag_more (16); /* Check to see if this bundle is at an offset that is a multiple of 16-bytes --- /home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/testsuite/gas/ia64/balign.d 1970-01-01 01:00:00.000000000 +0100 +++ 2005-01-24.08.40/gas/testsuite/gas/ia64/balign.d 2005-01-21 15:42:17.000000000 +0100 @@ -0,0 +1,13 @@ +#objdump: -t +#name: ia64 bundle align + +.*: +file format .* + +SYMBOL TABLE: +0+00 l d .text[[:space:]]+[[:xdigit:]]+ .text +0+00 l d .data[[:space:]]+[[:xdigit:]]+ .data +0+00 l d .bss[[:space:]]+[[:xdigit:]]+ .bss +0+00 l .text[[:space:]]+[[:xdigit:]]+ info1 +0+40 l .text[[:space:]]+[[:xdigit:]]+ info2 +0+10 g F .text[[:space:]]+[[:xdigit:]]+ func1 +0+60 g F .text[[:space:]]+[[:xdigit:]]+ func2 --- /home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/testsuite/gas/ia64/balign.s 1970-01-01 01:00:00.000000000 +0100 +++ 2005-01-24.08.40/gas/testsuite/gas/ia64/balign.s 2005-01-21 11:38:52.000000000 +0100 @@ -0,0 +1,18 @@ +.explicit +.proc func1 +info1: + data8 -1 +func1:: + br.ret.sptk rp +.endp func1 + +.align 0x40 +.proc func2 +info2: + data8 -1 + nop 0 + nop 0 + nop 0 +func2:: + br.ret.sptk rp +.endp func2 --- /home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/testsuite/gas/ia64/ia64.exp 2004-07-02 08:26:34.000000000 +0200 +++ 2005-01-24.08.40/gas/testsuite/gas/ia64/ia64.exp 2005-01-24 10:21:43.573978614 +0100 @@ -46,6 +46,7 @@ if [istarget "ia64-*"] then { run_dump_test "real" run_dump_test "align" + run_dump_test "balign" run_dump_test "order" run_dump_test "global" if [istarget "ia64-*-hpux*"] then {