Skip to content

Commit d2dc10d

Browse files
WebKit ARM64 Builderclaude
andcommitted
Fix StackPointer assembly for ARM64 Windows only
Add specific case for CPU(ARM64) && OS(WINDOWS) that removes the .previous directive which is not supported by LLVM ARM64 assembler on Windows. Keep .previous for all other platforms where it's needed. Fixes: <inline asm>(7,1): error: unknown directive .previous 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 6e46df3 commit d2dc10d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Source/WTF/wtf/StackPointer.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ asm (
9696
".previous" "\n"
9797
);
9898

99+
#elif CPU(ARM64) && OS(WINDOWS)
100+
asm (
101+
".text" "\n"
102+
".balign 16" "\n"
103+
".globl " SYMBOL_STRING(currentStackPointer) "\n"
104+
SYMBOL_STRING(currentStackPointer) ":" "\n"
105+
106+
"mov x0, sp" "\n"
107+
"ret" "\n"
108+
);
109+
99110
#elif CPU(ARM64)
100111
asm (
101112
".text" "\n"

0 commit comments

Comments
 (0)