logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0001-Only-use-__asm__-on-GNU-compatible-compilers.patch (802B)


  1. From fe88b59e4028952b4d157f0934e14b9eed058cd9 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Mon, 10 Jun 2019 01:47:01 -0700
  4. Subject: [PATCH] Only use __asm__ on GNU-compatible compilers
  5. ---
  6. lib/common/cpu.h | 2 +-
  7. 1 file changed, 1 insertion(+), 1 deletion(-)
  8. diff --git a/lib/common/cpu.h b/lib/common/cpu.h
  9. index 3f15d560..8d73a2ab 100644
  10. --- a/lib/common/cpu.h
  11. +++ b/lib/common/cpu.h
  12. @@ -118,7 +118,7 @@ MEM_STATIC ZSTD_cpuid_t ZSTD_cpuid(void) {
  13. : "a"(7), "c"(0)
  14. : "edx");
  15. }
  16. -#elif defined(__x86_64__) || defined(_M_X64) || defined(__i386__)
  17. +#elif (defined(__x86_64__) || defined(_M_X64) || defined(__i386__)) && defined(__GNUC__)
  18. U32 n;
  19. __asm__("cpuid" : "=a"(n) : "a"(0) : "ebx", "ecx", "edx");
  20. if (n >= 1) {
  21. --
  22. 2.45.2