error:instruction requires a CPU feature not currently enabled for pusha, popa, .code32, .code64,

While compiling bitvisor-1.1 with clang, I am getting the following
errors. I am using clang from the trunk 118916 with x86_64 on linux.

I have filed a new bug report 8595

http://llvm.org/bugs/show_bug.cgi?id=8595

callrealmode.c:62:3: error: instruction requires a CPU feature not currently
enabled
                "push %%rax\n"
                ^
<inline asm>:30:1: note: instantiated into assembly here
pusha

callrealmode.c:62:3: error: warning: ignoring directive for now
                "push %%rax\n"
                ^
<inline asm>:40:1: note: instantiated into assembly here
.code64

callrealmode.c:62:3: error: instruction requires a CPU feature not currently
enabled
                "push %%rax\n"
                ^
<inline asm>:32:1: note: instantiated into assembly here
popa
^

Thanks,
Santosh

Looks like the assembler thinks it's compiling for a 32-bit CPU. There really isn't any other CPU feature other than 64-bit support that's required for this instruction.

Sebastian

Yep, the issue here is that the mc assembler currently ignores .code32 and .code64, so it doesn't see the mode switch.

-Chris