Results 1 to 2 of 2
I am getting this error on rhl5 -32 bit g++ 4.1.2
error: PIC register '%ebx' clobbered in 'asm'
for code:
asm
(
"xorl %%eax,%%eax\n\t"
"cpuid\n\t"
: "=a" (MaxInputValue)
:
: ...
- 03-16-2009 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 5
error: PIC register '%ebx' clobbered in 'asm'
I am getting this error on rhl5 -32 bit g++ 4.1.2
error: PIC register '%ebx' clobbered in 'asm'
for code:
asm
(
"xorl %%eax,%%eax\n\t"
"cpuid\n\t"
: "=a" (MaxInputValue)
:
: "%ebx", "%ecx", "%edx"
);
Same code is working on 64 bit machine with same compiler version.
Has anyone got this type of error?
Thanks,
Bharati
- 03-16-2009 #2
PIC is position independent code and in 32 bit it uses the ebx register thats why gcc is complaining...note 64 bit doesn't use ebx for PIC...also I'm not 100% sure I'm right on this....Gerard4143
Make mine Arch Linux


Reply With Quote