From b02a569bc752a753bceec270f1a9d75a48f9563a Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 27 Jan 2023 16:47:00 +0100 Subject: [PATCH] Immediates for instructions --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index b8c7acca5..e783c2841 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,10 @@ TODO: How to connect to state machines? Is it really possible to have arbitrary to be in certain registers? The same is true for instructions - it might be much more efficient to have them access fixed registers. One main benefit is that it allows to squash together multiple instructions that use different registers. +Partial answer to the second question: Instructions could have "immediate arguments" in the sense that +the arguments are not totally free expressions but taken from a fixed list of values / registers. +These could also be seen as overloads of the instructions: Add an arbitrary value to the value in register A (fixed register), +load from memory pointed to by the stack pointer and increase it (`B = mload SP++`) or not (`B = mload SP`). ### High-level language