dubious use of O_subtract in gas/config/tc-ia64.c
James E Wilson
wilson@specifixinc.com
Fri Feb 11 12:08:00 GMT 2005
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
More information about the Binutils
mailing list