C OFFSET(i) C Expands to 4*i, or to the empty string if i is zero define(, ) C OFFSET64(i) C Expands to 8*i, or to the empty string if i is zero define(, ) dnl LREG(reg) gives the 8-bit register corresponding to the given 64-bit register. define(,)dnl define(,)dnl define(,)dnl define(,)dnl dnl W64_ENTRY(nargs, xmm_used) define(, < changequote([,])dnl ifelse(<<<<<<<<<<<<<<< ignored; only for balancing) ifelse(W64_ABI,yes,[ ifelse(eval($2 > 6), 1, [ sub [$]eval(8 + 16*($2 - 6)), %rsp movdqu %xmm6, 0(%rsp) ]) ifelse(eval($2 > 7), 1, [ movdqu %xmm7, 16(%rsp) ]) ifelse(eval($2 > 8), 1, [ movdqu %xmm8, 32(%rsp) ]) ifelse(eval($2 > 9), 1, [ movdqu %xmm9, 48(%rsp) ]) ifelse(eval($2 > 10), 1, [ movdqu %xmm10, 64(%rsp) ]) ifelse(eval($2 > 11), 1, [ movdqu %xmm11, 80(%rsp) ]) ifelse(eval($2 > 12), 1, [ movdqu %xmm12, 96(%rsp) ]) ifelse(eval($2 > 13), 1, [ movdqu %xmm13, 112(%rsp) ]) ifelse(eval($2 > 14), 1, [ movdqu %xmm14, 128(%rsp) ]) ifelse(eval($2 > 15), 1, [ movdqu %xmm15, 144(%rsp) ]) ifelse(eval($1 >= 1), 1, [ push %rdi mov %rcx, %rdi ]) ifelse(eval($1 >= 2), 1, [ push %rsi mov %rdx, %rsi ]) ifelse(eval($1 >= 3), 1, [ mov %r8, %rdx ]) ifelse(eval($1 >= 4), 1, [ mov %r9, %rcx ]) ifelse(eval($1 >= 5), 1, [ mov 56(%rsp), %r8 ]) ]) changequote(<,>)dnl >) dnl W64_EXIT(nargs, xmm_used) define(, < changequote([,])dnl ifelse(<<<<<<<<<<<< ignored; only for balancing) ifelse(W64_ABI,yes,[ ifelse(eval($1 >= 2), 1, [ pop %rsi ]) ifelse(eval($1 >= 1), 1, [ pop %rdi ]) ifelse(eval($2 > 15), 1, [ movdqu 144(%rsp), %xmm15 ]) ifelse(eval($2 > 14), 1, [ movdqu 128(%rsp), %xmm14 ]) ifelse(eval($2 > 13), 1, [ movdqu 112(%rsp), %xmm13 ]) ifelse(eval($2 > 12), 1, [ movdqu 96(%rsp), %xmm12 ]) ifelse(eval($2 > 11), 1, [ movdqu 80(%rsp), %xmm11 ]) ifelse(eval($2 > 10), 1, [ movdqu 64(%rsp), %xmm10 ]) ifelse(eval($2 > 9), 1, [ movdqu 48(%rsp), %xmm9 ]) ifelse(eval($2 > 8), 1, [ movdqu 32(%rsp), %xmm8 ]) ifelse(eval($2 > 7), 1, [ movdqu 16(%rsp), %xmm7 ]) ifelse(eval($2 > 6), 1, [ movdqu 0(%rsp), %xmm6 add [$]eval(8 + 16*($2 - 6)), %rsp ]) ]) changequote(<,>)dnl >)