Click to See Complete Forum and Search --> : ASM and "naked" functions


IvanHoe
12-02-2002, 11:51 PM
I have a bunch of MMX functions that I build for Visual C++ that look like this:

static __declspec(naked) void __fastcall SomeMMXFunction()
{
__asm
{
// asm code here.
...
}
}

I'd like to port this to GCC but I need information on controlling the way a function is called and the prolog/epilog code that is generated. All of the functions were designed to be called from assembly code using registers as parameters ("__declspec(naked)" instructs Visual C++ to not generate prolog/epilog code). Does anyone know if this is even possible in GCC and where I can find the documentation for it? Better yet, can GCC use assembly code directly and where can I get information on it?

binaryDigit
12-03-2002, 10:13 AM
http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html

might have what you want.

IvanHoe
12-04-2002, 03:16 PM
Thanks. I think I can make it work with this info. :)