aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linearize.c
diff options
authorDavid Given <dg@cowlark.com>2008-12-17 22:01:16 +0300
committerAlexey Zaytsev <alexey.zaytsev@gmail.com>2008-12-18 20:29:35 +0300
commit8f0331093ca506931f39a6cfbc3ae288a2e14b98 (patch)
tree7410f554074b4db550f60d06f0a8ef3000e64137 /linearize.c
parenteb800bdc37916dc96dfbd5b424dea3e6cde2409b (diff)
downloadsparse-dev-8f0331093ca506931f39a6cfbc3ae288a2e14b98.tar.gz
Add type information to struct instruction.
Currently there is no generic way to derive phy type information from the instruction flow. Signed-off-by: David Given <dg@cowlark.com>
Diffstat (limited to 'linearize.c')
-rw-r--r--linearize.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linearize.c b/linearize.c
index fce1ae8b..526a7101 100644
--- a/linearize.c
+++ b/linearize.c
@@ -55,7 +55,9 @@ static inline int type_size(struct symbol *type)
static struct instruction *alloc_typed_instruction(int opcode, struct symbol *type)
{
- return alloc_instruction(opcode, type_size(type));
+ struct instruction *insn = alloc_instruction(opcode, type_size(type));
+ insn->type = type;
+ return insn;
}
static struct entrypoint *alloc_entrypoint(void)