Clang integrated Assembler 32 bit code gen

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Clang integrated Assembler 32 bit code gen

Harun Polat
Hey,

is there any way to tell cc1as to generate 32 bit code instead of 64 bit?

I am getting the following errors:
/tmp/file2fwhWk:1674:2: error: invalid instruction mnemonic 'pushfl'
        pushfl ;popl %eax ;cli
        ^
/tmp/file2fwhWk:1899:2: error: invalid instruction mnemonic 'pushfl'
        pushfl ;popl %eax ;andl $0xFFFFFDFF,%eax;orl  %ecx,%eax;pushl %eax;popfl ;
        ^
/tmp/file2fwhWk:1899:69: error: invalid instruction mnemonic 'popfl'
        pushfl ;popl %eax ;andl $0xFFFFFDFF,%eax;orl  %ecx,%eax;pushl %eax;popfl ;

Tested pushfl and popfl with gas --32 and it worked but failed with --64.  

Thanks and best regards.
Reply | Threaded
Open this post in threaded view
|

Re: Clang integrated Assembler 32 bit code gen

Joerg Sonnenberger
On Mon, Apr 29, 2013 at 04:40:11PM -0700, Harun Polat wrote:
> is there any way to tell cc1as to generate 32 bit code instead of 64 bit?

clang -m32 or .code32.

Joerg
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev