Commit Graph

96 Commits

Author SHA1 Message Date
Torsten 8832df3221 Add number of registers to platform 2020-02-26 19:01:01 +02:00
Torsten Ruger 37eeb81f45 fix all tests for previous commit 2019-02-08 23:03:23 +02:00
Torsten Ruger 8d3a1954fa close #21
Mostly replaced Fixnum with integer
also in the rx-file dependency
all travis and testing with 2.4+
2019-02-07 18:24:35 +02:00
Torsten Ruger c3b026a180 expand constant load
slightly hacky, but in good tradition
previous implementation only worked until 16 significant bits, which is getting to little
this one just keeps adding more instructions to arrive at the constant by force
There are surely cleverer ways of doing this, ie by using the barrel shifter
A start on #15, admittedly a hack
2018-08-31 23:28:31 +03:00
Torsten Ruger 4839e0d245 minor naming and spaces 2018-07-27 10:46:22 +03:00
Torsten Ruger ff8b95f21a get block resolution to use the extra
block_compiler puts in the extra, that we get out when resolving the type
Thus block args work, though only by assuming direct call
2018-07-17 10:37:33 +03:00
Torsten Ruger 9005513368 rename typed_method to callable_method
seems to make the essence clearer
also extracted base class
2018-07-07 09:11:09 +03:00
Torsten Ruger c947c27a14 clean up booting
many machine boot became obsolete
or just neede parfait to boot
actual linker functionality pending
2018-07-01 14:12:42 +03:00
Torsten Ruger 46d8f5002f hoist parfait boot out of the machine boot 2018-06-30 00:39:23 +03:00
Torsten Ruger d50893bb0f rename risc_value to register_value
almost to register, but it still carries that value
2018-06-29 11:39:07 +03:00
Torsten Ruger b804be5f70 fix dynamic call
which had the method in the regsiter, not the binary.
Single SlotToReg added (and some tests)
Which amazingly fixed all broken binary tests
2018-06-25 00:19:43 +03:00
Torsten Ruger 068bda492c implement DynamicJump for Arm
which is in fact the same as return (moving address into pc)
2018-06-24 19:13:55 +03:00
Torsten Ruger db459fcd3d fix label loading in arm
was still loading the integer address
instead of the return address's address
Hello World working
2018-06-19 17:35:00 +03:00
Torsten Ruger 956c2ebe54 make arm use branch_lsteners 2018-06-19 10:51:03 +03:00
Torsten Ruger 698c845297 seperate position create and register
many test fixes
2018-06-15 22:00:49 +03:00
Torsten Ruger 5ec235d049 fixes outstanding misc, All green
Well. it's been a while, positioning is fixed (again)
apart from the upcoming BranchListener
2018-06-10 13:19:55 +03:00
Torsten Ruger 5815d32bde make the instructions jump over the BinaryCode end 2018-06-07 19:27:44 +03:00
Torsten Ruger 4ab6d62acf small arm fixes etc 2018-06-06 00:53:41 +03:00
Torsten Ruger d7b3368b28 fix some pesty errors
need to fix instruction overlap beofre interpreter starts again
2018-06-05 19:05:12 +03:00
Torsten Ruger 8d953a619f propagate instruction positions
still overlapping onto binaries, but a start
2018-06-05 18:11:25 +03:00
Torsten Ruger 1d1c7105b4 introduce some helper methods 2018-06-02 23:02:59 +03:00
Torsten Ruger 0e155315aa movs is not allowed into pc
Illegal instruction it says
Otherwise the status update is nice (for branches) and we’ll keep
2018-05-31 14:03:25 +03:00
Torsten Ruger 67100a3ef8 write adjusted address
and rename integer to address in label
1k hurray
2018-05-31 00:07:58 +03:00
Torsten Ruger 0dc89c772a get the label int to work consistently
still need to use it in the return
2018-05-30 10:54:18 +03:00
Torsten Ruger 074ec34659 wip, fixed some label, need more fixing 2018-05-30 10:29:38 +03:00
Torsten Ruger b81d9565de fix binary code offset when calling
in other words, remember the arm pipeline being 8
2018-05-29 17:03:20 +03:00
Torsten Ruger 8d8cc4b016 more test fixing
only one bug to go
2018-05-24 21:20:56 +03:00
Torsten Ruger 49c4d170ce make the interpreter platform
but still using the risc_instruction stream
2018-05-17 09:31:36 +03:00
Torsten Ruger 39902401b9 positioning code by setting first method code
codes will initial (and on reset) propagate the whole chain
2018-05-13 15:28:10 +03:00
Torsten Ruger 2d901bf7b6 not wrapping the cpu initial jump anymore
also introduce padding after cpu_init (wip)
2018-05-12 18:36:59 +03:00
Torsten Ruger 776a97986d fix instruction positioning
use at as at and only compute difference when needed (to determine if
there is a jump in binary)
Easier to understand that way
2018-05-11 18:36:45 +03:00
Torsten Ruger 7ca7e92dda remove link exception class 2018-05-08 20:22:04 +03:00
Torsten Ruger cf06642768 start passing positions along inside the position code 2018-05-08 19:59:43 +03:00
Torsten Ruger ce3cc72f9e move all position setting into position
Position and subclasses handle the logic, external to
the classes, so it can be swapped out later
(at runtime positions can’t change)
2018-05-07 22:30:43 +03:00
Torsten Ruger 68fb9b1bdc rename Position get/set 2018-05-06 20:04:02 +03:00
Torsten Ruger 6b7e1e3932 remove link exception raise
need to fix move logic next
2018-05-05 23:55:50 +03:00
Torsten Ruger d65a982454 start by moving positioned(module) to position(class) 2018-05-05 19:47:18 +03:00
Torsten Ruger 43d5521cfc debugging positions 2018-05-05 19:32:01 +03:00
Torsten Ruger 30ca70e042 remove extra instruction and use next instead
was messing with binary writing as the assumption of 1 word writes is
baked in
2018-04-03 14:46:07 +03:00
Torsten Ruger 606e3f8cb3 fix calling to binaries
used to be to the method, but we assemble the method to its own
position.
Throw in a test for binary calling
2018-03-28 13:00:03 +03:00
Torsten Ruger 105e8f7092 some better and some missing arm test
for the exceptional case
2018-03-28 12:16:28 +03:00
Torsten Ruger 73b7e2b22f remove all test_all
Stop manually creating the list of tests (and searching missing).
Main level test_all does a search for all test_*
also possible to run by command line with starts
2017-04-13 17:00:56 +03:00
Torsten Ruger aa79e41d1c rename register to risc
seems to fit the layer much better as we really have a very reduced
instruction set
2017-01-19 09:02:29 +02:00
Torsten Ruger da58ce30e3 put arm tests in arm module 2017-01-03 22:37:55 +02:00
Torsten Ruger d8289d4fcf try spelling correctly 2016-12-30 11:59:38 +02:00
Torsten Ruger 80237e5033 rename position accessor
for future
2016-12-28 21:40:06 +02:00
Torsten Ruger 8cfcb84c8d collect missing tests (and ordering) 2016-12-28 19:31:17 +02:00
Torsten Ruger 9cf56b3aa6 use factory functions consistently to create instructions 2016-12-28 19:01:58 +02:00
Torsten Ruger b3eeb7db21 memory instruction refactor (small) 2016-12-14 21:05:24 +02:00
Torsten Ruger b3bf881c49 streamline arm test names and get guard to pick up right tests 2016-12-14 19:06:32 +02:00