From 1a28fc43ea7daa624ada9af40e30de64d4e946a8 Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Thu, 13 Nov 2014 18:03:06 +0000 Subject: Exercise the generation of SBFX on ARM32 & Thumb-2. Exercise the generation of the ARM SBFX intruction in compiler/utils/arm/assembler_arm32_test.cc (ARM instruction set encoding) and in compiler/utils/arm/assembler_thumb2_test.cc (Thumb instruction set encoding). Change-Id: Ic72683aac6dd6628e227523e352c395e1a63b52e --- compiler/utils/assembler_test.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'compiler/utils/assembler_test.h') diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h index 91237ae910..0378176afd 100644 --- a/compiler/utils/assembler_test.h +++ b/compiler/utils/assembler_test.h @@ -394,10 +394,19 @@ class AssemblerTest : public testing::Test { std::vector args; + // Encaspulate the whole command line in a single string passed to + // the shell, so that GetAssemblerCommand() may contain arguments + // in addition to the program name. args.push_back(GetAssemblerCommand()); args.push_back("-o"); args.push_back(to_file); args.push_back(from_file); + std::string cmd = Join(args, ' '); + + args.clear(); + args.push_back("/bin/sh"); + args.push_back("-c"); + args.push_back(cmd); return Exec(args, error_msg); } @@ -414,6 +423,9 @@ class AssemblerTest : public testing::Test { std::string error_msg; std::vector args; + // Encaspulate the whole command line in a single string passed to + // the shell, so that GetObjdumpCommand() may contain arguments + // in addition to the program name. args.push_back(GetObjdumpCommand()); args.push_back(file); args.push_back(">"); @@ -490,6 +502,9 @@ class AssemblerTest : public testing::Test { bool DisassembleBinary(std::string file, std::string* error_msg) { std::vector args; + // Encaspulate the whole command line in a single string passed to + // the shell, so that GetDisassembleCommand() may contain arguments + // in addition to the program name. args.push_back(GetDisassembleCommand()); args.push_back(file); args.push_back("| sed -n \'/<.data>/,$p\' | sed -e \'s/.*://\'"); -- cgit v1.2.3-59-g8ed1b