Add clang-format and format code to qemu code style
This commit is contained in:
@ -3,18 +3,22 @@
|
||||
const uint64_t code_start = 0x1000;
|
||||
const uint64_t code_len = 0x4000;
|
||||
|
||||
static void uc_common_setup(uc_engine** uc, uc_arch arch, uc_mode mode, const char* code, uint64_t size) {
|
||||
static void uc_common_setup(uc_engine **uc, uc_arch arch, uc_mode mode,
|
||||
const char *code, uint64_t size)
|
||||
{
|
||||
OK(uc_open(arch, mode, uc));
|
||||
OK(uc_mem_map(*uc, code_start, code_len, UC_PROT_ALL));
|
||||
OK(uc_mem_write(*uc, code_start, code, size));
|
||||
}
|
||||
|
||||
static void test_ppc32_add() {
|
||||
uc_engine* uc;
|
||||
static void test_ppc32_add()
|
||||
{
|
||||
uc_engine *uc;
|
||||
char code[] = "\x7f\x46\x1a\x14"; // ADD 26, 6, 3
|
||||
int reg;
|
||||
|
||||
uc_common_setup(&uc, UC_ARCH_PPC, UC_MODE_32 | UC_MODE_BIG_ENDIAN, code, sizeof(code) - 1);
|
||||
uc_common_setup(&uc, UC_ARCH_PPC, UC_MODE_32 | UC_MODE_BIG_ENDIAN, code,
|
||||
sizeof(code) - 1);
|
||||
|
||||
reg = 42;
|
||||
OK(uc_reg_write(uc, UC_PPC_REG_3, ®));
|
||||
@ -30,7 +34,4 @@ static void test_ppc32_add() {
|
||||
OK(uc_close(uc));
|
||||
}
|
||||
|
||||
TEST_LIST = {
|
||||
{ "test_ppc32_add", test_ppc32_add },
|
||||
{ NULL, NULL}
|
||||
};
|
||||
TEST_LIST = {{"test_ppc32_add", test_ppc32_add}, {NULL, NULL}};
|
Reference in New Issue
Block a user