summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/gen_common.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2014-11-26 00:03:31 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-11-26 00:03:31 +0000
commit220526b05d4365a1820a694c98527eda2d3dc980 (patch)
tree73fbf327839263b6847bdc4359ac1dbea2b897e3 /compiler/dex/quick/gen_common.cc
parent8ac8d5556fae9c728bcebcc9036a1bbf40087c76 (diff)
parenteace45873190a27302b3644c32ec82854b59d299 (diff)
Merge "Move dexCacheStrings from ArtMethod to Class"
Diffstat (limited to 'compiler/dex/quick/gen_common.cc')
-rw-r--r--compiler/dex/quick/gen_common.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/dex/quick/gen_common.cc b/compiler/dex/quick/gen_common.cc
index 0af0ca8840..9be8719b5d 100644
--- a/compiler/dex/quick/gen_common.cc
+++ b/compiler/dex/quick/gen_common.cc
@@ -1068,7 +1068,11 @@ void Mir2Lir::GenConstString(uint32_t string_idx, RegLocation rl_dest) {
r_method = TargetReg(kArg2, kRef);
LoadCurrMethodDirect(r_method);
}
- LoadRefDisp(r_method, mirror::ArtMethod::DexCacheStringsOffset().Int32Value(),
+ // Method to declaring class.
+ LoadRefDisp(r_method, mirror::ArtMethod::DeclaringClassOffset().Int32Value(),
+ TargetReg(kArg0, kRef), kNotVolatile);
+ // Declaring class to dex cache strings.
+ LoadRefDisp(TargetReg(kArg0, kRef), mirror::Class::DexCacheStringsOffset().Int32Value(),
TargetReg(kArg0, kRef), kNotVolatile);
// Might call out to helper, which will return resolved string in kRet0
@@ -1106,7 +1110,9 @@ void Mir2Lir::GenConstString(uint32_t string_idx, RegLocation rl_dest) {
RegLocation rl_method = LoadCurrMethod();
RegStorage res_reg = AllocTempRef();
RegLocation rl_result = EvalLoc(rl_dest, kRefReg, true);
- LoadRefDisp(rl_method.reg, mirror::ArtMethod::DexCacheStringsOffset().Int32Value(), res_reg,
+ LoadRefDisp(rl_method.reg, mirror::ArtMethod::DeclaringClassOffset().Int32Value(), res_reg,
+ kNotVolatile);
+ LoadRefDisp(res_reg, mirror::Class::DexCacheStringsOffset().Int32Value(), res_reg,
kNotVolatile);
LoadRefDisp(res_reg, offset_of_string, rl_result.reg, kNotVolatile);
StoreValue(rl_dest, rl_result);