Torsten Ruger
ad3040a846
add position_chaning to event interface
...
by reacting to the change _before it happens, we can move any BinaryCode out of the way
So when Instruction are inserted and code gets inserted, we don't need to set up the correct listener explicitly (which is tricky across mathods and changing chains), but instead just move anything that is in the way along
2018-06-09 08:10:41 +03:00
Torsten Ruger
2d218bbc48
work on jump insertion continues
...
Now registering CodeListener instead of PositionListener
Also instead of on the previous, in itself, which is simpler
and allows to react to insertion at end
2018-06-07 19:26:02 +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
f35ee6425a
renaming and test fixing
2018-06-02 23:48:12 +03:00
Torsten Ruger
1d1c7105b4
introduce some helper methods
2018-06-02 23:02:59 +03:00
Torsten Ruger
c2d450f779
fold position module and object position
...
simpler that way, aslo code is moving to listners
2018-06-02 21:59:41 +03:00
Torsten Ruger
24f6e30b54
start on redoing instruction positions
...
using insruction listeners (wip)
2018-06-02 21:20:15 +03:00
Torsten Ruger
3bc35c2275
rework binary code positioning setup
...
dependency chain set up explicitly.
Next have to react to events correctly
2018-06-02 17:29:38 +03:00
Torsten Ruger
aa6707337a
positioning wip
2018-06-02 16:12:01 +03:00
Torsten Ruger
46fbfb7101
adds the simple object dependency
...
where the next object is dependent on the previous one
and just behind it, the padded_length away
2018-05-31 20:41:04 +03:00
Torsten Ruger
e39e96f646
create return address as own class to hold return addresses
...
to distinguish from integer, which does not need adjusting
2018-05-30 23:49:01 +03:00
Torsten Ruger
074ec34659
wip, fixed some label, need more fixing
2018-05-30 10:29:38 +03:00
Torsten Ruger
c55b41afae
sort objects by class before positioning
...
since we don’t have pages yet, but want consistent layout
2018-05-29 20:52:58 +03:00
Torsten Ruger
f9a89db10c
use fake memory
...
fix integer offset bug
(which only didn’t cause errors as fixnums are still an order too big
and the famous +1 error hit the empty space)
2018-05-28 15:09:59 +03:00
Torsten Ruger
be1bc63ff2
jump was written off the end of binary code, fixed
2018-05-28 11:45:04 +03:00
Torsten Ruger
183d4152d5
loading label must translate the labels too
...
(psst: like arm translator already did. duh)
2018-05-24 19:20:06 +03:00
Torsten Ruger
8d510c2e7e
getting instruction repositioning right
...
big bug hunt, involving complicated maths (%)
2018-05-24 14:27:53 +03:00
Torsten Ruger
0293320bb8
use a constant for the binary code offset
...
where the instructions start
2018-05-23 21:35:22 +03:00
Torsten Ruger
f5d1090c39
no-ops really
2018-05-23 18:06:55 +03:00
Torsten Ruger
ef2dc932ad
use positions in interpreter
2018-05-20 15:52:13 +03:00
Torsten Ruger
a7a62d53b2
use modified opal logger
...
logger was having bizarre format errors
copied and simplified (to get on)
2018-05-20 14:45:48 +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
07ed16d765
groundwork for interpreter platform
...
especially positioning makes the previous interpreter approach to
fragile (too far off the real thing)
Interpreter should be it’s own platform (still use the risc
instructions),
get a translator and use positions
2018-05-16 21:00:14 +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
e89c4d1ce1
pass binary that arm instruction belongs to in
...
at least to first. repositioning and stuff next
2018-05-06 19:56:36 +03:00
Torsten Ruger
415df49199
hand context into position
2018-05-06 00:34:59 +03:00
Torsten Ruger
40f4bfc287
change to position objects complete
2018-05-05 20:25:10 +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
d49d2665c5
reinit risc_init
...
fixes over 100 tests :-)
2018-05-01 22:36:46 +03:00
Torsten Ruger
6be28e7f55
fix (re)positioning when link exceptions are thrown
...
slow design, but sort of works
2018-05-01 19:48:11 +03:00
Torsten Ruger
dd2c2cb975
fix init jump bug
...
the label for the jump was not translated correctly
call needs to go through to_cpu to create single instance
on the way init order slightly changed
2018-05-01 19:19:04 +03:00
Torsten Ruger
1acd231a33
debugging binaries, initial jump issues
2018-04-30 13:28:55 +03:00
Torsten Ruger
9e9b5c7f37
move to parfait integers in risc layer
...
loading constants means loading parfait objects
objects have to me collected in machine
integer ok, string/true/false/nil next
2018-03-31 13:25:59 +03:00
Torsten Ruger
e012f16d7f
fix positioning and the assembly works
2018-03-29 18:03:21 +03:00
Torsten Ruger
34b16a2332
use a binary code for the first jump
2018-03-29 17:39:31 +03:00
Torsten Ruger
5eee79719d
reenable now working tests
2018-03-28 13:04:25 +03:00
Torsten Ruger
fcb7f652eb
found the culprit
2018-03-28 11:37:17 +03:00
Torsten Ruger
500851d246
start on new binary creation process
...
now writing into BinaryCode instead of stream
also in the risc layer, not arm, for reusability
2018-03-27 20:47:41 +03:00
Torsten Ruger
4069397fca
don't collect labels anymore
...
don’t need, use binary code as the methods jump point
2018-03-27 19:06:16 +03:00
Torsten Ruger
4253d7a6b9
move assembly from assembler to machine
...
id now called position
2018-03-27 18:47:39 +03:00
Torsten Ruger
e8f449bc65
reuse translator in machine and clean up api
2018-03-26 19:42:40 +03:00
Torsten Ruger
3bd23cee28
also separate risc and cpu inits for the machine
...
interpreter works on risc, but assembler off cpu
2018-03-25 19:36:00 +03:00
Torsten Ruger
f7aac1d1a4
polish docs
...
and a bit of code style
2018-03-11 16:11:15 +05:30