diff options
| author | 2016-12-09 11:26:35 +0000 | |
|---|---|---|
| committer | 2016-12-12 11:50:24 +0000 | |
| commit | 5b12f7973636bfea29da3956a9baa7a6bbe2b666 (patch) | |
| tree | a2cd41c1d3c09abc594a76af11b7bebc302a2870 /compiler/optimizing/code_generator.cc | |
| parent | 0dd27eb2b51d030866c25dbf8e7bb737eb35a888 (diff) | |
Add kJitTableAddress for HLoadClass.
This new kind loads classes from the root table associated with
JIT compiled code.
Also remove kDexCacheAddress, which is replaced by kJitTableAddress.
test: ART_TEST_JIT=true test-art-host-jit test-art-target-jit
Change-Id: Ia23029688d1a60c178bf2ffa7463927c5d5de4d0
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
| -rw-r--r-- | compiler/optimizing/code_generator.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index fa6a5225e7..402eeee65f 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -1402,6 +1402,14 @@ void CodeGenerator::EmitJitRoots(uint8_t* code, entry.second = index; ++index; } + for (auto& entry : jit_class_roots_) { + // Update the `roots` with the class, and replace the address temporarily + // stored to the index in the table. + uint64_t address = entry.second; + roots->Set(index, reinterpret_cast<StackReference<mirror::Class>*>(address)->AsMirrorPtr()); + entry.second = index; + ++index; + } EmitJitRootPatches(code, roots_data); } |