[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-lightning README
From: |
Marius Vollmer |
Subject: |
guile/guile-lightning README |
Date: |
Sun, 01 Apr 2001 09:13:34 -0700 |
CVSROOT: /cvs
Module name: guile
Changes by: Marius Vollmer <address@hidden> 01/04/01 09:13:34
Modified files:
guile-lightning: README
Log message:
CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-lightning/README.diff?r1=1.2&r2=1.3
Patches:
Index: guile/guile-lightning/README
diff -u guile/guile-lightning/README:1.2 guile/guile-lightning/README:1.3
--- guile/guile-lightning/README:1.2 Mon Mar 19 17:54:21 2001
+++ guile/guile-lightning/README Sun Apr 1 09:13:34 2001
@@ -3,3 +3,75 @@
Guile-lightning makes the JIT compiler GNU Lightning available to
Guile.
+
+
+Random notes:
+- - - - - - -
+
+Tail-callable calling convention. I want to have a tail-callable
+calling convention that supports a large number of arguments and
+multiple return values with cheap ignoring of additional values.
+
+The convention laid out here is intended for the x86 and is stack
+based. It is expressed in Lightning terms, tho. I want to modify
+Lightning to offer this calling convention as an abstraction, which
+can then be ported to other backends.
+
+ Caller saved registers: r0, r1, r2
+ Callee saved registers: v0, v1, v2
+
+ On entry: r0 = closure
+ r1 = number of args (scaled)
+
+ sp[0] = return address
+ sp[1] = first arg
+ sp[r1] = last arg
+
+ On return: r0 = first val
+ r1 = number return values (scaled)
+ sp[0] = last val
+ sp[r1-1] = second val
+
+This requires a lot of stack shuffling.
+
+Prolog/Epilog variants
+
+ Fixed, known number of args
+
+ push v0
+ push v1
+ push v2
+ push fp
+ mov fp sp
+ :
+ mov sp fp
+ pop fp
+ pop v2
+ pop v1
+ pop v0
+ pop r2
+ add sp sp num_args*sizeof(SCM)
+ mov r1 4
+ jmp r2
+
+ Variable number of args
+
+ push r1
+ push v1
+ push v2
+ push fp
+ mov fp sp
+ :
+ mov sp fp
+ pop fp
+ pop v2
+ pop v1
+ pop v0
+ pop r1
+ pop r2
+ add sp sp r1
+ mov r1 4
+ jmp r2
+
+ Maybe have a way to declare which of v0, v1, v2 really needs to be
+ saved. Maybe allow frame-pointer less operation.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile/guile-lightning README,
Marius Vollmer <=