xbyak/test/test_by_xed.cpp

28 lines
434 B
C++
Raw Permalink Normal View History

2024-10-09 19:14:21 -07:00
#include <stdio.h>
#include <xbyak/xbyak.h>
2024-10-12 19:57:55 -07:00
using namespace Xbyak;
2024-10-09 19:14:21 -07:00
struct Code : Xbyak::CodeGenerator {
Code()
2024-10-10 17:55:14 -07:00
: Xbyak::CodeGenerator(4096*8)
2024-10-09 19:14:21 -07:00
{
2024-10-14 16:51:01 -07:00
setDefaultEncodingAVX10(AVX10v2Encoding);
2024-10-10 17:55:14 -07:00
#include "tmp.cpp"
2024-10-09 19:14:21 -07:00
}
};
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;
}