aboutgitcodelistschat:MatrixIRC
path: root/gluten.h
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-02-27 13:19:01 +0100
committerAlice Frosi <afrosi@redhat.com>2023-02-27 14:10:08 +0100
commit52e2835061429d93abacf8d1cf00f7da69e7a853 (patch)
treec90078b2627b8543ca188c45db17591883b01a4b /gluten.h
parent33750f1e9cf151d64e77f73a0f632b6de586a30e (diff)
downloadseitan-52e2835061429d93abacf8d1cf00f7da69e7a853.tar
seitan-52e2835061429d93abacf8d1cf00f7da69e7a853.tar.gz
seitan-52e2835061429d93abacf8d1cf00f7da69e7a853.tar.bz2
seitan-52e2835061429d93abacf8d1cf00f7da69e7a853.tar.lz
seitan-52e2835061429d93abacf8d1cf00f7da69e7a853.tar.xz
seitan-52e2835061429d93abacf8d1cf00f7da69e7a853.tar.zst
seitan-52e2835061429d93abacf8d1cf00f7da69e7a853.zip
seitan: add op_cmp
The operation op_cmp allows to compare 2 areas of memory and if they don't match to jump to an operation.
Diffstat (limited to 'gluten.h')
-rw-r--r--gluten.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gluten.h b/gluten.h
index 69a6b6b..570d82a 100644
--- a/gluten.h
+++ b/gluten.h
@@ -52,6 +52,7 @@ enum op_type {
OP_RETURN,
OP_COPY_ARGS,
OP_END,
+ OP_CMP,
};
enum value_type {
@@ -106,6 +107,13 @@ struct op_copy_args {
struct copy_arg args[6];
};
+struct op_cmp {
+ uint16_t s1_off;
+ uint16_t s2_off;
+ size_t size;
+ unsigned int jmp;
+};
+
struct op {
enum op_type type;
union {
@@ -115,6 +123,7 @@ struct op {
struct op_return ret;
struct op_inject inj;
struct op_copy_args copy;
+ struct op_cmp cmp;
};
};
#endif /* GLUTEN_H */