- 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.
30 lines
797 B
NASM
30 lines
797 B
NASM
; debug-entry.asm -- M7.2 debug-info gate entry, linked at bit 018A0000.
|
|
;
|
|
; debug.c is linked first so debug_mul is the text-origin function and its
|
|
; DWARF low PC is the expected 0x314000 (text origin 018A0000 / 8). This
|
|
; entry calls debug_mul(), debug_add() and debug_ptr() and stores their
|
|
; results, 43, 14 and 30, at 018A8000, 018A8020 and 018A8040.
|
|
;
|
|
; debug_ptr() takes no argument: it uses the .data debug_index (2) for the
|
|
; pointer update, so the entry needs no argument-pushing sequence.
|
|
.ref _debug_mul
|
|
.ref _debug_add
|
|
.ref _debug_ptr
|
|
.text
|
|
.globl _start
|
|
_start:
|
|
setf 16,1,0
|
|
setf 32,0,1
|
|
movi _cstack,a14
|
|
move a14,a13
|
|
calla _debug_mul
|
|
move a8,@018A8000h,1
|
|
calla _debug_add
|
|
move a8,@018A8020h,1
|
|
calla _debug_ptr
|
|
move a8,@018A8040h,1
|
|
rets
|
|
|
|
.bss _cstack,32768,16
|
|
.end
|