epsilon-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jitter v0.9.242, patch] Incompatible changes in .jitter syntax: poke pa


From: Luca Saiu
Subject: [Jitter v0.9.242, patch] Incompatible changes in .jitter syntax: poke patch
Date: Sun, 20 Dec 2020 15:57:22 +0100
User-agent: Gnus (Gnus v5.13), GNU Emacs 27.0.50, x86_64-pc-linux-gnu

Hello.

I implemented some incompatible changes in the Jitter specification
syntax for stacks and register classes.  Most of the new features are
not working yet but their syntax is correctly recognised already, in
order to minimise changes in Poke.

Is this patch okay for master?  The test suite passes:
# of expected passes            4947
# of unsupported tests          7

--8<---------------cut here---------------start------------->8---
Submodule jitter 96f8c1ec..85709073:
  > syntax change in register-class and stack specifications
  > main program template: print routine before specialisation
  > unified routine API: do not make executable routines just for printing
  > remove brainfuck example VM
  > add support for MIPS release 6; factor and improve the MIPS code
  > update comment
  > risc-v: add overflow-checking multiplication
diff --git a/libpoke/pvm.jitter b/libpoke/pvm.jitter
index 6caf3b05..20b3cfdc 100644
--- a/libpoke/pvm.jitter
+++ b/libpoke/pvm.jitter
@@ -2,6 +2,7 @@
 
 ## Copyright (C) 2019, 2020 Jose E. Marchesi
 ## Written by Jose E. Marchesi
+## Updated in 2020 by Luca Saiu
 
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -18,19 +19,46 @@
 
 vm
   set prefix "pvm"
-  tos-stack "pvm_val" "stack"
-  ntos-stack "pvm_val" "returnstack"
-  ntos-stack "struct pvm_exception_handler *" "exceptionstack"
+end
+
+
+
+## Stacks.
+
+stack s
+  long-name "stack"
+  c-element-type "pvm_val"
+  tos-optimized
+  element-no 65536
+  guard-underflow
+  guard-overflow
+end
+
+stack t
+  long-name "returnstack"
+  c-element-type "pvm_val"
+  non-tos-optimized
+  element-no 65536
+  guard-underflow
+  guard-overflow
+end
+
+stack x
+  long-name "exceptionstack"
+  c-element-type "struct pvm_exception_handler *"
+  non-tos-optimized
+  element-no 65536
+  guard-underflow
+  guard-overflow
 end
 

 
 ## Register classes.
 
-register-class r 1
-  code
-    pvm_val
-  end
+register-class r
+  c-type "pvm_val"
+  fast-register-no 1
 end
 

--8<---------------cut here---------------end--------------->8---

Regards,

-- 
Luca Saiu
* My personal web site:  http://ageinghacker.net
* GNU epsilon:           http://www.gnu.org/software/epsilon
* Jitter:                http://ageinghacker.net/projects/jitter

I support everyone's freedom of mocking any opinion or belief, no
matter how deeply held, with open disrespect and the same unrelented
enthusiasm of a toddler who has just learned the word "poo".

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]