This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

vax quad.exp testsuite failure


The following failure occurs with the cvs source from 20010202 under vax-ultrix:

Running /xxx/gnu/binutils-2.10.91/gas/testsuite/gas/vax/quad.exp ...
GAS LISTING /xxx/gnu/binutils-2.10.91/gas/testsuite/gas/vax/quad.s
        page 1


   1                            .text
   2 0000 7D8F7856              movq $0xaabbccdd12345678,r0
   2      3412DDCC
   2      BBAA50
FAIL: quad.s: quadword immediate values

The expected value for the last line is:

   2      BBAA5001

My first impression is that the expected test result is wrong (ie, the
last '01' is incorrect) and the listing output is ok.  However, in testing,
I noted that the native vax as pads the file in the following manner:

bash-2.04# /usr/bin/as -o quad.o quad.s
bash-2.04# /usr/bin/od -x quad.o
0000000  0107 0000 000c 0000 0000 0000 0000 0000
0000020  0000 0000 0000 0000 0000 0000 0000 0000
0000040  8f7d 5678 1234 ccdd aabb 0050 0004 0000
0000060

Here is a dump of the gas generated file:

bash-2.04# ../../../../objdir/gas/as-new -o quad.o quad.s
bash-2.04# /usr/bin/od -x quad.o
0000000  0107 0000 000b 0000 0000 0000 0000 0000
0000020  0000 0000 0000 0000 0000 0000 0000 0000
0000040  8f7d 5678 1234 ccdd aabb 0050
0000053

Note the different file offsets for the data section.  Also, if I add a
`nop' to the test, objdump doesn't print it:

bash-2.04# ../../../../objdir/gas/as-new -o quad.o quad.s
bash-2.04# od -x quad.o
0000000 0107 0000 000c 0000 0000 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000040 8f7d 5678 1234 ccdd aabb 0150
0000054
bash-2.04# ../../../../objdir/binutils/objdump -hd quad.o

quad.o:     file format a.out

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         0000000c  00000000  00000000  00000020  2**2
		  CONTENTS, ALLOC, LOAD, CODE
  1 .data         00000000  0000000c  0000000c  0000002c  2**2
		  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00000000  0000000c  0000000c  00000000  2**2
		  ALLOC
../../../../objdir/binutils/objdump: quad.o: no symbols
Disassembly of section .text:

00000000 <.text>:
   0:   7d 8f 78 56     movq $0xaabbccdd12345678,r0
   4:   34 12 dd cc
   8:   bb aa 50
   b:   Address 0xb is out of bounds.

Thus, there appear to be issues with the padding of the text section
and the disassembly of instructions at the end of the text section.
The native vax assembler appears to pad the text section so that the
data section is aligned to a 4 byte boundary.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]