224 int (*f1)(int) = code.
getCurr<int (*)(int)>();
228 int (*f2)(int, int) = code.getCurr<int (*)(int, int)>();
232 int (*f3)(int, int, int) = code.getCurr<int (*)(int, int, int)>();
234 check(14, f3(1, 4, 9));
236 int (*f4)(int, int, int, int) = code.getCurr<int (*)(int, int, int, int)>();
238 check(30, f4(1, 4, 9, 16));
240 int (*f5)(int, int, int, int) = code.getCurr<int (*)(int, int, int, int)>();
242 check(23, f5(2, 5, 7, 9));
244 int (*f6)(int, int, int, int) = code.getCurr<int (*)(int, int, int, int)>();
246 check(18, f6(3, 4, 5, 6));
248 int (*f7)(int, int, int) = code.getCurr<int (*)(int, int, int)>();
250 check(12, f7(3, 4, 5));
252 int (*f8)(int, int, int) = code.getCurr<int (*)(int, int, int)>();
254 check(23, f8(5, 8, 10));
256 int (*f9)(int, int, int) = code.getCurr<int (*)(int, int, int)>();
258 check(60, f9(10, 20, 30));
260 int (*f10)(int, int, int, int) = code.getCurr<int (*)(int, int, int, int)>();
262 check(100, f10(10, 20, 30, 40));
264 int (*f11)() = code.getCurr<int (*)()>();
268 int (*f12)(int, int, int, int) = code.getCurr<int (*)(int, int, int, int)>();
270 check(24, f12(3, 5, 7, 9));
291 Xbyak::Reg64 regTbl[
N];
292 for (
int i = 0; i <
N; i++) {
293 regTbl[i] = Xbyak::Reg64(i);
295 Xbyak::util::Pack
p(regTbl,
N);
301 { 0, 10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
302 { 1, 9, { 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
303 { 2, 8, { 2, 3, 4, 5, 6, 7, 8, 9 } },
304 { 3, 7, { 3, 4, 5, 6, 7, 8, 9 } },
305 { 4, 6, { 4, 5, 6, 7, 8, 9 } },
306 { 5, 5, { 5, 6, 7, 8, 9 } },
307 { 6, 4, { 6, 7, 8, 9 } },
308 { 7, 3, { 7, 8, 9 } },
311 { 3, 5, { 3, 4, 5, 6, 7 } },
313 for (
size_t i = 0; i <
sizeof(
tbl) /
sizeof(*tbl); i++) {
314 const int pos =
tbl[i].pos;
315 const int num =
tbl[i].num;
317 if (pos + num ==
N) {