Re: [x86]: Allow @GOTOFF in non-memory context?
On Fri, 2010-06-25 at 10:48 -0700, Richard Henderson wrote: ; Current assemblers are broken and do not allow @GOTOFF in ; ought but a memory context. Code, following this comment disables or special-cases pic_symbolic_operands. I'm investigating, which current assemblers are broken, since my assembler from binutils-2.20 happily assembles: addl x...@gotoff(%ebx), %eax in 32bit mode, as well as addq x...@gotpcrel(%rip), %rax in 64bit mode. Note that this *is* a memory context. The problematic cases were addl $...@gotoff, %eax which needed to be written as lea x...@gotoff(%eax), %eax to satisfy the memory context requirement of the broken assemblers. gas 2.13.1 (the oldest supported version as required by documentation) also handles the first form without problems. Uros.
Re: [x86]: Allow @GOTOFF in non-memory context?
On 06/03/2010 05:24 AM, Uros Bizjak wrote: ; Current assemblers are broken and do not allow @GOTOFF in ; ought but a memory context. Code, following this comment disables or special-cases pic_symbolic_operands. I'm investigating, which current assemblers are broken, since my assembler from binutils-2.20 happily assembles: addl x...@gotoff(%ebx), %eax in 32bit mode, as well as addq x...@gotpcrel(%rip), %rax in 64bit mode. Note that this *is* a memory context. The problematic cases were addl $...@gotoff, %eax which needed to be written as lea x...@gotoff(%eax), %eax to satisfy the memory context requirement of the broken assemblers. r~
Re: [x86]: Allow @GOTOFF in non-memory context?
Richard Henderson r...@redhat.com writes: Note that this *is* a memory context. The problematic cases were addl $...@gotoff, %eax which needed to be written as lea x...@gotoff(%eax), %eax to satisfy the memory context requirement of the broken assemblers. The Solaris 8/x86 assembler handles the first form just fine, with output identical to gas 2.20.1. I could dig up older versions if desired, all the way back to Solaris 2.1/x86, but I'd argue they are completely irrelevant by now. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
Re: [x86]: Allow @GOTOFF in non-memory context?
On 06/25/2010 11:09 AM, Rainer Orth wrote: The Solaris 8/x86 assembler handles the first form just fine, with output identical to gas 2.20.1. Excellent. r~
Re: [x86]: Allow @GOTOFF in non-memory context?
Uros Bizjak ubiz...@gmail.com writes: I'm investigating, which current assemblers are broken, since my assembler from binutils-2.20 happily assembles: addl x...@gotoff(%ebx), %eax in 32bit mode, as well as addq x...@gotpcrel(%rip), %rax in 64bit mode. Looking into gcc install documentation, the lowest mentioned version is 2.13.1. I have no idea, if this version supports above asm, so I would like to ask someone with access to this ancient version if he can test this instruction. Also of interest is support from sun as and darwin assembler for similar instructions. I guess darwin should check something like: addl L_x$non_lazy_ptr-L001$pb(%ecx), %eax Ultimately, I would like to remove checks involving pic_symbolic_operands, but removing them on 64bit would be OK, too. Sun as from Solaris 8 onward (32-bit case) resp. Solaris 10 onward (64-bit case) handle those two cases identically to gas 2.15/2.10. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
[x86]: Allow @GOTOFF in non-memory context?
Hello! I'm looking into i386.md, where we have a bunch of instances of following comment: ; Current assemblers are broken and do not allow @GOTOFF in ; ought but a memory context. Code, following this comment disables or special-cases pic_symbolic_operands. I'm investigating, which current assemblers are broken, since my assembler from binutils-2.20 happily assembles: addl x...@gotoff(%ebx), %eax in 32bit mode, as well as addq x...@gotpcrel(%rip), %rax in 64bit mode. Looking into gcc install documentation, the lowest mentioned version is 2.13.1. I have no idea, if this version supports above asm, so I would like to ask someone with access to this ancient version if he can test this instruction. Also of interest is support from sun as and darwin assembler for similar instructions. I guess darwin should check something like: addlL_x$non_lazy_ptr-L001$pb(%ecx), %eax Ultimately, I would like to remove checks involving pic_symbolic_operands, but removing them on 64bit would be OK, too. Thanks, Uros.
Re: [x86]: Allow @GOTOFF in non-memory context?
2010/6/3 Uros Bizjak ubiz...@gmail.com: Hello! I'm looking into i386.md, where we have a bunch of instances of following comment: ; Current assemblers are broken and do not allow @GOTOFF in ; ought but a memory context. Code, following this comment disables or special-cases pic_symbolic_operands. I'm investigating, which current assemblers are broken, since my assembler from binutils-2.20 happily assembles: addl x...@gotoff(%ebx), %eax in 32bit mode, as well as addq x...@gotpcrel(%rip), %rax in 64bit mode. Looking into gcc install documentation, the lowest mentioned version is 2.13.1. I have no idea, if this version supports above asm, so I would like to ask someone with access to this ancient version if he can test this instruction. Also of interest is support from sun as and darwin assembler for similar instructions. I guess darwin should check something like: addl L_x$non_lazy_ptr-L001$pb(%ecx), %eax Ultimately, I would like to remove checks involving pic_symbolic_operands, but removing them on 64bit would be OK, too. Thanks, Uros. Please make sure this want make troubles for x64 target. COFF doesn't support this. Kai -- | (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | ()_() him gain world domination
Re: [x86]: Allow @GOTOFF in non-memory context?
On Thu, 2010-06-03 at 14:24 +0200, Uros Bizjak wrote: I'm looking into i386.md, where we have a bunch of instances of following comment: ; Current assemblers are broken and do not allow @GOTOFF in ; ought but a memory context. Code, following this comment disables or special-cases pic_symbolic_operands. I'm investigating, which current assemblers are broken, since my assembler from binutils-2.20 happily assembles: addl x...@gotoff(%ebx), %eax in 32bit mode, as well as addq x...@gotpcrel(%rip), %rax in 64bit mode. Looking into gcc install documentation, the lowest mentioned version is 2.13.1. I have no idea, if this version supports above asm, so I would like to ask someone with access to this ancient version if he can test this instruction. FYI, binutils-2.13.1 (that doesn't even build out-of-the-box nowadays without a couple of trivial fixes) assembles above instructions without problems, so IMO - as far as ELF is concerned - we can remove this limitation. Uros.