From 01a28c56c77a265fc6dd9c29ba1f9abc04fbab7e Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 17 Feb 2020 23:35:44 -0800 Subject: 6019 - finish supporting all branch primitives I'd been thinking I didn't need unconditional `break` instructions, but I just realized that non-local unconditional breaks have a use. Stop over-thinking this, just support everything. The code is quite duplicated. --- mu_summary | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mu_summary') diff --git a/mu_summary b/mu_summary index 411656bb..2d48d2de 100644 --- a/mu_summary +++ b/mu_summary @@ -125,14 +125,15 @@ Jumps can take an optional label starting with '$': loop $foo This instruction jumps to the beginning of the block called $foo. It must lie -somewhere inside such a box. Jumps are only legal to containing blocks. Use +somewhere inside such a block. Jumps are only legal to containing blocks. Use named blocks with restraint; jumps to places far away can get confusing. There are two unconditional jumps: loop loop label - # unconditional break instructions don't seem useful + break + break label The remaining jump instructions are all conditional. Conditional jumps rely on the result of the most recently executed `compare` instruction. (To keep -- cgit 1.4.1-2-gfad0