The scale-GEP and barrier emitters now spell a bit offset as
llvm.tms34010.bitaddr (lowered to a BITADDR node) instead of a foldable add, so
the offset stays relative rather than folding to the absolute byte-read addend.
- equivalence.sh _stride: accept ADDI 192 + ADDI 32 (sum 224 bits, still
bit-scaled) and reject the byte-scaled ADDI 28.
- pointer-o2.sh late64/late64s: accept llvm.tms34010.bitaddr(..., 24) as the
spelling of the 24-bit addend; keep the never-192 assertion.
The 850 pin was measured through the pre-fix -O2 bit-offset-aliasing and
float-constant-folding hazards; closing them costs instructions and restores
the M9 legacy value of 910, which m5/jr.sh now pins (JR count, zero-disp JA,
relaxation and MAME markers unchanged). Make the lit counts unambiguous:
TMS34010 131 (127 CodeGen + 4 MC), clang 10 (8 CodeGen + 1 Driver + 1 Sema),
sweep command 140 = 131 + 9 clang with Sema run separately (1/1).
Record the two-tier counts, 22 flips, four-phase divide evidence, DWARF v5/rnglists gate and the M9/M10 boundary. The Generic sweep now classifies target asm-parser 'invalid instruction mnemonic' errors as unsupported for two x86-asm tests exposed by the inline-asm r support.
Force the wide phase's signed magnitudes to stay at or above 2^32 by capping
the dividend high word with 0x80000000|(lcg & 0x7FFEFFFF) (hi(|a|) is then
0xFFFFFFFF-hi(a) in [0x10000, 0x1FFFF] >= every divisor), so all four forms
take the M8.3 two-DIVU helper; re-pin wide to 0xF56810CFEDA9D656 (the model
shows zero deviating iterations). Add INT64_MIN magnitude cases for the
single-DIVU divisor 0xFFFFFFFF (unsigned and signed) and a negative
32-bit-magnitude divisor (2^32/-3) to the self-check, and fix the stale
'two workloads'/'both paths' gate text.
Review fix round 1 for the Task 2 DWARF input gate:
- refuse pre-DWARF5 .debug_info/.debug_line in multi-object --keep-debug
links: their DW_AT_stmt_list is a raw DW_FORM_data4/8, which the merge
cannot rehome (I1).
- require relocations on DW_FORM_addr (DW_AT_low_pc etc.) and document
that DW_LNE_set_address / DW_OP_addr inside expressions are not
decoded (I2).
- require whole 4-byte relocation coverage for 8-byte fields; drop
supplementary/alternate-file forms from the required set and explain
why; use the line header's address size; add a need(4) unit helper
for the standalone walkers.
- add per-walker negatives (line/rnglists/addr/str_offsets) plus an
unrelocated DW_FORM_addr and a pre-v5 CU; distinguish a producer that
emits no rnglists (skip) from an unreadable object (fail).
- fix the fixture docstring (--tag AB, current emission behaviour).
Walk .debug_info DIEs through .debug_abbrev, the DWARF v5 line-table
directory/file formats, and the .debug_rnglists/.debug_loclists entries,
and require an R-RELLONG relocation on every section-relative form and
list/address/string-offset entry. A raw field now fails loudly instead
of being silently mis-merged; the raw CU debug_abbrev_offset is still
patched as before.
Add scripts/tests/m9/dwarf-ranges.sh: a synthetic two-TU .debug_rnglists
fixture (start_end + startx_length, offset rehoming, addr table) plus a
real -O2 -g producer case, validated through the M7 ELF wrapper with
llvm-dwarfdump. Single-TU bytes keep the M8 layout and the default
strip is unchanged. Add an unrelocated DW_AT_stmt_list negative to the
tms-link unit gate.
Adds a fourth equal-iteration phase to the i64div perf driver that forces
hi(N) < D (dividend high word 1..0x10000, divisor >= 0x10001), so every
division takes the new single even-destination DIVU path, and tightens the
M8.3 wide phase to hi(N) >= D so it still measures the two-DIVU helper.
New markers 11/12/13 carry the phase flag and checksum; the Lua gate polls
the phase and requires it to be measurable and materially faster than the
wide phase (1.25x), with the pinned host checksums
fast=0x000000011E6F9AB4 slow=0x00000000007512AE
wide=0xF404E965A20F6984 div32=0x00002C61C63842EE. The self-check adds
0x1_00000000/3, 0x1_FFFFFFFF/0x10000 and -2^32/3. The compile-only preflight
now requires the i64div.div32 block; the map check covers 16 marker cells.
Key archive member labels/placements by member offset so two same-named members cannot overwrite each other; add a dupnamed fixture asserting distinct address ranges. Treat an empty / index as absent, require ASCII decimal sizes, validate odd-member padding and final bounds, and dedupe index entries by member offset. Document the -l/archive ordering and the unit gate's FLIB_LIB/M4_SDK prerequisite (the real-LIB case is skipped with a reason when absent).
Accept the 1990 tools' metadata section bits (0x100/0x400) on allocated sections, which the M6 flib/rts members use, while still writing classic output flags.
Add M6_LINKER=tms-link to runtime.sh and i64.sh: after GSPA, link the same M6.OBJ + flib.lib/rts.lib with tms-link, compare allocated bytes/symbols to the GSPLNK oracle, and run the same MAME marker checks. M8 native-lib now compares tms-link's raw pre-coff-check image.
Add loud-path fixtures for index lies, BSD names, duplicate / and // tables, bad/missing padding, non-ASCII sizes and -l resolution failure; strengthen the no-index exclusion test; add 1990-flag and M5_NATIVE_LINKER docs.
Implement M8.1 native .lib linking: System V !<arch> parsing (/ symbol index, // long-name table, /N references, even-byte padding, loud malformed/truncated errors), in-memory member objects labelled lib(member), and extraction in the archive's own symbol-table order driven by currently undefined globals, iterated to a fixpoint without re-extracting a member. Duplicate definitions and unresolved references fail with object/member names.
Accept archive paths and -l/-lL in the CLI, preserve layout/map/debug behavior, and let scripts/m4/run.sh pass M4_NATIVE_LIBS/M4_NATIVE_RTS archives to tms-link. Relocation addends are now applied as signed 32-bit values (needed by the termtris rts.lib link).
Tests: tms-link archive fixtures and real flib extraction, m7 archive/-l parity, m5 native termtris with tms-link+rts.lib (dis34 match), m6 i64/runtime GSPLNK gates, and scripts/tests/m8/native-lib.sh (FLIB.LIB + RTS.LIB, MAME markers, GSPLNK byte/symbol parity).
The M4 default link command's 4 KiB prog region cannot hold the perf
driver's ~8.7 KiB .text, and the old markers at 018A8000 were inside that
.text. Add a gate-local link command (prog = 40000h) and move the eight
markers to 01A20000, free RAM above the 4 KiB entry stack and inside the
declared ram region.
i64div-map-check.py parses both GSPLNK and tms-link maps and fails if the
marker cells overlap .text/.data/.bss, leave the region, or if a section
leaves its region. The gate runs it on a host tms-link map and on the
GSPA/GSPLNK map from a link-only pass before MAME, with compile-only and
link-only stop modes for the no-DOSBox checks.
Require the exact deterministic phase checksums (fast 00000001:1E6F9AB4,
slow 00000000:007512AE, hosted and independently recomputed), and extend
the in-image self-check with large-magnitude fast cases: 0xFFFFFFFF/7,
-123/7 (-123 % 7 = -4) and INT32_MIN/3, so a wrong 32-bit quotient or
remainder fails before timing. The gate documents that -O2 is an
optimizer baseline, not the i64 fast-path measurement.
i64div.sh runs two equal-iteration i64 division workloads on the emulated
part: small operands whose high words are zero (the 32-bit DIVU fast path)
and operands with nonzero high words (the 64-step restoring loop). The
driver's self-check first proves both paths produce the known M6 values;
the checksums are retained as evidence.
i64div-perf-check.lua polls the start and per-phase completion markers
once per MAME frame and requires the fast phase to complete in materially
fewer frames (slow_frames >= 8 * max(fast_frames,1), slow_frames >= 20).
A frame is a fixed emulated-cycle count, so the comparison is
reproducible. The gate widens the loader budget to 200..4000 frames for
the slow phase; the M7 full-suite settings are untouched.
The script also has a compile-only preflight (tms-clang + llc, no
DOSBox/MAME) that checks the driver asm for the fast blocks, DIVU and the
slow loop.
The ROM builders do not set A8, so markers 4 and 10 are no longer
presented as return values:
- property_called=1 and attrs_called=1 are plain post-call flags. The
gate requires the flag, states that the property has no server read-back
(zero X errors is the only runtime check), and keeps the black margin
as the real CWBackPixel proof. Marker 14 pins the 160x120 fill
geometry (0xA00078) so the margin sample cannot become vacuous.
- InternAtom wording: the display marker only proves the connection was
live before the call; stage 14 cannot distinguish the intended _XSend
block from a crash/wrong import. The isolated probe is narrative entry
evidence, not a gate check.
- XSetWindowAttributes attrs = {0}; replaces the unsigned int * zeroing
loop.
- Fix the stale image_roundtrip stage-11 comment (text pixels now set
stage 12).
- GC wording is 'source call sites; runtime entry not proven', not
'proves call presence'.
Make the wider-Xlib evidence non-vacuous:
- Child starts with background 1; CWBackPixel=0 and a 160x120 fill leave a
black margin sampled at screen (300,240). XChangeWindowAttributes now
returns a marker (10) and the margin is required; the attrs=1 negative
control turns it white and fails the gate.
- Marker 4 is the XChangeProperty return (nonzero, not a read-back).
Marker 11 counts the two explicit XChangeGC calls (presence + no X error;
the ROM entry is a 2-arg cache flush). XDrawString is proven by counting
the set pixels of an XGetImage band (marker 12, 67 in the run).
- Marker 13 stores the live Display just before XInternAtom, so the skip
cannot be a crash/wrong import; the gate/report state that entry is
evidenced by the isolated probe.
- Zero the XSetWindowAttributes struct.
- Pin the six wider addresses as constants in validate-syms.sh.
- Print parent(...) instead of win(...) (parent-relative, not child).
- Correct the report's configure/p_img justification and add Fix round 1.
- scripts/m4/run.sh prints M7 MAME: PASS for an M7 marker line; M4 output
is unchanged.
Add and validate XMapSubwindows, XChangeWindowAttributes,
XConfigureWindow, XInternAtom, XChangeProperty and XChangeGC from the
GUI_APPS table, extend x11m4.h with the X11R4 masks/structs and the ROM
call shapes, and add the xmore client plus its MAME gate.
xmore exercises a parent/child window, XMapSubwindows, the fixed-mask
move/resize ConfigureWindow, WM_NAME (predefined atom 39), CWBackPixel,
XChangeGC, XLoadFont/XDrawString, XFillRectangle, and a heap
XCreateImage/XPutImage/XGetImage/XPutImage/XDestroyImage round trip with
XSync. Markers at 018A8000+n*20 show stage 14, image 0x13F and 0 errors.
XInternAtom is kept as the last call with an explicit 0xFFFFFFFF skip
marker: the ROM _XSend scatter path (0x3F9B44C0) that carries the name
does not complete in the loader harness (the same direct-send limit the
M4 xshow client records). If it returns, the client uses the atom and
advances to stage 15. The GC uses the server default font because the
ROM XLoadFont handle is rejected as GCFont (BadFont); XLoadFont itself is
still exercised and marked.
The M4 runner now accepts M4/M7 marker and PASS lines; M4 behavior is
unchanged.
Extract the final -O0 @debug_ptr body and require !dbg on the
--bitptr/--lower-bitptr chain (mul, shl, ptrtoint, add, inttoptr) and on
every load/store through the computed pointer. Line-table rows alone could
stay green if the barrier dropped locations only on the instructions it
synthesizes; this IR-level check fails in that case.
Refresh the stale gate header (three functions, -O2 smoke, indexed
.debug_addr, ptr=30) and note that the exact .debug_addr entry list is
deterministic at the current compiler but should be relaxed on a DWARF
emission change.
- debug.sh: add a pointer/array runtime-GEP function (debug_ptr) with
asserted line rows/low PC, and build the same TU with tms-clang -g -O2
through --bitptr/opt/--scale/--lower-bitptr/instcombine; require the
-O2 object's .debug_* sections and dwarfdump its debug.c/function/low PC.
Read .debug_addr entries by index and assert the CU low/high PC and
.debug_line file index.
- oracle.sh: load both the GSPLNK and tms-link images in MAME with the same
markers; require a minimum count and the names the checks depend on, and
document the absolute/undefined C_EXT exclusion.
- cinit.sh: assert the object relocation (0x10, .bss/_cinit_target base,
addend 0), compare the 28-byte optional header with GSPLNK, and link
CINIT.O alone to exercise the synthesized public cinit symbol.
- tmscoff.py: point the order-relaxation comment at the Task 1 lit test that
still pins the llc section order.
- oracle.sh: link the M5 native objects with GSPLNK and tms-link, require
identical allocated bytes/public symbols through the independent reader,
then run the tms-link image in MAME and decode _native_value with dis34.
- cinit.sh: a C TI .cinit record table (packed u16 count/u32 destination/
data words) linked by tms-link, the termtris copy loop in MAME, cinit at
the .cinit origin, the destination resolved to a bit address, and
bytes/placement equal to GSPLNK.
- longname.sh: a 44-character public function defined in one TU and called
from another, linked by tms-link, full name in the map, runs in MAME.
- debug.sh: tms-clang -g -> TI-COFF -> tms-link --keep-debug, .debug_*
wrapped in a minimal ELF32 container and validated with llvm-dwarfdump
(debug.c, line rows, low PC 0x314000, high_pc byte size, string names),
plus the stripped image loading in MAME.
- tms-clang: pass -g through to clang; the bit-pointer passes preserve !dbg.
- tms-link: accept GSPA's .text/.data/.bss/.cinit order as well as llc's
.text/.data/.cinit/.bss order (the real startup cinit.asm shape).