Files

28 lines
1020 B
NASM

; float-entry.asm -- M6 float/double gate entry, linked at bit 018A0000.
;
; Sets the TI C field sizes, points STK/FP at the gate stack, calls the C
; driver float_run() and writes a post-return marker. float.sh concatenates
; the llc output for m6-float.ll and the compiled driver after this file, so
; _float_run and the float/double functions are in the same assembly.
;
; The marker array is in .bss (linked at the ram origin); float-check.lua reads
; its address from the linker map and checks 80 words (markers 0..79, the last
; one written after float_run returns). Marker n is 0x20 bits above marker
; n-1, matching one 32-bit value per marker slot.
.text
.globl _start
_start:
setf 16, 1, 0
setf 32, 0, 1
movi _cstack, a14
move a14, a13
calla _float_run
movi 5A5A5A5Ah, a0
movi _float_markers+2528, a2 ; marker 79, the post-return word
move a0, *a2, 1
rets
.globl _float_markers
.bss _float_markers, 2560, 16 ; 80 marker words (0x20 bits each)
.bss _cstack, 32768, 16 ; 32768 bits = 4096 bytes