2 C Expands to 4*i, or to the empty string if i is zero
3 define(<OFFSET>, <ifelse($1,0,,eval(4*$1))>)
6 C Expands to 8*i, or to the empty string if i is zero
7 define(<OFFSET64>, <ifelse($1,0,,eval(8*$1))>)
9 dnl LREG(reg) gives the 8-bit register corresponding to the given 64-bit register.
10 define(<LREG>,<ifelse(
27 define(<HREG>,<ifelse(
33 define(<WREG>,<ifelse(
50 define(<XREG>,<ifelse(
67 dnl W64_ENTRY(nargs, xmm_used)
70 ifelse(<<<<<<<<<<<<<<<< ignored; only for balancing)
72 ifelse(eval($2 > 6), 1, [
73 sub [$]eval(8 + 16*($2 - 6)), %rsp
76 ifelse(eval($2 > 7), 1, [
77 movdqu %xmm7, 16(%rsp)
79 ifelse(eval($2 > 8), 1, [
80 movdqu %xmm8, 32(%rsp)
82 ifelse(eval($2 > 9), 1, [
83 movdqu %xmm9, 48(%rsp)
85 ifelse(eval($2 > 10), 1, [
86 movdqu %xmm10, 64(%rsp)
88 ifelse(eval($2 > 11), 1, [
89 movdqu %xmm11, 80(%rsp)
91 ifelse(eval($2 > 12), 1, [
92 movdqu %xmm12, 96(%rsp)
94 ifelse(eval($2 > 13), 1, [
95 movdqu %xmm13, 112(%rsp)
97 ifelse(eval($2 > 14), 1, [
98 movdqu %xmm14, 128(%rsp)
100 ifelse(eval($2 > 15), 1, [
101 movdqu %xmm15, 144(%rsp)
103 ifelse(eval($1 >= 1), 1, [
107 ifelse(eval($1 >= 2), 1, [
111 ifelse(eval($1 >= 3), 1, [
114 ifelse(eval($1 >= 4), 1, [
117 ifelse(eval($1 >= 5), 1, [
118 ifelse(eval($2 > 6), 1, [
119 mov eval(8 + 16*($2 - 6) + 56)(%rsp), %r8
128 dnl W64_EXIT(nargs, xmm_used)
131 ifelse(<<<<<<<<<<<< ignored; only for balancing)
133 ifelse(eval($1 >= 2), 1, [
136 ifelse(eval($1 >= 1), 1, [
139 ifelse(eval($2 > 15), 1, [
140 movdqu 144(%rsp), %xmm15
142 ifelse(eval($2 > 14), 1, [
143 movdqu 128(%rsp), %xmm14
145 ifelse(eval($2 > 13), 1, [
146 movdqu 112(%rsp), %xmm13
148 ifelse(eval($2 > 12), 1, [
149 movdqu 96(%rsp), %xmm12
151 ifelse(eval($2 > 11), 1, [
152 movdqu 80(%rsp), %xmm11
154 ifelse(eval($2 > 10), 1, [
155 movdqu 64(%rsp), %xmm10
157 ifelse(eval($2 > 9), 1, [
158 movdqu 48(%rsp), %xmm9
160 ifelse(eval($2 > 8), 1, [
161 movdqu 32(%rsp), %xmm8
163 ifelse(eval($2 > 7), 1, [
164 movdqu 16(%rsp), %xmm7
166 ifelse(eval($2 > 6), 1, [
167 movdqu 0(%rsp), %xmm6
168 add [$]eval(8 + 16*($2 - 6)), %rsp