binutils 2.14a i370 gas literal issue
Jens Remus
jremus@linux.ibm.com
Wed Aug 21 10:18:20 GMT 2024
Hello Paul!
Am 21.08.2024 um 10:11 schrieb Paul Edwards:
> I am aware that 2.14a is out of support, and I am also aware
> that the i370 target of gas is no longer supported at all on the
> modern binutils.
>
> However, if someone is interested in helping resolve this
> issue "for old time's sake", that would be great.
As a former z/VSE developer with HLASM background I could not resist the
urge to have a short look.
> Basically the issue is - where did all my C1 disappear to?
I assume it must be a bug in the customized Binutils build you are
using. If you are lucky it may just be a glitch in the produced listing
and not in the object code.
> Note that I am using a slightly modified 2.14a - the modifications
> can be found in binutils-stage* in custom.zip from pdos.org and
> the precompiled binaries that are run below are available in
> customb.zip from pdos.org
>
> I don't know what the situation is with other versions of binutils.
i370 support got removed in Binutils 2.31 with commit 6793974daae8
("Remove i370 support"). Therefore I have built Binutils 2.30 on Linux
as follows and gave it a try. The results don't look very promising.
This may be due to my build being broken, since I could only get it to
build using the current compilers by suppressing compile warnings
getting treated as errors (--disable-werror).
$ git checkout binutils-2_30-branch
$ mkdir build-i370
$ cd build-i370
$ ../configure --prefix=$HOME/temp/binutils-2.30-i370
--target=i370-linux-gnu --enable-obsolete --disable-werror --disable-gdb
$ make -j $(nproc)
$ make install
$ cd $HOME/temp/binutils-2.30-i370
$ cat paul.s
.text
.globl main
.using .,r7
MVC 92(8,r13),=XL8'C1C1C1C1C1C1C1C1'
MVC 100(8,r13),=XL8'C2C2C2C2C2C2C2C2'
.ltorg
$ bin/i370-linux-gnu-as -a=list.txt -o paul.o paul.s
$ cat list.txt
GAS LISTING paul.s page 1
1 .text
2 .globl main
3 .using .,r7
4 0000 D207D05C MVC 92(8,r13),=XL8'C1C1C1C1C1C1C1C1'
4 7010
5 0006 D207D064 MVC 100(8,r13),=XL8'C2C2C2C2C2C2C2C2'
5 7012
6 000c 00000000 .ltorg
6 C1C1C1C1
6 C1C1C1C1
6 C2C2C2C2
6 C2C2C2C2
GAS LISTING paul.s page 2
NO DEFINED SYMBOLS
UNDEFINED SYMBOLS
main
The offset of the literal pool in the listing looks odd. But it is
apparently correct in the object (see below; although i370-objdump has
issues to disassemble). The offsets encoded in the MVC instructions
relative to r7 seem wrong to me though. They appear to be correct in
your listing.
> D:\devel\gcc\gcc>type list.txt
> GAS LISTING paul.s page 1
>
>
> 1 .text
> 2 .globl main
> 3 .using .,r7
> 4 0000 D207D05C MVC 92(8,r13),=XL8'C1C1C1C1C1C1C1C1'
> 4 7010
> 5 0006 D207D064 MVC 100(8,r13),=XL8'C2C2C2C2C2C2C2C2'
> 5 7018
> 6 000c 00000000 .ltorg
> 6 C2C2C2C2
> 6 C2C2C2C2
> 6 C2C2C2C2
> 6 C2C2C2C2
> ♀GAS LISTING paul.s page 2
>
>
> NO DEFINED SYMBOLS
>
> UNDEFINED SYMBOLS
> main
Did you check using objdump as follows whether your assembly listing
matches with the generated object code? Maybe your C1s are just missing
in the listing?
$ bin/i370-linux-gnu-objdump -d paul.o
paul.o: file format elf32-i370
Disassembly of section .text:
00000000 <.text>:
0: d2 07 d0 5c mvc 92(7,r13,16(r7)
4: 70 10
6: d2 07 d0 64 mvc 100(7,r13,18(r7)
a: 70 12
c: 00 00 .short 0x0000
e: 00 00 .short 0x0000
10: c1 c1 .short 0xc1c1
12: c1 c1 .short 0xc1c1
14: c1 c1 .short 0xc1c1
16: c1 c1 .short 0xc1c1
18: c2 c2 .short 0xc2c2
1a: c2 c2 .short 0xc2c2
1c: Address 0x000000000000001c is out of bounds.
$ bin/i370-linux-gnu-objdump -s paul.o
paul.o: file format elf32-i370
Contents of section .text:
0000 d207d05c 7010d207 d0647012 00000000 ...\p....dp.....
0010 c1c1c1c1 c1c1c1c1 c2c2c2c2 c2c2c2c2 ................
Good luck with your endeavor!
Regards,
Jens
--
Jens Remus
Linux on Z Development (D3303) and z/VSE Support
+49-7031-16-1128 Office
jremus@de.ibm.com
IBM
IBM Deutschland Research & Development GmbH; Vorsitzender des
Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der
Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
More information about the Binutils
mailing list