From c8e058c8f40db5fa603a3743eda49c2e858d520b Mon Sep 17 00:00:00 2001 From: Lukas Korencik Date: Tue, 12 Apr 2022 14:23:02 +0200 Subject: [PATCH] test: Reflect changes in remill api. --- tests/AArch64/Lift.cpp | 11 ++++++++--- tests/X86/Lift.cpp | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/AArch64/Lift.cpp b/tests/AArch64/Lift.cpp index 71de1aaf..865bbcde 100644 --- a/tests/AArch64/Lift.cpp +++ b/tests/AArch64/Lift.cpp @@ -49,8 +49,13 @@ DEFINE_string(bc_out, "", "Name of the file in which to place the generated bitcode."); -DECLARE_string(arch); -DECLARE_string(os); +DEFINE_string(os, REMILL_OS, + "Operating system name of the code being " + "translated. Valid OSes: linux, macos, windows, solaris."); +DEFINE_string(arch, REMILL_ARCH, + "Architecture of the code being translated. " + "Valid architectures: x86, amd64 (with or without " + "`_avx` or `_avx512` appended), aarch64, aarch32"); namespace { @@ -121,7 +126,7 @@ extern "C" int main(int argc, char *argv[]) { auto os_name = remill::GetOSName(REMILL_OS); auto arch_name = remill::GetArchName(FLAGS_arch); auto arch = remill::Arch::Build(&context, os_name, arch_name); - auto module = remill::LoadArchSemantics(arch); + auto module = remill::LoadArchSemantics(arch.get()); remill::IntrinsicTable intrinsics(module.get()); remill::InstructionLifter inst_lifter(arch, intrinsics); diff --git a/tests/X86/Lift.cpp b/tests/X86/Lift.cpp index 7733bb1a..4c424c3c 100644 --- a/tests/X86/Lift.cpp +++ b/tests/X86/Lift.cpp @@ -49,8 +49,13 @@ DEFINE_string(bc_out, "", "Name of the file in which to place the generated bitcode."); -DECLARE_string(arch); -DECLARE_string(os); +DEFINE_string(os, REMILL_OS, + "Operating system name of the code being " + "translated. Valid OSes: linux, macos, windows, solaris."); +DEFINE_string(arch, REMILL_ARCH, + "Architecture of the code being translated. " + "Valid architectures: x86, amd64 (with or without " + "`_avx` or `_avx512` appended), aarch64, aarch32"); namespace { @@ -121,7 +126,7 @@ extern "C" int main(int argc, char *argv[]) { auto os_name = remill::GetOSName(REMILL_OS); auto arch_name = remill::GetArchName(FLAGS_arch); auto arch = remill::Arch::Build(&context, os_name, arch_name); - auto module = remill::LoadArchSemantics(arch); + auto module = remill::LoadArchSemantics(arch.get()); remill::IntrinsicTable intrinsics(module.get()); remill::InstructionLifter inst_lifter(arch, intrinsics);