diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-06-05 14:09:17 +0200 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-06-05 14:09:17 +0200 |
commit | d02e5d542527163231defd7b8d969d1265ca155a (patch) | |
tree | 7cb6b8d48d85e723335be9737a7a8a70320afaab /operations.h | |
parent | f42715a4ced0c445d3a8636617cc5d40fb1e443a (diff) | |
download | seitan-d02e5d542527163231defd7b8d969d1265ca155a.tar seitan-d02e5d542527163231defd7b8d969d1265ca155a.tar.gz seitan-d02e5d542527163231defd7b8d969d1265ca155a.tar.bz2 seitan-d02e5d542527163231defd7b8d969d1265ca155a.tar.lz seitan-d02e5d542527163231defd7b8d969d1265ca155a.tar.xz seitan-d02e5d542527163231defd7b8d969d1265ca155a.tar.zst seitan-d02e5d542527163231defd7b8d969d1265ca155a.zip |
seitan: operations
Added:
- fix offset for jumping to the next block (use absolute jump and not
relative.
- fix op_cmp, jump if the comparison is true.
- added a couple of debug print
Diffstat (limited to 'operations.h')
-rw-r--r-- | operations.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/operations.h b/operations.h index e9204d3..f543d7a 100644 --- a/operations.h +++ b/operations.h @@ -14,16 +14,17 @@ #include "common/util.h" #define STACK_SIZE (1024 * 1024 / 8) -#define HANDLE_OP(code, call, type) \ +#define HANDLE_OP(code, call, type, g) \ case code: \ do { \ + struct op *start = (struct op *)g->inst; \ int res = call(req, notifier, g, &op->op.type); \ if (res == 0) \ (op)++; \ else if (res == -1) \ return -1; \ else \ - (op) += res; \ + (op) = start + res; \ } while (0); \ break |