summaryrefslogtreecommitdiff
path: root/compiler/utils/assembler_test.h
diff options
context:
space:
mode:
author Alexey Frunze <Alexey.Frunze@imgtec.com> 2015-09-24 22:57:20 -0700
committer Alexey Frunze <Alexey.Frunze@imgtec.com> 2015-11-21 22:18:50 -0800
commita0e87b0a97fadd54540ec7e8331b61bebd82d378 (patch)
treec1027e65fd859cf59f295ff3a5630404e3724db3 /compiler/utils/assembler_test.h
parentd83b9042d67f2a7d5ca5a1f63819c97940033336 (diff)
MIPS64: Support short and long branches
Change-Id: I618c960bd211048166d9fde78d4106bd3ca42b3a
Diffstat (limited to 'compiler/utils/assembler_test.h')
-rw-r--r--compiler/utils/assembler_test.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h
index f1233ca457..9457da1c36 100644
--- a/compiler/utils/assembler_test.h
+++ b/compiler/utils/assembler_test.h
@@ -840,12 +840,17 @@ class AssemblerTest : public testing::Test {
return str;
}
+ // Override this to pad the code with NOPs to a certain size if needed.
+ virtual void Pad(std::vector<uint8_t>& data ATTRIBUTE_UNUSED) {
+ }
+
void DriverWrapper(std::string assembly_text, std::string test_name) {
assembler_->FinalizeCode();
size_t cs = assembler_->CodeSize();
std::unique_ptr<std::vector<uint8_t>> data(new std::vector<uint8_t>(cs));
MemoryRegion code(&(*data)[0], data->size());
assembler_->FinalizeInstructions(code);
+ Pad(*data);
test_helper_->Driver(*data, assembly_text, test_name);
}