mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-03 13:14:42 +01:00
commit
916d7cf9bd
30 changed files with 589 additions and 155 deletions
5
externals/xbyak/sample/Makefile
vendored
5
externals/xbyak/sample/Makefile
vendored
|
|
@ -1,6 +1,7 @@
|
|||
XBYAK_INC=../xbyak/xbyak.h
|
||||
CXX?=g++
|
||||
|
||||
BOOST_EXIST=$(shell echo "\#include <boost/spirit/core.hpp>" | (gcc -E - 2>/dev/null) | grep "boost/spirit/core.hpp" >/dev/null && echo "1")
|
||||
BOOST_EXIST=$(shell echo "#include <boost/spirit/core.hpp>" | $(CXX) -x c++ -c - 2>/dev/null && echo 1)
|
||||
UNAME_M=$(shell uname -m)
|
||||
|
||||
ONLY_64BIT=0
|
||||
|
|
@ -104,7 +105,7 @@ profiler-vtune: profiler.cpp ../xbyak/xbyak_util.h
|
|||
$(CXX) $(CFLAGS) profiler.cpp -o $@ -DXBYAK_USE_VTUNE -I /opt/intel/vtune_amplifier/include/ -L /opt/intel/vtune_amplifier/lib64 -ljitprofiling -ldl
|
||||
|
||||
clean:
|
||||
rm -rf *.o $(TARGET) *.exe profiler profiler-vtune
|
||||
rm -rf $(TARGET) profiler profiler-vtune
|
||||
|
||||
test : test0.cpp $(XBYAK_INC)
|
||||
test64: test0.cpp $(XBYAK_INC)
|
||||
|
|
|
|||
2
externals/xbyak/sample/quantize.cpp
vendored
2
externals/xbyak/sample/quantize.cpp
vendored
|
|
@ -199,7 +199,7 @@ int main(int argc, char *argv[])
|
|||
quantize2(dest2, src, qTbl);
|
||||
for (int i = 0; i < N; i++) {
|
||||
if (dest[i] != dest2[i]) {
|
||||
printf("err[%d] %d %d\n", i, dest[i], dest2[i]);
|
||||
printf("err[%d] %u %u\n", i, dest[i], dest2[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
7
externals/xbyak/sample/test_util.cpp
vendored
7
externals/xbyak/sample/test_util.cpp
vendored
|
|
@ -89,6 +89,13 @@ void putCPUinfo(bool onlyCpuidFeature)
|
|||
{ Cpu::tMOVDIRI, "movdiri" },
|
||||
{ Cpu::tMOVDIR64B, "movdir64b" },
|
||||
{ Cpu::tCLZERO, "clzero" },
|
||||
{ Cpu::tAMX_FP16, "amx_fp16" },
|
||||
{ Cpu::tAVX_VNNI_INT8, "avx_vnni_int8" },
|
||||
{ Cpu::tAVX_NE_CONVERT, "avx_ne_convert" },
|
||||
{ Cpu::tAVX_IFMA, "avx_ifma" },
|
||||
{ Cpu::tRAO_INT, "rao-int" },
|
||||
{ Cpu::tCMPCCXADD, "cmpccxadd" },
|
||||
{ Cpu::tPREFETCHITI, "prefetchiti" },
|
||||
};
|
||||
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
|
||||
if (cpu.has(tbl[i].type)) printf(" %s", tbl[i].str);
|
||||
|
|
|
|||
8
externals/xbyak/sample/toyvm.cpp
vendored
8
externals/xbyak/sample/toyvm.cpp
vendored
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
mem_ 4byte x 65536
|
||||
|
||||
すべての命令は4byte固定
|
||||
即値は全て16bit
|
||||
all instructions are fixed at 4 bytes.
|
||||
all immediate values are 16-bit.
|
||||
|
||||
R = A or B
|
||||
vldiR, imm ; R = imm
|
||||
|
|
@ -109,7 +109,7 @@ public:
|
|||
reg[r] -= imm;
|
||||
break;
|
||||
case PUT:
|
||||
printf("%c %8d(0x%08x)\n", 'A' + r, reg[r], reg[r]);
|
||||
printf("%c %8u(0x%08x)\n", 'A' + r, reg[r], reg[r]);
|
||||
break;
|
||||
case JNZ:
|
||||
if (reg[r] != 0) pc += static_cast<signed short>(imm);
|
||||
|
|
@ -294,7 +294,7 @@ lp:
|
|||
p = t;
|
||||
n--;
|
||||
if (n != 0) goto lp;
|
||||
printf("c=%d(0x%08x)\n", c, c);
|
||||
printf("c=%u(0x%08x)\n", c, c);
|
||||
}
|
||||
|
||||
int main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue