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).
branch.c is now compiled with -fno-inline so the disassembler round-trip
still has _sumto/_max2/_lt calls to check; -O2 alone inlines them into
branch_test and constant-folds sumto(10). -fno-inline is used instead of
-O0 because -O0 also changes the branch condition codes the round-trip pins
(sumto LT/EQ, max2 GT).
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.