[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch 4.1.3] Correctly handle zero operands with gcc on PA
From: |
John David Anglin |
Subject: |
Re: [patch 4.1.3] Correctly handle zero operands with gcc on PA |
Date: |
Thu, 27 May 2004 18:33:37 -0400 (EDT) |
> "John David Anglin" <address@hidden> writes:
> >
> > Here is a small fix to correctly handle zero operands using gcc on the
> > the PA. See gcc/config/pa.c.
> >
> > 2004-05-24 John David Anglin <address@hidden>
> >
> > * longlong.h (add_ssaaaa, sub_ddmmss): Use 'r' modifier with register
> > or zero operands.
>
> You need to provide a failing test case. As far as I know these
> macros work in current usages.
This is the error:
gcc -DHAVE_CONFIG_H -I. -I../../mpn -I.. -D__GMP_WITHIN_GMP -I../.. -DOPERATION_
divrem_1 -O2 -c divrem_1.c -fPIC -DPIC -o .libs/divrem_1.o
/var/tmp//cc1NtSU6.s: Assembler messages:
/var/tmp//cc1NtSU6.s:119: Error: Invalid Compare/Subtract Condition: db
/var/tmp//cc1NtSU6.s:119: Error: Invalid Compare/Subtract Condition: db
/var/tmp//cc1NtSU6.s:156: Error: Invalid Compare/Subtract Condition: db
/var/tmp//cc1NtSU6.s:156: Error: Invalid Compare/Subtract Condition: db
/var/tmp//cc1NtSU6.s:195: Error: Invalid Compare/Subtract Condition: db
/var/tmp//cc1NtSU6.s:195: Error: Invalid Compare/Subtract Condition: db
/var/tmp//cc1NtSU6.s:285: Error: Invalid Compare/Subtract Condition: db
/var/tmp//cc1NtSU6.s:285: Error: Invalid Compare/Subtract Condition: db
/var/tmp//cc1NtSU6.s:325: Error: Invalid Compare/Subtract Condition: db
/var/tmp//cc1NtSU6.s:325: Error: Invalid Compare/Subtract Condition: db
This is the assembly code generated by gcc on line 119:
sub,db %r20,0,%r20
The error message from gas is misleading. The actual error is the
0 in the second operand. The HP assembler accepts integers for register
numbers, but gas doesn't. Changing the macro as indicated in the
patch causes the second operand to be output as %r0. Register r0
always reads as a zero.
This is the gcc version:
# gcc -v
Reading specs from
/opt/gnu64/gcc/gcc-3.4.0/lib/gcc/hppa64-hp-hpux11.11/3.4.0/specs
Configured with: ../gcc/configure --with-gnu-as --with-as=/opt/gnu64/bin/as
--with-ld=/usr/ccs/bin/ld --enable-shared --disable-nls
--with-local-prefix=/opt/gnu64 --prefix=/opt/gnu64/gcc/gcc-3.4.0
--host=hppa64-hp-hpux11.11 --enable-threads=posix --disable-checking
Thread model: posix
gcc version 3.4.0
This how gmp was configured:
configured by ../configure, generated by GNU Autoconf 2.52,
with options \"--prefix=/opt/gnu64 --build=hppa2.0w-hp-hpux11.11
--host=hppa2.0w-hp-hpux11.11 CC=gcc CFLAGS=-O2 CXXFLAGS=-O2 CXX=g++
build_alias=hppa2.0w-hp-hpux11.11 host_alias=hppa2.0w-hp-hpux11.11\"
As noted in previous mail, the default config.guess values for the 64-bit
version of gcc need to be overridden to obtain the 2.0w ABI. It's not
possible to do this directly:
# ../configure ABI=2.0w --prefix=/opt/gnu64
checking build system type... hppa64-hp-hpux11.11
checking host system type... hppa64-hp-hpux11.11
checking for a BSD compatible install... /opt/gnu/bin/install -c
checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: error: ABI=2.0w is not among the following valid choices: standard
Dave
--
J. David Anglin address@hidden
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)