assemble: Only treat a displacement as signed if it is < asizesignrel
commit72bf3fe98c8cc6f0ebcc9329b28fe02d9ddeef57
authorH. Peter Anvin <hpa@zytor.com>
Wed, 27 Nov 2013 04:19:53 +0000 (26 20:19 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 27 Nov 2013 04:19:53 +0000 (26 20:19 -0800)
tree05ea680608b652c53a1c21875ca77689ef78b6b3
parent186b533425405ac4e1172c7f0e6751848f04aabd
assemble: Only treat a displacement as signed if it is < asize

Only generate a signed relocation if the displacement size is less
than the address size.  This matters when involving address size
overrides.

It is technically impossible to do this one perfectly, because it is
never really knowable if the displacement offset is used as a base or
an index.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
assemble.c
test/relocs.asm