picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 18ad4d3201116b558f7bfad6be5789bfd78b8b7d
parent 5c57ff2ecacc9b41c12d5ef9d4cf3f5f8801873f
Author: Alexander Burger <abu@software-lab.de>
Date:   Mon, 18 Apr 2011 09:39:27 +0200

Centralized 'label' handling
Diffstat:
Msrc64/lib/asm.l | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src64/lib/asm.l b/src64/lib/asm.l @@ -1,4 +1,4 @@ -# 17apr11abu +# 18apr11abu # (c) Software Lab. Alexander Burger # *LittleEndian *Registers optimize @@ -75,7 +75,7 @@ (quit "Register" Lbl) ) (when Lbl (def Lbl 'src (cdr (file))) - (label (setq *Label Lbl)) ) + (label (setq *Label Lbl) T) ) (setq *Program (make (while (and (skip "#") (<> "(" (peek))) @@ -106,7 +106,7 @@ (chain (cdr @)) ) ) ) ) (for *Statement *Program (if (== ': (car *Statement)) - (prinl (cdr *Statement) ':) + (label (cdr *Statement)) (apply (get (car *Statement) 'asm) (cdr *Statement)) ) ) ) ) ) # (data 'lbl) @@ -498,12 +498,12 @@ # Directives -(de label (Lbl) - (prinl " .globl " Lbl) +(de label (Lbl Flg) + (and Flg (prinl " .globl " Lbl)) (prinl Lbl ':) ) (asm :: (Lbl) - (label Lbl) ) + (label Lbl T) ) (asm word (N) (prinst ".quad" N) ) @@ -554,7 +554,7 @@ (prinst ".byte" (glue ", " Name)) (off Name) ) (when Lbl - (label Lbl) ) + (label Lbl T) ) (prinst ".quad" Val) (while Name (prinst ".byte" (glue ", " (cut 8 'Name))) ) )