Friday, January 27, 2023

lang/sbcl will not work with x-only

lang/sbcl will not work with x-only.

I took another look at the warnings about data directives in .text.
In runtime/x86-64-assem.S we have snippets like these:

GNAME(fun_end_breakpoint_trap):
TRAP
.byte trap_FunEndBreakpoint
hlt # We should never return here.

GNAME(do_pending_interrupt):
TRAP
.byte trap_PendingInterrupt
ret

GNAME(memory_fault_emulation_trap):
TRAP
.byte trap_MemoryFaultEmulation

Where TRAP is defined to int3, and trap_* are consecutively numbered
constants. The other half of this is sigtrap_handler() in
runtime/x86-64-arch.c, which reads the byte after the int3 instruction

trap = *(unsigned char *)OS_CONTEXT_PC(context);

and then dispatches accordingly.

... And this brief analysis marks the end of my own involvement
with this port.

--
Christian "naddy" Weisgerber naddy@mips.inka.de

No comments:

Post a Comment