[compiler/decompiler] Take the address of a variable (#554)

* support taking the address of variables

* partially working stack variables

* implement type cast stuff

* remove final
This commit is contained in:
water111
2021-06-04 13:43:19 -04:00
committed by GitHub
parent 9b905f903c
commit 542edfb164
38 changed files with 376 additions and 185 deletions
+11 -11
View File
@@ -49,10 +49,10 @@ TEST_F(FormRegressionTest, MatrixPMult) {
" )\n"
" arg0\n"
" )";
test_with_stack_vars(func, type, expected,
"[\n"
" [16, \"matrix\"]\n"
" ]");
test_with_stack_structures(func, type, expected,
"[\n"
" [16, \"matrix\"]\n"
" ]");
}
// TODO- this should also work without the cast, but be uglier.
@@ -95,11 +95,11 @@ TEST_F(FormRegressionTest, VectorXQuaternionWithCast) {
" )\n"
" arg0\n"
" )";
test_with_stack_vars(func, type, expected,
"[\n"
" [16, \"matrix\"]\n"
" ]",
"[[10, \"v1\", \"(pointer uint128)\"]]");
test_with_stack_structures(func, type, expected,
"[\n"
" [16, \"matrix\"]\n"
" ]",
"[[10, \"v1\", \"(pointer uint128)\"]]");
}
TEST_F(FormRegressionTest, EliminateFloatDeadSet) {
@@ -226,7 +226,7 @@ TEST_F(FormRegressionTest, EliminateFloatDeadSet) {
" )\n"
" )\n"
" )";
test_with_stack_vars(func, type, expected, "[]");
test_with_stack_structures(func, type, expected, "[]");
}
TEST_F(FormRegressionTest, IterateProcessTree) {
@@ -317,7 +317,7 @@ TEST_F(FormRegressionTest, IterateProcessTree) {
" )\n"
" s4-0\n"
" )";
test_with_stack_vars(func, type, expected, "[]");
test_with_stack_structures(func, type, expected, "[]");
}
TEST_F(FormRegressionTest, InspectVifStatBitfield) {