From 8188bbbc9408322c18cdc2d1049126900abf793c Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 18 Feb 2019 21:48:19 -0800 Subject: 4981 - no, go back to 3 phases Considering how much trouble a merge phase would be (commit 4978), it seems simpler to just add the extra syntax for controlling the entry point of the generated ELF binary. But I wouldn't have noticed this if I hadn't taken the time to write out the commit messages of 4976 and 4978. Even if we happened to already have linked list primitives built, this may still be a good idea considering that I'm saving quite a lot of code in duplicated entrypoints. --- subx/056trace.subx | 8 -------- 1 file changed, 8 deletions(-) (limited to 'subx/056trace.subx') diff --git a/subx/056trace.subx b/subx/056trace.subx index 479569a7..f181e1d7 100644 --- a/subx/056trace.subx +++ b/subx/056trace.subx @@ -41,14 +41,6 @@ _test-trace-stream: # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -# main: - # run-tests() - e8/call run-tests/disp32 # 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'. - # syscall(exit, Num-test-failures) - 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 3/r32/EBX Num-test-failures/disp32 # copy *Num-test-failures to EBX - b8/copy-to-EAX 1/imm32/exit - cd/syscall 0x80/imm8 - # Allocate a new segment for the trace stream, initialize its length, and save its address to Trace-stream. # The Trace-stream segment will consist of variable-length lines separated by newlines (0x0a) initialize-trace-stream: -- cgit 1.4.1-2-gfad0