Skip to content

Commit

Permalink
Align stack before calling init_tls_N on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
ayrtonm committed Jan 7, 2025
1 parent 04561da commit 56b92f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/libia2/include/ia2_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,12 @@ asm(".macro movz_shifted_tag_x18 tag\n"
"mov x9, sp\n" \
/* switch to newly allocated stack */ \
"mov sp, %0\n" \
/* push old stack pointer to new stack */ \
"str x9, [sp], #-8\n" \
/* push the stack pointer in x9 and a dummy reg to new stack */ \
"stp x9, x10, [sp, #-16]!\n" \
/* initialize TLS */ \
"bl init_tls_" #i "\n" \
/* pop old stack pointer from new stack */ \
"ldr x9, [sp, #8]!\n" \
"ldp x9, x10, [sp], #16\n" \
/* save pointer to new stack */ \
"mov x10, sp\n" \
/* switch to old stack */ \
Expand Down

0 comments on commit 56b92f9

Please sign in to comment.