mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 14:54:53 -04:00
random fixes + support clang-cl on visual studio (#1129)
* delete unused shaders * hide some options in debug menu * change fullscreen logic a bit * add "all actors" toggle * borderless fix and fix alpha in direct renderer untextured (do we need a separate shader for that?) * fix fuel cell orbit icons in widescreen * fix `curve` types * refs * fix levitator task... * fix some task stuff * update font code a bit (temp) * cmake, third-party and visual studio overhaul * Update .gitmodules * update modules * clone repos * fix encoding in zydis * where did these come from * try again * add submodule * Update 11zip * Update 11zip * Update 11zip * delete * try again * clang * update compiler flags * delete 11zip. go away. * Create memory-dump-p2s.py * properly * fix minimum architecture c++ compiler flags * fix zydis * oops * Update all-types.gc * fix clang-cl tests * make "all actors" work better, entity debug qol * update game-text conversion code to be more modularized * Create vendor.txt * fix typos and minor things * update refs * clang * Attempt to add clang-cl support to vs2019 and CI * vs2022 + clang-cl * srsly? fix clang build * Update launch.vs.json * extend windows CI timer
This commit is contained in:
+13
-6
@@ -6,22 +6,29 @@ TEST(Zydis, Basic) {
|
||||
// int3, return
|
||||
u8 code[] = {0xcc, 0xc3};
|
||||
ZydisDecoder decoder;
|
||||
ZydisDecoderInit(&decoder, ZYDIS_MACHINE_MODE_LONG_64, ZYDIS_ADDRESS_WIDTH_64);
|
||||
ZydisDecoderInit(&decoder, ZYDIS_MACHINE_MODE_LONG_64, ZYDIS_STACK_WIDTH_64);
|
||||
ZydisFormatter formatter;
|
||||
ZydisFormatterInit(&formatter, ZYDIS_FORMATTER_STYLE_INTEL);
|
||||
|
||||
ZydisDecodedInstruction instr;
|
||||
ZydisDecodedOperand op[ZYDIS_MAX_OPERAND_COUNT_VISIBLE];
|
||||
|
||||
// should get first instruction
|
||||
EXPECT_TRUE(ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder, code, 2, &instr)));
|
||||
EXPECT_TRUE(ZYAN_SUCCESS(ZydisDecoderDecodeFull(&decoder, code, 2, &instr, op,
|
||||
ZYDIS_MAX_OPERAND_COUNT_VISIBLE,
|
||||
ZYDIS_DFLAG_VISIBLE_OPERANDS_ONLY)));
|
||||
char result[256];
|
||||
ZydisFormatterFormatInstruction(&formatter, &instr, result, 256, 0);
|
||||
ZydisFormatterFormatInstruction(&formatter, &instr, op, instr.operand_count_visible, result,
|
||||
sizeof(result), 0);
|
||||
EXPECT_EQ(std::string("int3"), result);
|
||||
EXPECT_EQ(1, instr.length);
|
||||
|
||||
// should get second instruction
|
||||
EXPECT_TRUE(ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder, code + 1, 1, &instr)));
|
||||
ZydisFormatterFormatInstruction(&formatter, &instr, result, 256, 0);
|
||||
EXPECT_TRUE(ZYAN_SUCCESS(ZydisDecoderDecodeFull(&decoder, code + 1, 1, &instr, op,
|
||||
ZYDIS_MAX_OPERAND_COUNT_VISIBLE,
|
||||
ZYDIS_DFLAG_VISIBLE_OPERANDS_ONLY)));
|
||||
ZydisFormatterFormatInstruction(&formatter, &instr, op, instr.operand_count_visible, result,
|
||||
sizeof(result), 0);
|
||||
EXPECT_EQ(std::string("ret"), result);
|
||||
EXPECT_EQ(1, instr.length);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user