kmod-VirtualBox + gcc 4.8: 'asm' operand has impossible constraints

Sandro Mani manisandro at gmail.com
Tue Jan 29 22:53:20 UTC 2013


Hi,

Attempting to compile the VirtualBox kernel module with 
gcc-4.8.0-0.6.fc19.x86_64 results in
vboxnetadp/include/iprt/asm.h:4144:9: error: 'asm' operand has 
impossible constraints

The code where it fails is embedded below. Any assembler-knowing person 
around who can shed some light on the issue? :)

Thanks,
Sandro


Code:
         __asm__ __volatile__("repe; scasl\n\t"
                              "je    1f\n\t"
#  ifdef RT_ARCH_AMD64
                              "lea   -4(%%rdi), %%rdi\n\t"
                              "xorl  (%%rdi), %%eax\n\t"
                              "subq  %5, %%rdi\n\t"
#  else
                              "lea   -4(%%edi), %%edi\n\t"
                              "xorl  (%%edi), %%eax\n\t"
                              "subl  %5, %%edi\n\t"
#  endif
                              "shll  $3, %%edi\n\t"
                              "bsfl  %%eax, %%edx\n\t"
                              "addl  %%edi, %%edx\n\t"
                              "1:\t\n"
                              : "=d" (iBit),
                                "=&c" (uECX),
                                "=&D" (uEDI),
                                "=&a" (uEAX)
                              : "0" (0xffffffff),
                                "mr" (pvBitmap),
                                "1" (cBits >> 5),
                                "2" (pvBitmap),
                                "3" (0xffffffff));


More information about the test mailing list