From 322e9dbc5f39e2fbb758a2ef541762a5f27bd9e1 Mon Sep 17 00:00:00 2001 From: Frances Wingerter Date: Mon, 7 Oct 2024 15:25:12 -0400 Subject: [PATCH] runtime: init: use tagged pointer to access TLS --- runtime/libia2/include/ia2_internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/libia2/include/ia2_internal.h b/runtime/libia2/include/ia2_internal.h index 50673fb53..bd4c27774 100644 --- a/runtime/libia2/include/ia2_internal.h +++ b/runtime/libia2/include/ia2_internal.h @@ -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" \ : \