Skip to content

Commit

Permalink
runtime: init: use tagged pointer to access TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
fw-immunant committed Oct 31, 2024
1 parent ce8027b commit 322e9db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/libia2/include/ia2_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,12 @@ asm(".macro movz_shifted_tag_x18 tag\n"
"mov x10, sp\n" \
/* switch to old stack */ \
"mov sp, x9\n" \
/* calculate location to save pointer to newly allocated stack */ \
/* calculate location to save addr of newly allocated stack */ \
"mrs x12, tpidr_el0\n" \
"adrp x11, :gottprel:ia2_stackptr_" #i "\n" \
"ldr x11, [x11, #:gottprel_lo12:ia2_stackptr_" #i "]\n" \
"add x11, x11, x12\n" \
"orr x11, x11, x18\n" \
/* write newly allocated stack to ia2_stackptr_i */ \
"str x10, [x11]\n" \
: \
Expand Down

0 comments on commit 322e9db

Please sign in to comment.