From 249ee389c8647fc1a5b55ba6893306841d595879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 21 Aug 2024 14:43:30 +0200 Subject: [PATCH] std.os.windows: Implement teb() for thumb. https://github.com/wine-mirror/wine/blob/6e15604c48acd63dd8095a4ce2fd011cb3be96db/include/winnt.h#L2503 Closes #4645. --- lib/std/os/windows.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index e06a3ff02cd9..aa7b2bd2f86f 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -2123,6 +2123,10 @@ pub fn teb() *TEB { ); } }, + .thumb => asm ( + \\ mrc p15, 0, %[ptr], c13, c0, 2 + : [ptr] "=r" (-> *TEB), + ), .aarch64 => asm ( \\ mov %[ptr], x18 : [ptr] "=r" (-> *TEB),