diff options
| author | 2016-12-14 15:48:29 +0000 | |
|---|---|---|
| committer | 2016-12-14 15:48:29 +0000 | |
| commit | afca9306a644a2ddbafd6e815944de9bb4dfafb6 (patch) | |
| tree | 13d238c6dcfb459258d44abadf37b808497fab3c | |
| parent | b73e659be3fb6474ff3a993cd25ecbfa1cc4715c (diff) | |
| parent | 36073947d2edb04e69ad0b20ec9de8c0712b8fd2 (diff) | |
Merge "Fix AssemblerMIPS64Test.LongBalc() running out of memory."
| -rw-r--r-- | compiler/utils/mips64/assembler_mips64_test.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/utils/mips64/assembler_mips64_test.cc b/compiler/utils/mips64/assembler_mips64_test.cc index 31d3e4c33b..f62822d73a 100644 --- a/compiler/utils/mips64/assembler_mips64_test.cc +++ b/compiler/utils/mips64/assembler_mips64_test.cc @@ -605,15 +605,18 @@ TEST_F(AssemblerMIPS64Test, Balc) { } TEST_F(AssemblerMIPS64Test, LongBalc) { + constexpr uint32_t kNopCount1 = (1u << 25) + 1; + constexpr uint32_t kNopCount2 = (1u << 25) + 1; + constexpr uint32_t kRequiredCapacity = (kNopCount1 + kNopCount2 + 6u) * 4u; + ASSERT_LT(__ GetBuffer()->Capacity(), kRequiredCapacity); + __ GetBuffer()->ExtendCapacity(kRequiredCapacity); mips64::Mips64Label label1, label2; __ Balc(&label1); - constexpr uint32_t kNopCount1 = (1u << 25) + 1; for (uint32_t i = 0; i != kNopCount1; ++i) { __ Nop(); } __ Bind(&label1); __ Balc(&label2); - constexpr uint32_t kNopCount2 = (1u << 25) + 1; for (uint32_t i = 0; i != kNopCount2; ++i) { __ Nop(); } |