summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2016-10-07 20:57:10 -0400
committerJune McEnroe <june@causal.agency>2016-10-07 20:57:10 -0400
commitf316fd8abc765510d40d6e17f83bb0611afa9558 (patch)
treeafb9115d0c6d4a08f0aa75710718cae5d873ca1a
parentAdd runtime functions to jrp (diff)
downloadsrc-f316fd8abc765510d40d6e17f83bb0611afa9558.tar.gz
src-f316fd8abc765510d40d6e17f83bb0611afa9558.zip
Swap stacks in OP_CALL and wasteful OP_RELO in jrp
NEED MORE BYTES.
-rwxr-xr-x.bin/jrp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/.bin/jrp.c b/.bin/jrp.c
index b98f750d..20019245 100755
--- a/.bin/jrp.c
+++ b/.bin/jrp.c
@@ -16,7 +16,8 @@ typedef value *(*fptr)(value *);
 enum {
     OP_PROL = 0x90fc8948e5894855, // push ebp; mov rbp, rsp; mov rsp, rdi
     OP_EPIL = 0xc35dec8948e08948, // mov rax, rsp; mov rsp, rbp; pop rbp; ret
-    OP_CALL = 0x90666666d0ff5f58, // pop rax; pop rdi; call rax
+    OP_CALL = 0x90d0ffe587485f58, // pop rax; pop rdi; xchg rsp, rbp; call rax
+    OP_RELO = 0x9090666666e58748, // xchg rsp, rbp
     OP_PUSH = 0x0000000068906666, // push strict dword 0
     OP_HIGH = 0x00000000042444c7, // mov [rsp + 4], strict dword 0
     OP_DROP = 0x9066666608c48348, // add rsp, 8
@@ -75,6 +76,7 @@ static void rt_print_hex(value val) {
 #define JIT_CALL(p, fn) { \
     JIT_PUSH(p, fn); \
     *p++ = OP_CALL; \
+    *p++ = OP_RELO; \
 }
 
 int main() {
-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe Weirdly the Fn key doesn't change how the F row registers... I wonder if I can do something about that. 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 11 is what I use on macOS, but I feel like my eyes are working harder here. 2021-02-07Fully configure and rebind cwmJune McEnroe This is sort of a mix of trying to emulate macOS somewhat for my muscle memory and just rebinding some of the cwm defaults to use 4- rather than M-. 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe cwm still needs a lot more rebinding, and I need to actually look at its other options. xterm definitely still needs some configuration, but I at least managed to get it to use a decent looking font. Very happy that OpenBSD includes Luxi Mono, which is what my usual font, Go Mono, is based on anyway. Still missing is xmodmap and such. 2021-02-06Add xterm output to schemeJune McEnroe