Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: syzygy/experimental/protect/protect_lib/equation_gen.h

Issue 2535563002: Added all code for integrity check transform (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: syzygy/experimental/protect/protect_lib/equation_gen.h
diff --git a/syzygy/experimental/protect/protect_lib/equation_gen.h b/syzygy/experimental/protect/protect_lib/equation_gen.h
new file mode 100644
index 0000000000000000000000000000000000000000..5bcfaec6a7fee30032d722f5d51c92ec48549be2
--- /dev/null
+++ b/syzygy/experimental/protect/protect_lib/equation_gen.h
@@ -0,0 +1,28 @@
+#ifndef SYZYGY_PROTECT_PROTECT_LIB_EQUATION_GEN_H_
+#define SYZYGY_PROTECT_PROTECT_LIB_EQUATION_GEN_H_
+
+#include <vector>
+
+#include "syzygy/assm/assembler.h"
+#include "syzygy/assm/assembler_base.h"
+#include "syzygy/block_graph/basic_block_subgraph.h"
+#include "syzygy/block_graph/basic_block_assembler.h"
+
+class Equation {
+public:
+ // Maximum of 2 unknown variables
+ std::vector<int> x_exp;
+ std::vector<int> x_coef;
+ std::vector<int> y_exp;
+ std::vector<int> y_coef;
+
+ Equation(std::vector<int> x_exp, std::vector<int> x_coef,
+ std::vector<int> y_exp, std::vector<int> y_coef) :
+ x_exp(x_exp), x_coef(x_coef), y_exp(y_exp), y_coef(y_coef) {};
+
+ assm::ConditionCode Generate(block_graph::BasicBlockAssembler &assm,
+ std::vector<assm::Register32> &temp_regs,
+ std::vector<assm::Register32> &source_regs);
+};
+
+#endif // SYZYGY_PROTECT_PROTECT_LIB_EQUATION_CHECKER_H_
« no previous file with comments | « syzygy/experimental/protect/protect_lib/code_randomizer.cc ('k') | syzygy/experimental/protect/protect_lib/equation_gen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698