summary refs log tree commit diff
path: root/all.h
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2017-04-10 09:09:56 -0400
committerQuentin Carbonneaux <quentin@c9x.me>2017-04-10 09:19:40 -0400
commit19801b9253140443f7c04325dbf67581092b1a99 (patch)
tree223268761cd1ff362d779b8d6c5e2372a0e288a7 /all.h
parent8241685fb92b44556a870ff33bc3eca75aae8637 (diff)
downloadroux-19801b9253140443f7c04325dbf67581092b1a99.tar.gz
simplify slot logic in alias analysis
The previous code was buggy.  It would put a stack
pointer on the heap when handling "add $foo, 42".
The new code is more straightforward and hopefully
more correct.  Only temporaries with a "stack"
alias class will have a slot pointer.
Diffstat (limited to 'all.h')
-rw-r--r--all.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/all.h b/all.h
index 56c0ef9..e31e2aa 100644
--- a/all.h
+++ b/all.h
@@ -272,6 +272,7 @@ struct Alias {
 		AEsc = 3, /* stack escaping */
 		ASym = 4,
 		AUnk = 6,
+	#define astack(t) ((t) & 1)
 	} type;
 	Ref base;
 	char label[NString];