diff options
Diffstat (limited to 'compiler/utils/assembler_test_base.h')
-rw-r--r-- | compiler/utils/assembler_test_base.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/utils/assembler_test_base.h b/compiler/utils/assembler_test_base.h index 1567367b67..736a292667 100644 --- a/compiler/utils/assembler_test_base.h +++ b/compiler/utils/assembler_test_base.h @@ -135,22 +135,24 @@ class AssemblerTestBase : public testing::Test { } virtual std::vector<std::string> GetAssemblerCommand() { - switch (GetIsa()) { + InstructionSet isa = GetIsa(); + switch (isa) { case InstructionSet::kX86: - return {FindTool("as"), "--32"}; + return {FindTool("clang"), "--compile", "-target", "i386-linux-gnu"}; case InstructionSet::kX86_64: - return {FindTool("as"), "--64"}; + return {FindTool("clang"), "--compile", "-target", "x86_64-linux-gnu"}; default: - return {FindTool("as")}; + LOG(FATAL) << "Unknown instruction set: " << isa; + UNREACHABLE(); } } virtual std::vector<std::string> GetDisassemblerCommand() { switch (GetIsa()) { case InstructionSet::kThumb2: - return {FindTool("objdump"), "--disassemble", "-M", "force-thumb"}; + return {FindTool("llvm-objdump"), "--disassemble", "-triple", "thumbv7a-linux-gnueabi"}; default: - return {FindTool("objdump"), "--disassemble", "--no-show-raw-insn"}; + return {FindTool("llvm-objdump"), "--disassemble", "--no-show-raw-insn"}; } } |