| Age | Commit message (Collapse) | Author |
|
|
|
|
|
This is now possible because we handle coercions better.
|
|
|
|
|
|
Update power.sail to new, pretty-printer-based version
|
|
Reduce the number of implicit coercions we're doing, expanding overloading and fixing up types of functions.
Warning: test_power does not run as not all overloaded funcitons are implemented
Warning: vector concatenation does not pretty print to sail source yet
|
|
Now, constraint resolution works for test/power.sail
|
|
- Move FDE loop to the OCaml side of the Power model (avoid leaking
memory due to lack of TCO in interpreter)
- Display cycle count
- Check the value of CIA at the end of each cycle and stop if it is
equal to the initial value of LR, returning the value in GPR3.
|
|
Warning: we set the link register to the address of the first instruction,
which means the program is effectively an infinite loop returning 42
forever.
(Except it slows down and leaks memory, probably because the interpreter
doesn't optimise the tail call in fde_loop.)
42, 42, 42, 42, 42, 42, 42, 42, ...
|
|
|
|
|
|
|
|
|
|
Second instruction now executes (but probably not correctly,
check arithmetic since we ignore exts).
Next step is to implement bitwise_or.
|
|
Two bugs are worked-around here:
- missing cast to nat when a vector is wrapped in exts
(exts is a no-op currently anyway, so we are discarding it)
- missing cast (due to limited type-inference) in one if branch:
type given explicitly.
|
|
|
|
|
|
|
|
Crashes because register initialization is missing.
|
|
Many limitations and bugs currently, but loads binary and decodes
opcodes correctly (using endianness hacks). Disabled in the default
test suite (but still compiled), run "make test_power" to try it.
|
|
|
|
There is now enough stuff to decode and execute a very basic Branch
instruction (encoding everything as little-endian rather than big-
endian among many other work-arounds).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Only chapter about branches (except system calls because of sail
typechecking issue). Decoding seems to work. Execution typechecks
currently, but is pretty surely broken otherwise.
|