[PATCH, i386] RTM support

Uros Bizjak ubizjak@gmail.com
Tue Feb 21 15:02:00 GMT 2012


On Tue, Feb 21, 2012 at 3:21 PM, Jakub Jelinek <jakub@redhat.com> wrote:

>> As far as I undersand, correct one seems like that:
>> .intel_syntax
>>         xbegin $0
>>         nop
>>
>> .att_syntax
>>         xbegin ($0)
>>         nop
>>
>> Which disassembles into:
>> 0000000000000000 <.text>:
>>    0:   c7 f8 00 00 00 00       xbeginq 0x6
>>    6:   90                      nop
>>    7:   c7 f8 00 00 00 00       xbeginq 0xd
>>    d:   90                      nop
>
> Doesn't seem to do what you expect (nor xbegin $0 in Intel syntax):
> $ /usr/src/binutils/obj/gas/as-new -o /tmp/a.o /tmp/a.s
> $ cat /tmp/a.s
> #.intel_syntax noprefix
> nop
> xbegin ($0)
> nop
> xbegin .+6
> nop
> $ /usr/src/binutils/obj/binutils/objdump -dr /tmp/a.o
>
> /tmp/a.o:     file format elf64-x86-64
>
>
> Disassembly of section .text:
>
> 0000000000000000 <.text>:
>   0:   90                      nop
>   1:   c7 f8 00 00 00 00       xbeginq 0x7
>   3: R_X86_64_PC32     $0+0xfffffffffffffffc
>   7:   90                      nop
>   8:   c7 f8 00 00 00 00       xbeginq 0xe
>   e:   90                      nop
>
> Note the relocation in there, you don't want there any.

OK, need to install the latest SVN binutils to try this out.

Ultimatelly, we can generate the label and pass it to xbegin_1. This
will definitelly avoid all confusion where +6 comes from.

Uros.



More information about the Gcc-patches mailing list