diff options
author | Douglas Leung <douglas.leung@imgtec.com> | 2015-07-02 16:42:08 -0700 |
---|---|---|
committer | Roland Levillain <rpl@google.com> | 2015-07-03 17:29:27 +0100 |
commit | ccbbda2b716bcc0dd9ad7b6c7bf9079efa3fca23 (patch) | |
tree | 52b01bc48dadce390c2e4ceffacdc16f674d3dd0 /compiler/dex/quick/mips/int_mips.cc | |
parent | 3abd437507f8ba30a238a52c273c9944dcb9d5a1 (diff) | |
download | android_art-ccbbda2b716bcc0dd9ad7b6c7bf9079efa3fca23.tar.gz android_art-ccbbda2b716bcc0dd9ad7b6c7bf9079efa3fca23.tar.bz2 android_art-ccbbda2b716bcc0dd9ad7b6c7bf9079efa3fca23.zip |
Add implicit null pointer and stack overflow checks for Mips.
(cherry picked from commit 22bb5a2ebc1e2724179faf4660b2735dcb185f21)
Bug: 21555893
Change-Id: I2a995be128a5603d08753c14956dd8c8240ac63c
Diffstat (limited to 'compiler/dex/quick/mips/int_mips.cc')
-rw-r--r-- | compiler/dex/quick/mips/int_mips.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/dex/quick/mips/int_mips.cc b/compiler/dex/quick/mips/int_mips.cc index f5ad7c7c33..1099303f7d 100644 --- a/compiler/dex/quick/mips/int_mips.cc +++ b/compiler/dex/quick/mips/int_mips.cc @@ -691,6 +691,9 @@ void MipsMir2Lir::GenArrayGet(int opt_flags, OpSize size, RegLocation rl_array, reg_len = AllocTemp(); // Get len. Load32Disp(rl_array.reg, len_offset, reg_len); + MarkPossibleNullPointerException(opt_flags); + } else { + ForceImplicitNullCheck(rl_array.reg, opt_flags, false); } // reg_ptr -> array data. OpRegRegImm(kOpAdd, reg_ptr, rl_array.reg, data_offset); @@ -781,6 +784,9 @@ void MipsMir2Lir::GenArrayPut(int opt_flags, OpSize size, RegLocation rl_array, // NOTE: max live temps(4) here. // Get len. Load32Disp(rl_array.reg, len_offset, reg_len); + MarkPossibleNullPointerException(opt_flags); + } else { + ForceImplicitNullCheck(rl_array.reg, opt_flags, false); } // reg_ptr -> array data. OpRegImm(kOpAdd, reg_ptr, data_offset); |