/usr/ccs/bin/as does check for ABI violations - maybe not perfectly, but
anyways lots better, than the GNU-assembler - (not only globals have the
potential of being problematic, among others also inputs and locals, as you see
below), it gives at least a warning (in case of v8plus[a-d], gives an error for
v9[a-d]):
$ /usr/lib/cpp VISmoveImage.s | /usr/ccs/bin/as -DUSE_VIS -xarch=v8plusa -o
VISmoveImage.lo -
/usr/ccs/bin/as: "<stdin>", line 183: warning: v8+ ABI violation: illegal use
of %i or %l register as rs1 in "brz" instruction
/usr/ccs/bin/as: "<stdin>", line 775: warning: v8+ ABI violation: illegal use
of %i or %l register as rs1 in "movrnz" instruction
/usr/ccs/bin/as: "<stdin>", line 880: warning: v8+ ABI violation: illegal use
of %i or %l register as rs1 in "brz" instruction
/usr/ccs/bin/as: "<stdin>", line 922: warning: v8+ ABI violation: illegal use
of %i or %l register as rs1 in "brnz,a" instruction
/usr/ccs/bin/as: "<stdin>", line 946: warning: v8+ ABI violation: illegal use
of %i or %l register as rs1 in "movrnz" instruction
/usr/ccs/bin/as: "<stdin>", line 1141: warning: v8+ ABI violation: illegal use
of %i or %l register as rs1 in "brz" instruction
/usr/ccs/bin/as: "<stdin>", line 2279: warning: v8+ ABI violation: illegal use
of %i or %l register as rs1 in "brz" instruction
/usr/ccs/bin/as: "<stdin>", line 2328: warning: v8+ ABI violation: illegal use
of %i or %l register as rs1 in "brnz,a" instruction
/usr/sfw/bin/gas is less SVR4 ABI conform / and not so verbose:
$ /usr/lib/cpp VISmoveImage.s | /usr/sfw/bin/as -DUSE_VIS -xarch=v8plusa -o
VISmoveImage.lo -
$ file VISmoveImage.lo
VISmoveImage.lo: ELF 32-bit MSB relocatable SPARC32PLUS Version 1, V8+
Required, UltraSPARC1 Extensions Required
$ pwd
/export/home/bochnig/projects/Xorg_alanc/X-src-20070227__20070401sun/X-src-20070227/XW_NV/open-src/driver/xf86-video-sunffb/build_32/xf86-video-sunffb-1.1.0/src
On a side note, Xorg's sunffb driver lost a bit of universal platform
compatibility during the move from imake to gmake/ac/am.
I.e. its configure script assumes, the world consisted of gnu tools (i.e. gcc
and binutils [gas]) alone.
Previously well handled things would by default be a minor problem now:
cc -Kpic -DPIC -x assembler-with-cpp -Wa,-Av9a -c -o ffb_asm.lo ffb_asm.s
cc: Warning: illegal option -xassembler-with-cpp
/opt/SUNWspro/prod/bin/fbe: error: unknown option 'A'
/opt/SUNWspro/prod/bin/fbe: error: unknown option '9'
/opt/SUNWspro/prod/bin/fbe: error: unknown option 'a'
usage: /opt/SUNWspro/prod/bin/fbe [-V] [-Q{y,n}] [-q] [-s]
[-S] [-K {pic,PIC}] [-o objfile] [-L] [-T]
[-P [[-Yc,path] [-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
[-m [-Ym,path]] [-n] [-ul] [-xF]
[-xarch={v7,v8,v8a,v8plus,v8plusa,v8plusb,v9,v9a,v9b}] [-xcode={pic13,pic32}]
file.s...
cc: assembler failed for ffb_asm.s
*** Error code 2
cc -Kpic -DPIC -x assembler-with-cpp -Wa,-Av9a -c -o VISmoveImage.lo
VISmoveImage.s
cc: Warning: illegal option -xassembler-with-cpp
/opt/SUNWspro/prod/bin/fbe: error: unknown option 'A'
/opt/SUNWspro/prod/bin/fbe: error: unknown option '9'
/opt/SUNWspro/prod/bin/fbe: error: unknown option 'a'
usage: /opt/SUNWspro/prod/bin/fbe [-V] [-Q{y,n}] [-q] [-s]
[-S] [-K {pic,PIC}] [-o objfile] [-L] [-T]
[-P [[-Yc,path] [-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
[-m [-Ym,path]] [-n] [-ul] [-xF]
[-xarch={v7,v8,v8a,v8plus,v8plusa,v8plusb,v9,v9a,v9b}] [-xcode={pic13,pic32}]
file.s...
cc: assembler failed for VISmoveImage.s
*** Error code 2
make: Warning: Target `all' not remade because of errors
I'm making progress.
Soon.
marTin
This message posted from opensolaris.org