Files
Matt Turner b39c748d9d alpha: read $gp and $sp explicitly for clang
clang honors a local `register unsigned long x __asm__("$N")` variable
only where it appears as an inline-asm operand; merely reading it does
not produce the contents of that register.  So trap_init() passed an
undefined global pointer to PAL_wrkgp, and load_PCB() stored an undefined
stack pointer into the PCB that swpctx then loaded.  Either one wedges an
early boot.

Read the registers explicitly instead: an inline mov for $gp in
trap_init(), and the file-scope current_stack_pointer for $sp in
load_PCB().  A file-scope register-asm variable is the form clang does
support.

Signed-off-by: Matt Turner <[email protected]>
Reviewed-by: Maciej W. Rozycki <[email protected]>
Reviewed-by: Magnus Lindholm <[email protected]>
Tested-by: Magnus Lindholm <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Magnus Lindholm <[email protected]>
2026-08-16 16:00:00 +02:00
..