diff options
author | Martin Mares <mj@ucw.cz> | 2024-02-18 14:15:06 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2024-02-18 14:15:06 +0100 |
commit | f87084246bceb65947d320bd5d53f35d14619b44 (patch) | |
tree | 761dd2b1a532237e52711fd5c5de9fb253823ecc | |
parent | 225dd4ba76e1599cad2ce7eb7b984bb40c12f7ef (diff) | |
download | pciutils-f87084246bceb65947d320bd5d53f35d14619b44.tar.gz |
windows: Comment on MSVC inline asm issues
-rw-r--r-- | lib/i386-io-windows.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/i386-io-windows.h b/lib/i386-io-windows.h index c181b4f..a776bd5 100644 --- a/lib/i386-io-windows.h +++ b/lib/i386-io-windows.h @@ -26,6 +26,13 @@ * GCC version 4.9.0 and higher provides __builtin_ia32_readeflags_uXX() * builtin for XX-mode. This builtin is also available as __readeflags() * function indirectly via <x86intrin.h> header file. + * + * CAVEAT: Semicolon in MSVC __asm block means start of the comment, and not + * end of the __asm statement, like it is for all other C statements. Also + * function which uses MSVC inline assembly cannot be inlined to another function + * (compiler reports a warning about it, not a fatal error). So we add explicit + * curly brackets for __asm blocks, remove misleading semicolons and do not + * declare functions as inline. */ #if defined(_MSC_VER) && (_MSC_VER >= 1500 || (_MSC_VER >= 1400 && defined(__BUILDMACHINE__))) #pragma intrinsic(__readeflags) |