aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_by_xed.cpp
blob: af39296d2c0b7a1e50c8b10973f8e39ee05b5dd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
#include <xbyak/xbyak.h>

using namespace Xbyak;

struct Code : Xbyak::CodeGenerator {
	Code()
		 : Xbyak::CodeGenerator(4096*8)
	{
		setDefaultEncoding(EvexEncoding, AVX10v2Encoding);
#include "tmp.cpp"
	}
};

int main()
    try
{
    Code c;
	FILE *fp = fopen("bin", "wb");
	if (fp) {
		fwrite(c.getCode(), 1, c.getSize(), fp);
		fclose(fp);
	}
} catch (std::exception& e) {
    printf("ERR %s\n", e.what());
	return 1;
}