// Core registers come first, from the highest down to the lowest. for (uint32_t core_reg : HighToLowBits(frame_info.CoreSpillMask())) {
gprs_[core_reg] = CalleeSaveAddress<InstructionSet::kArm64>(frame, spill_pos, frame_size);
++spill_pos;
}
DCHECK_EQ(spill_pos, POPCOUNT(frame_info.CoreSpillMask()));
// FP registers come second, from the highest down to the lowest. for (uint32_t fp_reg : HighToLowBits(frame_info.FpSpillMask())) {
fprs_[fp_reg] = CalleeSaveAddress<InstructionSet::kArm64>(frame, spill_pos, frame_size);
++spill_pos;
}
DCHECK_EQ(spill_pos, POPCOUNT(frame_info.CoreSpillMask()) + POPCOUNT(frame_info.FpSpillMask()));
}
void Arm64Context::SetGPR(uint32_t reg, uintptr_t value) {
DCHECK_LT(reg, arraysize(gprs_)); // Note: we use kPC == XZR, so do not ensure that reg != XZR.
DCHECK(IsAccessibleGPR(reg));
DCHECK_NE(gprs_[reg], &gZero); // Can't overwrite this static value since they are never reset.
*gprs_[reg] = value;
}
void Arm64Context::SetFPR(uint32_t reg, uintptr_t value) {
DCHECK_LT(reg, static_cast<uint32_t>(kNumberOfDRegisters));
DCHECK(IsAccessibleFPR(reg));
DCHECK_NE(fprs_[reg], &gZero); // Can't overwrite this static value since they are never reset.
*fprs_[reg] = value;
}
void Arm64Context::CopyContextTo(uintptr_t* gprs, uintptr_t* fprs) { // The long jump routine called below expects to find the value for SP at index 31.
DCHECK_EQ(SP, 31);
for (size_t i = 0; i < arraysize(gprs_); ++i) {
gprs[i] = gprs_[i] != nullptr ? *gprs_[i] : kBadGprBase + i;
} for (size_t i = 0; i < kNumberOfDRegisters; ++i) {
fprs[i] = fprs_[i] != nullptr ? *fprs_[i] : kBadFprBase + i;
} // Ensure the Thread Register contains the address of the current thread.
DCHECK_EQ(reinterpret_cast<uintptr_t>(Thread::Current()), gprs[TR]); #ifdefined(__aarch64__) && defined(__BIONIC__) && defined(M_MEMTAG_STACK_IS_ON) bool memtag_stack; // This works fine because versions of Android that did not support M_MEMTAG_STACK_ON did not // support stack tagging either. if (android_mallopt(M_MEMTAG_STACK_IS_ON, &memtag_stack, sizeof(memtag_stack)) && memtag_stack)
untag_memory(__builtin_frame_address(0), reinterpret_cast<void*>(gprs[SP])); #endif // Tell HWASan about the new stack top. if (__hwasan_handle_longjmp != nullptr)
__hwasan_handle_longjmp(reinterpret_cast<void*>(gprs[SP])); // The Marking Register will be updated after return by art_quick_do_long_jump.
}
} // namespace arm64
} // namespace art
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.