mirror of
https://github.com/open-goal/jak-project
synced 2026-08-18 13:53:01 -04:00
bfc4c18ada
- Adds `capstone` as a disassembling library that could eventually replace Zydis (for now left that alone) - Replicates all of the existing x86 tests to ARM64, fixed a bunch of underlying issues along the way - There are a very small handful of tests remaining that need to be enabled / fixed
27 lines
699 B
C++
27 lines
699 B
C++
#include "goalc/emitter/CodeTester.h"
|
|
#include "goalc/emitter/IGen.h"
|
|
#include "gtest/gtest.h"
|
|
|
|
using namespace emitter;
|
|
|
|
namespace {
|
|
const auto instr_set = InstructionSet::ARM64;
|
|
|
|
CodeTester create_tester(int code_capacity = 1024) {
|
|
CodeTester tester(instr_set);
|
|
tester.init_code_buffer(code_capacity);
|
|
return tester;
|
|
}
|
|
}; // namespace
|
|
|
|
TEST(NEONEmitter, VF_NOP) {
|
|
CodeTester tester = create_tester();
|
|
tester.emit(IGen::nop_vf(tester.generator()));
|
|
EXPECT_EQ(tester.dump_to_hex_string(true), "1F2003D5");
|
|
}
|
|
|
|
TEST(NEONEmitter, WAIT_VF) {
|
|
CodeTester tester = create_tester();
|
|
tester.emit(IGen::wait_vf(tester.generator()));
|
|
EXPECT_EQ(tester.dump_to_hex_string(true), "1F2003D5");
|
|
} |