Skip to content
Snippets Groups Projects
Commit ec004eb1 authored by Florian Mayer's avatar Florian Mayer Committed by Gerrit Code Review
Browse files

Merge "Allow to get raw register data on all platforms."

parents f41897a6 932247e9
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,7 @@ namespace unwindstack {
#if defined(__arm__)
inline __always_inline void RegsGetLocal(Regs* regs) {
void* reg_data = regs->RawData();
inline __attribute__((__always_inline__)) void AsmGetRegs(void* reg_data) {
asm volatile(
".align 2\n"
"bx pc\n"
......@@ -55,8 +54,7 @@ inline __always_inline void RegsGetLocal(Regs* regs) {
#elif defined(__aarch64__)
inline __always_inline void RegsGetLocal(Regs* regs) {
void* reg_data = regs->RawData();
inline __attribute__((__always_inline__)) void AsmGetRegs(void* reg_data) {
asm volatile(
"1:\n"
"stp x0, x1, [%[base], #0]\n"
......@@ -87,11 +85,12 @@ inline __always_inline void RegsGetLocal(Regs* regs) {
extern "C" void AsmGetRegs(void* regs);
inline void RegsGetLocal(Regs* regs) {
#endif
inline __attribute__((__always_inline__)) void RegsGetLocal(Regs* regs) {
AsmGetRegs(regs->RawData());
}
#endif
} // namespace unwindstack
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment