intel inline assembly with gcc
Posted: Sun Jun 26, 2005 11:00 pm
hi,
i want to use inline assembly (with INTEL syntax) in my C Kernel code.
can i code like this in one of my C functions :
void CheckProcessor(void)
{
asm
{
mov eax,0x00;
cpuid;
.........
}
}
i give following compile options :
gcc -o KLoader.o -c KLoader.c -Wall -Werror -W --no-warn -nostdlib -nostartfiles -nodefaultlibs -masm=intel
given above options gcc doesn't compile source code. i think it has some problem with 'asm' keyword?
any solution would be highly appreciated!
i want to use inline assembly (with INTEL syntax) in my C Kernel code.
can i code like this in one of my C functions :
void CheckProcessor(void)
{
asm
{
mov eax,0x00;
cpuid;
.........
}
}
i give following compile options :
gcc -o KLoader.o -c KLoader.c -Wall -Werror -W --no-warn -nostdlib -nostartfiles -nodefaultlibs -masm=intel
given above options gcc doesn't compile source code. i think it has some problem with 'asm' keyword?
any solution would be highly appreciated!