This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386] RTM support


On Tue, Feb 21, 2012 at 06:11:54PM +0400, Kirill Yukhin 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.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]