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 da90ed369fb2aaeac4b6cce43ee9b6126618ebb0
parent 18cb9a4b435e8bebdb2c7351d08a3043794c7652
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed, 20 Apr 2011 14:18:10 +0200

Introduced '*AlignedCode' flag
Diffstat:
Mlib/tags | 40++++++++++++++++++++--------------------
Msrc64/arch/ppc64.l | 4+---
Msrc64/arch/x86-64.l | 6++----
Msrc64/io.l | 8++++----
Msrc64/lib/asm.l | 6+++---
Msrc64/main.l | 5++++-
6 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/lib/tags b/lib/tags @@ -32,9 +32,9 @@ and (1616 . "@src64/flow.l") any (3933 . "@src64/io.l") append (1338 . "@src64/subr.l") apply (713 . "@src64/apply.l") -arg (2264 . "@src64/main.l") -args (2240 . "@src64/main.l") -argv (2884 . "@src64/main.l") +arg (2267 . "@src64/main.l") +args (2243 . "@src64/main.l") +argv (2887 . "@src64/main.l") as (144 . "@src64/flow.l") asoq (3001 . "@src64/subr.l") assoc (2966 . "@src64/subr.l") @@ -65,7 +65,7 @@ call (3082 . "@src64/flow.l") car (5 . "@src64/subr.l") case (1957 . "@src64/flow.l") catch (2459 . "@src64/flow.l") -cd (2639 . "@src64/main.l") +cd (2642 . "@src64/main.l") cdaaar (464 . "@src64/subr.l") cdaadr (487 . "@src64/subr.l") cdaar (179 . "@src64/subr.l") @@ -88,7 +88,7 @@ circ (816 . "@src64/subr.l") circ? (2398 . "@src64/subr.l") clip (1795 . "@src64/subr.l") close (4338 . "@src64/io.l") -cmd (2866 . "@src64/main.l") +cmd (2869 . "@src64/main.l") cnt (1413 . "@src64/apply.l") co (2540 . "@src64/flow.l") commit (1494 . "@src64/db.l") @@ -99,9 +99,9 @@ connect (201 . "@src64/net.l") cons (747 . "@src64/subr.l") copy (1225 . "@src64/subr.l") ctl (4216 . "@src64/io.l") -ctty (2664 . "@src64/main.l") +ctty (2667 . "@src64/main.l") cut (1795 . "@src64/sym.l") -date (2378 . "@src64/main.l") +date (2381 . "@src64/main.l") dbck (2103 . "@src64/db.l") de (529 . "@src64/flow.l") dec (2323 . "@src64/big.l") @@ -111,7 +111,7 @@ del (1850 . "@src64/sym.l") delete (1401 . "@src64/subr.l") delq (1452 . "@src64/subr.l") diff (2585 . "@src64/subr.l") -dir (2797 . "@src64/main.l") +dir (2800 . "@src64/main.l") dm (541 . "@src64/flow.l") do (2133 . "@src64/flow.l") e (2914 . "@src64/flow.l") @@ -120,7 +120,7 @@ env (611 . "@src64/main.l") eof (3492 . "@src64/io.l") eol (3483 . "@src64/io.l") err (4196 . "@src64/io.l") -errno (1376 . "@src64/main.l") +errno (1379 . "@src64/main.l") eval (180 . "@src64/flow.l") ext (5099 . "@src64/io.l") ext? (1032 . "@src64/sym.l") @@ -128,7 +128,7 @@ extern (898 . "@src64/sym.l") extra (1259 . "@src64/flow.l") extract (1218 . "@src64/apply.l") fifo (1961 . "@src64/sym.l") -file (2744 . "@src64/main.l") +file (2747 . "@src64/main.l") fill (3236 . "@src64/subr.l") filter (1161 . "@src64/apply.l") fin (2029 . "@src64/subr.l") @@ -165,7 +165,7 @@ ifn (1857 . "@src64/flow.l") in (4156 . "@src64/io.l") inc (2256 . "@src64/big.l") index (2633 . "@src64/subr.l") -info (2701 . "@src64/main.l") +info (2704 . "@src64/main.l") intern (873 . "@src64/sym.l") ipid (3201 . "@src64/flow.l") isa (956 . "@src64/flow.l") @@ -182,7 +182,7 @@ lieu (1154 . "@src64/db.l") line (3667 . "@src64/io.l") lines (3820 . "@src64/io.l") link (1172 . "@src64/subr.l") -lisp (1943 . "@src64/main.l") +lisp (1946 . "@src64/main.l") list (887 . "@src64/subr.l") listen (151 . "@src64/net.l") lit (155 . "@src64/flow.l") @@ -221,10 +221,10 @@ n== (2083 . "@src64/subr.l") nT (2194 . "@src64/subr.l") name (497 . "@src64/sym.l") nand (1651 . "@src64/flow.l") -native (1384 . "@src64/main.l") +native (1387 . "@src64/main.l") need (919 . "@src64/subr.l") new (830 . "@src64/flow.l") -next (2247 . "@src64/main.l") +next (2250 . "@src64/main.l") nil (1734 . "@src64/flow.l") nond (1934 . "@src64/flow.l") nor (1672 . "@src64/flow.l") @@ -238,7 +238,7 @@ onOff (1611 . "@src64/sym.l") one (1644 . "@src64/sym.l") open (4300 . "@src64/io.l") opid (3217 . "@src64/flow.l") -opt (2987 . "@src64/main.l") +opt (2990 . "@src64/main.l") or (1632 . "@src64/flow.l") out (4176 . "@src64/io.l") pack (1142 . "@src64/sym.l") @@ -271,7 +271,7 @@ push (1686 . "@src64/sym.l") push1 (1722 . "@src64/sym.l") put (2696 . "@src64/sym.l") putl (2948 . "@src64/sym.l") -pwd (2628 . "@src64/main.l") +pwd (2631 . "@src64/main.l") queue (1918 . "@src64/sym.l") quit (1094 . "@src64/main.l") quote (139 . "@src64/flow.l") @@ -282,7 +282,7 @@ raw (454 . "@src64/main.l") rd (5116 . "@src64/io.l") read (2624 . "@src64/io.l") replace (1499 . "@src64/subr.l") -rest (2293 . "@src64/main.l") +rest (2296 . "@src64/main.l") reverse (1674 . "@src64/subr.l") rewind (5082 . "@src64/io.l") rollback (1888 . "@src64/db.l") @@ -322,7 +322,7 @@ text (1270 . "@src64/sym.l") throw (2485 . "@src64/flow.l") tick (3169 . "@src64/flow.l") till (3578 . "@src64/io.l") -time (2511 . "@src64/main.l") +time (2514 . "@src64/main.l") touch (1047 . "@src64/sym.l") trim (1755 . "@src64/subr.l") try (1169 . "@src64/flow.l") @@ -335,9 +335,9 @@ up (702 . "@src64/main.l") upp? (3228 . "@src64/sym.l") uppc (3292 . "@src64/sym.l") use (1565 . "@src64/flow.l") -usec (2616 . "@src64/main.l") +usec (2619 . "@src64/main.l") val (1461 . "@src64/sym.l") -version (3001 . "@src64/main.l") +version (3004 . "@src64/main.l") wait (3118 . "@src64/io.l") when (1876 . "@src64/flow.l") while (2053 . "@src64/flow.l") diff --git a/src64/arch/ppc64.l b/src64/arch/ppc64.l @@ -3,6 +3,7 @@ # Byte order (off *LittleEndian) +(on *AlignedCode) # Register assignments (de *Registers @@ -124,9 +125,6 @@ (prinst "bl" "call") (prinst ".int" (pack Sym "-.")) ) ) ) -(de boxfun (Adr) - (pack Adr "+2") ) - # Addressing modes (de checkOp (Fun) (unless (Fun Op) diff --git a/src64/arch/x86-64.l b/src64/arch/x86-64.l @@ -1,8 +1,9 @@ -# 19apr11abu +# 20apr11abu # (c) Software Lab. Alexander Burger # Byte order (on *LittleEndian) +(off *AlignedCode) # Register assignments (de *Registers @@ -16,9 +17,6 @@ # Block operations: %rcx %rsi %rdi # C arguments: %rdi %rsi %rdx %rcx %r8 %r9 -# Machine specific -(de boxfun (Adr) Adr) - # Addressing modes (de byteReg (Reg) (cdr diff --git a/src64/io.l b/src64/io.l @@ -1,4 +1,4 @@ -# 15apr11abu +# 20apr11abu # (c) Software Lab. Alexander Burger # Close file descriptor @@ -2677,9 +2677,9 @@ ld B 1 # Bit mask shl B C # Shift it shr X 3 # Offset -? (not *LittleEndian) - xor X 7 # Invert byte offset -= + ? (not *LittleEndian) + xor X 7 # Invert byte offset + = add X L # Point to byte ret diff --git a/src64/lib/asm.l b/src64/lib/asm.l @@ -1,7 +1,7 @@ -# 18apr11abu +# 20apr11abu # (c) Software Lab. Alexander Burger -# *LittleEndian *Registers optimize +# *LittleEndian *AlignedCode *Registers optimize # *FPic *Section *Label *Tags *Program *Statement # *Instructions *IfStack *DoStack @@ -524,7 +524,7 @@ (prinst ".asciz" (pack "\"" Str "\"")) ) (asm initFun (Lbl Name Val) - (initSym Lbl Name Val (boxfun Val)) ) + (initSym Lbl Name Val (pack Val (and *AlignedCode "+2"))) ) (asm initSym (Lbl Name Val) (initSym Lbl Name Val Val) ) diff --git a/src64/main.l b/src64/main.l @@ -1,4 +1,4 @@ -# 19apr11abu +# 20apr11abu # (c) Software Lab. Alexander Burger (code 'Code 0) @@ -1362,6 +1362,9 @@ cc dlsym(A Y) # Find dynamic symbol null A # OK? if nz # Yes + ? *AlignedCode + or A CNT # Make short number + = ld (E) A # 'nz' - Set function definition end end