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 ea7e8f6ab80070571138d3d9c1ed136ed6b3d13e
parent 225c71cec0be7432964d97fbef5452790f4fb680
Author: Alexander Burger <abu@software-lab.de>
Date:   Tue, 29 Mar 2011 17:13:20 +0200

Don't use '$' for immediate addressing mode in the generic part
Diffstat:
Msrc64/arch/x86-64.l | 12++++++------
Msrc64/lib/asm.l | 4++--
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src64/arch/x86-64.l b/src64/arch/x86-64.l @@ -1,4 +1,4 @@ -# 21mar11abu +# 29mar11abu # (c) Software Lab. Alexander Burger # Byte order @@ -79,9 +79,9 @@ (de src (Src S) (cond - ((=0 S) (if (= "$0" Src) "%r12" Src)) # Immediate - ((not S) Src) # Register - ((=T S) # Direct + ((=0 S) (if (= "0" Src) "%r12" (pack "$" Src))) # Immediate + ((not S) Src) # Register + ((=T S) # Direct (if (and *FPic (not (pre? "(" Src))) (pack Src "@GOTPCREL(%rip)") (pack "$" Src) ) ) @@ -636,7 +636,7 @@ '((Src S) (if (== '& Src) (on Lea) - (unless (= "$0" Src) # Keep for 'xor' later + (unless (and (=0 S) (= "0" Src)) # Keep for 'xor' later (setq Src (src (recur (Src) @@ -651,7 +651,7 @@ (prinst "pushq" Src) (prinst "lea" Src "%rax") (prinst "pushq" "%rax") ) ) - ((= "$0" Src) + ((and (=0 S) (= "0" Src)) (prinst "xor" (car Reg) (pop 'Reg)) ) ((= "$pop" Src) (prinst "pop" (pop 'Reg)) ) diff --git a/src64/lib/asm.l b/src64/lib/asm.l @@ -1,4 +1,4 @@ -# 21mar11abu +# 29mar11abu # (c) Software Lab. Alexander Burger # *LittleEndian *Registers optimize @@ -238,7 +238,7 @@ (cond ((num? X) # Immediate (zero "*Mode") - (pack '$ (and F "~") X) ) + (pack (and F "~") X) ) ((reg X) (off "*Mode") @) # Register ((atom X) (on "*Mode") X) # Direct ((or (num? (cdr X)) (get (cdr X) 'equ))