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 7ad08ea00ad706f4a237ff210faa9b62cff2d252
parent f9aa0d9ff13f61f855f8e129fca9427963592334
Author: Alexander Burger <abu@software-lab.de>
Date:   Sun, 11 Nov 2012 09:02:05 +0100

emu64 optimization
Diffstat:
Msrc64/arch/emu.l | 26+++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/src64/arch/emu.l b/src64/arch/emu.l @@ -1,4 +1,4 @@ -# 03nov12abu +# 11nov12abu # (c) Software Lab. Alexander Burger # Byte order @@ -340,12 +340,17 @@ # Arithmetics (asm add (Dst D Src S) - (if (or D (atom Dst)) - (genCode (Dst D Src S) (list 'add Dst Src) ((op.n Dst D) (op.n Src S)) - "Carry = (Result = @1 += @2) < @2;" ) - (genCode (Src S) (list 'add 'D Src) ((op.n Src S)) - "Carry = (A.n += @1) < @1 && ++C.n == 0;" - "Result = C.n;" ) ) ) # 'z' only for upper word + (cond + ((= Dst "S") + (genCode (Dst D Src S) (list 'add Dst Src) ((op.n Dst D) (op.n Src S)) + "@1 += @2;" ) ) + ((or D (atom Dst)) + (genCode (Dst D Src S) (list 'add Dst Src) ((op.n Dst D) (op.n Src S)) + "Carry = (Result = @1 += @2) < @2;" ) ) + (T + (genCode (Src S) (list 'add 'D Src) ((op.n Src S)) + "Carry = (A.n += @1) < @1 && ++C.n == 0;" + "Result = C.n;" ) ) ) ) # 'z' only for upper word (asm addc (Dst D Src S) (if (or D (atom Dst)) @@ -364,8 +369,11 @@ "Result = C.n;" ) ) ) # 'z' only for upper word (asm sub (Dst D Src S) - (genCode (Dst D Src S) (list 'sub Dst Src) ((op.n Dst D) (op.n Src S)) - "Carry = (Result = @1 -= @2) > MAX64 - @2;" ) ) + (if (= Dst "S") + (genCode (Dst D Src S) (list 'sub Dst Src) ((op.n Dst D) (op.n Src S)) + "@1 -= @2;" ) + (genCode (Dst D Src S) (list 'sub Dst Src) ((op.n Dst D) (op.n Src S)) + "Carry = (Result = @1 -= @2) > MAX64 - @2;" ) ) ) (asm subc (Dst D Src S) (genCode (Dst D Src S) (list 'subc Dst Src) ((op.n Dst D) (op.n Src S))