This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: dubious use of O_subtract in gas/config/tc-ia64.c
- From: James E Wilson <wilson at specifixinc dot com>
- To: Jan Beulich <JBeulich at novell dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 10 Feb 2005 19:49:53 -0800
- Subject: Re: dubious use of O_subtract in gas/config/tc-ia64.c
- References: <s1ff960c.091@emea1-mh.id2.novell.com>
On Tue, 2005-02-01 at 06:46, Jan Beulich wrote:
> Could anyone shed some light on the relevance of the two instances of
> checks for O_subtract within operand_match(), cases IA64_OPND_IMMU64,
> IA64_OPND_IMM14, and IA64_OPND_IMM22?
This code is present in the first check in, so it was probably needed
for the linux kernel port.
I see in your example that you are subtracting two symbols in different
sections, which isn't something that we can easily compute.
If I write an example that subtracts two symbols in the same section,
then I get a reasonable result. This testcase does not work if I
comment out the O_subtract checks. Perhaps what we need is just a check
to verify that the symbols are in the same section?
.data
bsym: data8 0
esym:
.text
start:
mov r1 = esym-bsym
movl r1 = esym-bsym
I tried a quick linux kernel build with a hacked assembler and found a
similar but slightly different testcase. This occurs twice in the
arch/ia64/kernel/pal.S file.
.text
1:
adds r8 = 1f-1b,r8
1:
I didn't try looking for other examples.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com