quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

amd64_asm.c (612B)


      1 void main() {
      2 #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__)
      3 # if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64)
      4 #  error Windows x86_64 calling conventions are not supported yet
      5 # endif
      6 /* neat */
      7 #else
      8 # error !x86_64
      9 #endif
     10 unsigned char i = 0, o = 0, t;
     11 __asm__ __volatile__ ("pxor %%xmm12, %%xmm6 \n"
     12                       "movb (%[i]), %[t] \n"
     13                       "addb %[t], (%[o]) \n"
     14                       : [t] "=&r"(t)
     15                       : [o] "D"(&o), [i] "S"(&i)
     16                       : "memory", "flags", "cc");
     17 }