-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgen.cpp
23 lines (19 loc) · 914 Bytes
/
gen.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "common.hpp"
void test_generic()
{
GEN(Reg64, "add", (g->add(dst, src)), false, OT_INT);
GEN(Reg64, "lea", (g->lea(dst, g->ptr[src])), false, OT_INT);
GEN(Reg64, "xor dst,dst", (g->xor_(dst, dst)), false, OT_INT);
GEN(Reg64, "xor", (g->xor_(dst, src)), false, OT_INT);
GEN(Reg64, "load", (g->mov(dst, g->ptr[src + g->rdx])), false, OT_INT);
GEN(Reg64, "crc32", (g->crc32(dst, src)), false, OT_INT);
GEN(Reg64, "store [mem+0]->load[mem+0]",
(g->mov(g->ptr[src+g->rdx],g->rdi)) ; (g->mov(dst, g->ptr[g->rdx])),
false, OT_INT);
GEN(Reg64, "store [mem+0]->load[mem+1]",
(g->mov(g->ptr[src+g->rdx],g->rdi)) ; (g->mov(dst, g->ptr[g->rdx + 1])),
false, OT_INT);
GEN(Xmm, "pxor", (g->pxor(dst, src)), false, OT_INT);
GEN(Xmm, "padd", (g->paddd(dst, src)), false, OT_INT);
GEN(Xmm, "pmuldq", (g->pmuldq(dst, src)), false, OT_INT);
}