diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-09 19:03:27 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-09 19:03:27 (GMT) |
| commit | 369ba2ecedc77649eddc63a011025c02dd85706a (patch) | |
| tree | ce4b5db08f07c26f6fcfb469cf32f7d2f266a024 /src/virtualmachine/VirtualMachine.cpp | |
| parent | b44ac1bb7dbe59170251dc6d38421c45e00bea9f (diff) | |
| download | powder-369ba2ecedc77649eddc63a011025c02dd85706a.zip powder-369ba2ecedc77649eddc63a011025c02dd85706a.tar.gz | |
More VM syscalls
Diffstat (limited to 'src/virtualmachine/VirtualMachine.cpp')
| -rw-r--r-- | src/virtualmachine/VirtualMachine.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/virtualmachine/VirtualMachine.cpp b/src/virtualmachine/VirtualMachine.cpp index ff966ac..dfff84e 100644 --- a/src/virtualmachine/VirtualMachine.cpp +++ b/src/virtualmachine/VirtualMachine.cpp @@ -22,7 +22,9 @@ namespace vm RP(0), /* Return stack pointer. */ PC(0), cm(0), - cycles(0) + cycles(0), + sim(NULL), + ren(NULL) { hunk = new char[hunkSize]; std::fill(hunk, hunk+hunkSize, 0); @@ -268,21 +270,15 @@ namespace vm int VirtualMachine::syscall(int trap) { - int retval; - word w; + PC = Pop<int4_t>(); - retval = 0; switch (trap) { - #define TRAPDEF(n, f) case n: retval = trap##f(); break; + #define TRAPDEF(n, f) case n: trap##f(); break; #include "Syscalls.inl" #undef TRAPDEF } - w = Pop(); - PC = w.int4; - w.int4 = retval; - Push(w); return 1; } }
\ No newline at end of file |
