diff options
author | 2015-11-24 10:34:22 +0000 | |
---|---|---|
committer | 2015-11-24 10:34:22 +0000 | |
commit | 51a354c747c8a76a4716a49a1f70bfd975d63787 (patch) | |
tree | 37b82929ccc42f4b1b70b94baf64dbd9fd8b4c15 /compiler/utils/assembler_test.h | |
parent | 7f8275549fd503f82ac63d65800afacab85af09d (diff) | |
parent | a0e87b0a97fadd54540ec7e8331b61bebd82d378 (diff) |
Merge "MIPS64: Support short and long branches"
Diffstat (limited to 'compiler/utils/assembler_test.h')
-rw-r--r-- | compiler/utils/assembler_test.h | 5 |
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); } |