Torsten Ruger
fd519314cb
strip down compare instruction
...
not really used, using conditional branches instead.
(in arm any instruction can execute conditionally)
2016-12-16 00:41:37 +02:00
Torsten Ruger
94c423c2b3
whittling arm_translator
2016-12-15 18:21:08 +02:00
Torsten Ruger
884bf23e5f
fix elf test
2016-12-15 17:57:45 +02:00
Torsten Ruger
b93f207638
some common instruction extration
2016-12-15 12:38:22 +02:00
Torsten Ruger
fdefb8e7a5
more refactoring on compare
2016-12-15 12:38:03 +02:00
Torsten Ruger
ec2b0a563e
bunch of method extraction on instructions
2016-12-14 21:53:26 +02:00
Torsten Ruger
55c108a8d7
refactor move_instruction a bit
2016-12-14 21:13:41 +02:00
Torsten Ruger
b3eeb7db21
memory instruction refactor (small)
2016-12-14 21:05:24 +02:00
Torsten Ruger
6eea3f2b2a
refactor logic instruction
2016-12-14 20:31:37 +02:00
Torsten Ruger
c1d23a8d48
whitespace round plusses
2016-12-14 19:57:09 +02:00
Torsten Ruger
27e7a362db
comment unused code
2016-12-14 19:52:08 +02:00
Torsten Ruger
56bf875f36
refactor call_instruction
2016-12-14 19:07:03 +02:00
Torsten Ruger
bf4ddd16ee
remove dead code
2016-12-14 19:06:48 +02:00
Torsten Ruger
456e9b1ec0
folded salama-arm in
2016-12-14 13:43:13 +02:00
Torsten Ruger
a8453c126d
use arm shift at runtime
...
arm indexes are in bytes (x4) at compile time
but at runtime we only have the array indexes, iw word indexes
arm has the nice barrel shifter to save us an extra instruction
2015-11-19 12:48:13 +02:00
Torsten Ruger
249f43ad34
translate and interpret new instructions
2015-11-19 10:09:55 +02:00
Torsten Ruger
303b7eb1f8
putstring unfolds length
...
which means sys call doesn’t need to
and also interpreter sometimes gets a symbol length
2015-11-16 18:03:29 +02:00
Torsten Ruger
f50d7b57a4
fix the putstring sys call indexing
...
index 0 is the marker word , so like in some, all indexes 1 based
works :-)
2015-11-15 22:03:06 +02:00
Torsten Ruger
8e82da0b61
fix arm (assembled) indexing
...
by having a dummy 0 index in salaam. when assembled
2015-11-15 20:42:07 +02:00
Torsten Ruger
458610b970
implement string length
2015-11-15 11:28:16 +02:00
Torsten Ruger
b30cf21bbd
fix arm indexes
...
needs rethought
fixed for static use, but what about dynamic
2015-11-15 00:35:12 +02:00
Torsten Ruger
6127d92ca9
implement arm branches
...
which backfired into interpreter as
plus actually means 0 or plus in arm
may still change back but for now
2015-11-14 00:20:03 +02:00
Torsten Ruger
6f0d6d831e
update arm and implement most operators
...
multiplication wasn’t implemented
and division isn’t part if arm
neither is rotate by register
2015-11-12 20:02:14 +02:00
Torsten Ruger
c38775e933
add set_internal
...
and the set_slot with register
very much like the get_slot for get_internal
2015-11-08 17:10:36 +02:00
Torsten Ruger
484e2d19d4
allow for registers in get slot
2015-11-07 19:38:03 +02:00
Torsten Ruger
c15445a958
let labels be constants
2015-11-03 16:20:25 +02:00
Torsten Ruger
3774f8a5a2
use translator and remove passes
...
the only passes that were left were reg -> arm
those are almost completely one to one, so the idea of passes didn’t fit
2015-10-24 17:11:18 +03:00
Torsten Ruger
a871f96630
remove passes and achieve the same by translating
2015-10-24 11:42:36 +03:00
Torsten Ruger
f4f703975b
removed arm and use as gem
2015-07-18 14:12:20 +03:00
Torsten Ruger
e1c19dee80
remove old to_asm
...
very strange that is was called in 1.9 but not 2.0
2.0 seems to delay interpolating strings
2015-07-18 12:15:07 +03:00
Torsten Ruger
f5136b6b68
minor formatting
2015-07-18 11:52:30 +03:00
Torsten Ruger
50da6a40f2
Move the Main instruction from register to virtual
...
also needs a branch in register.
This way the register level is self sufficient
(noticed while writing debugger)
2015-07-17 13:21:57 +03:00
Torsten Ruger
b670e058a9
fixes to get opal to work
...
opal has bug with << and |=, but changing syntax works
2015-07-12 10:01:45 +03:00
Torsten Ruger
b61c73acdd
renamed info to MethodSource
2015-07-03 20:13:03 +03:00
Torsten Ruger
e959c5b0f5
fixed wrong exit code
...
no wonder it was set faulting, duh
2015-07-02 13:50:13 +03:00
Torsten Ruger
3195d800e9
fix putstring file descriptor
2015-07-02 09:49:52 +03:00
Torsten Ruger
1b791dc0d0
putstring was missing the steam id
2015-07-01 21:42:59 +03:00
Torsten Ruger
047c77e186
fixed that darn method address bug
2015-07-01 09:47:10 +03:00
Torsten Ruger
9541712af8
fixing all the indexes
...
with the type word and layout
but the list starting at 1, indexes still need 1 added
and for arm x 4.
Tried to get all that into one function, resolve_index
2015-06-30 18:38:56 +03:00
Torsten Ruger
88f45cbf15
weird 4 to add for call works
2015-06-30 18:36:57 +03:00
Torsten Ruger
553f30c874
more ripples from removing index constants
2015-06-29 20:58:06 +03:00
Torsten Ruger
31635d9747
fixing index issues
2015-06-28 22:01:13 +03:00
Torsten Ruger
99b59d920c
constant fixes
2015-06-28 10:52:02 +03:00
Torsten Ruger
a00a49ecdb
fix frame indexes
2015-06-28 10:50:47 +03:00
Torsten Ruger
ef42abe611
unifying register comstants
...
were in several files with different names
many files touched, but just renames
2015-06-27 21:16:46 +03:00
Torsten Ruger
97b4c469f8
fixing register order in some instructions
...
and their use
Arm is confusing as it has result as first arg
we use forward logic, i.e. from -> to
2015-06-27 20:09:21 +03:00
Torsten Ruger
294ea8de4f
fix the move, correct for funny pipeline
2015-06-27 20:07:42 +03:00
Torsten Ruger
d0d857bbe0
fix object loading
...
by (ahem) copying the code from MoveInst.
2015-06-26 20:36:00 +03:00
Torsten Ruger
55b7ca83e1
fixing load constant
...
which needs to add to pc to get an object reference
2015-06-26 20:01:52 +03:00
Torsten Ruger
108cc8af45
minor cleanup
2015-06-26 20:00:50 +03:00