Files
arti e0cf441118 m6: apply the final-review fixes
- spec 4.2/7.4: the caller-allocated hidden return slot (no sret
  pointer), with the 1987 _mkbig/_callbig oracle recorded as binding;
  spec 8 annotates debug info as M7.
- README: qualify the complete-surface headline, name the sub-byte
  stride in the M7 ownership lists, and flag the default -O2 over-scale.
- shim: %c honours width and the '-' flag; a bare %c is unchanged.
- runtime gate: add %c width output and call rts.lib _isascii, checking
  it in the GSPLNK map (587 bytes, 13 markers).
- aggregate gate: return a packed bitfield struct by value and check
  its fields, sign extension and raw word (49 markers).
- tms-clang: default TMS_CLANG/TMS_OPT to build/llvm-clean-build/bin
  and fail clearly when a tool is missing; update the README example.
2026-11-14 09:46:52 +00:00

29 lines
1.0 KiB
NASM

; aggregate-entry.asm -- M6 aggregate gate entry, linked at bit 018A0000.
;
; Sets the TI C field sizes, points STK/FP at the gate stack, calls the C
; driver aggregate_run() and writes a post-return marker. aggregate.sh
; concatenates the llc output for m6-aggregate.ll and the compiled driver
; after this file, so _aggregate_run and the aggregate functions are in the
; same assembly.
;
; The marker array is in .bss (linked at the ram origin); aggregate-check.lua
; reads its address from the linker map and checks 49 words (markers 0..48,
; the last one written after aggregate_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 _aggregate_run
movi 5A5A5A5Ah, a0
movi _aggregate_markers+1536, a2 ; marker 48, the post-return word
move a0, *a2, 1
rets
.globl _aggregate_markers
.bss _aggregate_markers, 1568, 16 ; 49 marker words (0x20 bits each)
.bss _cstack, 32768, 16 ; 32768 bits = 4096 bytes