diff options
Diffstat (limited to 'example')
| -rw-r--r-- | example/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/example/main.c b/example/main.c index dccec66..e9ab0a9 100644 --- a/example/main.c +++ b/example/main.c @@ -20,6 +20,14 @@ int main() patch(&cs, r, 0, l); - printf("%llu\n", (unsigned long long)run(&cs)); + /* specify register state to run, note that seven is taken from + * r = 7 in rules.py, should probably provide a macro for it? */ + ubcval_t ri[7] = {0}; + + /* since we don't use floating point registers, we can pass in a NULL */ + run(&cs, ri, NULL); + + /* our 'ABI' specifies that the return register is 0 */ + printf("%llu\n", (unsigned long long)ri[0]); destroy(&cs); } |
