diff options
author | 2014-11-13 18:03:06 +0000 | |
---|---|---|
committer | 2014-11-13 18:03:06 +0000 | |
commit | 1a28fc43ea7daa624ada9af40e30de64d4e946a8 (patch) | |
tree | aeb6c0aea89df5dd824e5366ad727e0557e6ebee /compiler/utils/assembler_test.h | |
parent | 51d3fc40637fc73d4156ad617cd451b844cbb75e (diff) |
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
Diffstat (limited to 'compiler/utils/assembler_test.h')
-rw-r--r-- | compiler/utils/assembler_test.h | 15 |
1 files changed, 15 insertions, 0 deletions
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<std::string> 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<std::string> 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<std::string> 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/.*://\'"); |