/* * libbinrec: a recompiling translator for machine code * Copyright (c) 2016 Andrew Church * * This software may be copied and redistributed under certain conditions; * see the file "COPYING" in the source code distribution for details. * NO WARRANTY is provided with this software. */ #include "tests/common.h" #include "tests/host-x86/common.h" static const binrec_setup_t setup = { .host = BINREC_ARCH_X86_64_SYSV, }; static const unsigned int host_opt = 0; static int add_rtl(RTLUnit *unit) { int reg; EXPECT(reg = rtl_alloc_register(unit, RTLTYPE_INT32)); EXPECT(rtl_add_insn(unit, RTLOP_LOAD_ARG, reg, 0, 0, 6)); return EXIT_SUCCESS; } #define EXPECT_TRANSLATE_FAILURE static const char expected_log[] = "[error] LOAD_ARG 6 not supported (argument is not in a register)\n"; #include "tests/rtl-translate-test.i"