aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linearize.h
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-02-26 00:04:27 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-02-28 22:41:40 +0100
commit04c02822a0750e3eb8ef2487e2407b3aa0b66245 (patch)
tree41df68494a291077409eb45763e33b8cd4bca39b /linearize.h
parentfc5213b3f0040d21d0579b20cea9c4212e7cb504 (diff)
downloadsparse-04c02822a0750e3eb8ef2487e2407b3aa0b66245.tar.gz
slice: OP_SLICE needs the source's type: make it a kind of unop
OP_SLICE's source's type is needed for some simplifications. For example, in some cases it can be simplified into OP_TRUNC. So, merge its representation with the one for unops which also need the source's type. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'linearize.h')
-rw-r--r--linearize.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/linearize.h b/linearize.h
index 4d83675c..429f4797 100644
--- a/linearize.h
+++ b/linearize.h
@@ -113,6 +113,7 @@ struct instruction {
};
struct /* unops */ {
pseudo_t src;
+ unsigned from; /* slice */
struct symbol *orig_type; /* casts */
};
struct /* memops */ {
@@ -127,10 +128,6 @@ struct instruction {
pseudo_t _src1, _src2; // alias .src[12]
struct symbol *itype; // input operands' type
};
- struct /* slice */ {
- pseudo_t base;
- unsigned from;
- };
struct /* setval */ {
struct expression *val;
};