[LLVMdev] Intel vs. AT&T Assembly.

Ralph Corderoy ralph at inputplus.co.uk
Sat Apr 29 11:41:23 PDT 2006


Hi,

> It's a long way towards it:
> 
>     # AT&T.                      # Intel.
>             .text                        .text
>             .align  16                   .align  16
>             .globl  main                 .globl  main
>                                          .type   main, @function
>     main:                        main:
>             subl $12, %esp               sub esp, 12
>             fnstcw 10(%esp)              fnstcw word ptr [esp + 10]
>             movb $2, 11(%esp)            mov byte ptr [esp + 11], 2
>             fldcw 10(%esp)               fldcw word ptr [esp + 10]
>             movl 20(%esp), %eax          mov eax, dword ptr [esp + 20]
>             movl 4(%eax), %eax           mov eax, dword ptr [eax + 4]

Whoops.  I've provided my post-processed version of lli's Intel output
which, since I removed the `%' and lowered the `DWORD PTR' isn't a good
example.  Still, you get the gist;  there are already significant
differences between the two.

Cheers,


Ralph.





More information about the llvm-dev mailing list