summaryrefslogtreecommitdiff
path: root/gen/docs/isa_defs/registers.isa
diff options
context:
space:
mode:
authorallexanderbergmans <allexander.bergmans@student.elisa.be>2026-07-03 12:17:10 +0200
committerallexanderbergmans <allexander.bergmans@student.elisa.be>2026-07-03 12:17:10 +0200
commit887875959aa84af92291db334898aaa20956e632 (patch)
tree62f68d6e93cf444e5605a40c3e8ea7ec0bd89f49 /gen/docs/isa_defs/registers.isa
Diffstat (limited to 'gen/docs/isa_defs/registers.isa')
-rw-r--r--gen/docs/isa_defs/registers.isa289
1 files changed, 289 insertions, 0 deletions
diff --git a/gen/docs/isa_defs/registers.isa b/gen/docs/isa_defs/registers.isa
new file mode 100644
index 0000000..baa8124
--- /dev/null
+++ b/gen/docs/isa_defs/registers.isa
@@ -0,0 +1,289 @@
+# Fyntv Register Definitions
+
+REGISTER x0
+ ABBR zero
+ DESC Always-zero register — reads return 0, writes are discarded
+ PRESERVE false
+ CALLER false
+ ARG false
+ INDEX 0
+END
+
+REGISTER x1
+ ABBR ra
+ DESC Return address link register
+ PRESERVE false
+ CALLER false
+ ARG false
+ INDEX 1
+END
+
+REGISTER x2
+ ABBR sp
+ DESC Stack pointer
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 2
+END
+
+REGISTER x3
+ ABBR gp
+ DESC Global pointer
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 3
+END
+
+REGISTER x4
+ ABBR tp
+ DESC Thread pointer
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 4
+END
+
+REGISTER x5
+ ABBR t0
+ DESC Temporary register 0
+ PRESERVE false
+ CALLER true
+ ARG false
+ INDEX 5
+END
+
+REGISTER x6
+ ABBR t1
+ DESC Temporary register 1
+ PRESERVE false
+ CALLER true
+ ARG false
+ INDEX 6
+END
+
+REGISTER x7
+ ABBR t2
+ DESC Temporary register 2
+ PRESERVE false
+ CALLER true
+ ARG false
+ INDEX 7
+END
+
+REGISTER x8
+ ABBR s0
+ DESC Saved register 0 / frame pointer
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 8
+END
+
+REGISTER x9
+ ABBR s1
+ DESC Saved register 1
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 9
+END
+
+REGISTER x10
+ ABBR a0
+ DESC Function argument 0 / return value 0
+ PRESERVE false
+ CALLER true
+ ARG true
+ INDEX 10
+END
+
+REGISTER x11
+ ABBR a1
+ DESC Function argument 1 / return value 1
+ PRESERVE false
+ CALLER true
+ ARG true
+ INDEX 11
+END
+
+REGISTER x12
+ ABBR a2
+ DESC Function argument 2
+ PRESERVE false
+ CALLER true
+ ARG true
+ INDEX 12
+END
+
+REGISTER x13
+ ABBR a3
+ DESC Function argument 3
+ PRESERVE false
+ CALLER true
+ ARG true
+ INDEX 13
+END
+
+REGISTER x14
+ ABBR a4
+ DESC Function argument 4
+ PRESERVE false
+ CALLER true
+ ARG true
+ INDEX 14
+END
+
+REGISTER x15
+ ABBR a5
+ DESC Function argument 5
+ PRESERVE false
+ CALLER true
+ ARG true
+ INDEX 15
+END
+
+REGISTER x16
+ ABBR a6
+ DESC Function argument 6
+ PRESERVE false
+ CALLER true
+ ARG true
+ INDEX 16
+END
+
+REGISTER x17
+ ABBR a7
+ DESC Function argument 7
+ PRESERVE false
+ CALLER true
+ ARG true
+ INDEX 17
+END
+
+REGISTER x18
+ ABBR s2
+ DESC Saved register 2
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 18
+END
+
+REGISTER x19
+ ABBR s3
+ DESC Saved register 3
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 19
+END
+
+REGISTER x20
+ ABBR s4
+ DESC Saved register 4
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 20
+END
+
+REGISTER x21
+ ABBR s5
+ DESC Saved register 5
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 21
+END
+
+REGISTER x22
+ ABBR s6
+ DESC Saved register 6
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 22
+END
+
+REGISTER x23
+ ABBR s7
+ DESC Saved register 7
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 23
+END
+
+REGISTER x24
+ ABBR s8
+ DESC Saved register 8
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 24
+END
+
+REGISTER x25
+ ABBR s9
+ DESC Saved register 9
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 25
+END
+
+REGISTER x26
+ ABBR s10
+ DESC Saved register 10
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 26
+END
+
+REGISTER x27
+ ABBR s11
+ DESC Saved register 11
+ PRESERVE true
+ CALLER false
+ ARG false
+ INDEX 27
+END
+
+REGISTER x28
+ ABBR t3
+ DESC Temporary register 3
+ PRESERVE false
+ CALLER true
+ ARG false
+ INDEX 28
+END
+
+REGISTER x29
+ ABBR t4
+ DESC Temporary register 4
+ PRESERVE false
+ CALLER true
+ ARG false
+ INDEX 29
+END
+
+REGISTER x30
+ ABBR t5
+ DESC Temporary register 5
+ PRESERVE false
+ CALLER true
+ ARG false
+ INDEX 30
+END
+
+REGISTER x31
+ ABBR t6
+ DESC Temporary register 6
+ PRESERVE false
+ CALLER true
+ ARG false
+ INDEX 31
+END