Log in

View Full Version : Porting MSVC inline assembly code to Linux platform


saad
27th October 2005, 10:34
<Porting MS Visual C inline assembly code to Linux platform>
have someone any information regarding setting any flags or changing the assembly syntax to work in linux/ kdevelop?
i.e. i want to use, MSVC code like below :
void func()
{
int x,y,z;
__asm{
mov eax,edx;
.......
}
}in kdevelop !!!!
:confused:
is this the complete alternate way that i found @some other website

__asm { --> __asm__ (
eax --> %%eax

...

Joe Fenton
30th October 2005, 04:22
http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html

foxyshadis
31st October 2005, 11:22
I knew it existed somewhere.

http://www.niksula.cs.hut.fi/~mtiihone/intel2gas/

But do read the document so you'll know how to fix or modify anything you have to.

Also I found this:

"Good news are that starting from binutils 2.10 release, GAS supports Intel syntax too. It can be triggered with .intel_syntax directive. Unfortunately this mode is not documented (yet?) in the official binutils manual, so if you want to use it, try to examine http://home.snafu.de/phpr/lhpas86.html.gz, which is an extract from AMD 64bit port of binutils 2.11."