summary refs log tree commit diff
path: root/all.h
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2022-11-20 21:47:11 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2022-11-20 21:47:11 +0100
commit45ab1e5aa339c350e3efbbc9ad7abdfc22e73187 (patch)
treea69c872ac4570333237dc9efd282713c79169681 /all.h
parent72006061950f8080f54d642f04510178e06fc27d (diff)
downloadroux-45ab1e5aa339c350e3efbbc9ad7abdfc22e73187.tar.gz
stored bytes in Alias information
Stack slots may have padding
bytes, and if we want to have
precise liveness information
it's important that we are able
to tell them apart.

This patch extends fillalias()
to remember for every slot
what bytes were ever assigned.
In case the slot address does
not escape we know that only
these bytes matter.

To save space, we only store
this information if the slot
size is less than or equal to
NBit.

The Alias struct was reworked
a bit to save some space. I am
still not very satisfied with
its layout though.
Diffstat (limited to 'all.h')
-rw-r--r--all.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/all.h b/all.h
index 4c3c35f..43cdd62 100644
--- a/all.h
+++ b/all.h
@@ -281,9 +281,17 @@ struct Alias {
 	#define astack(t) ((t) & 1)
 	} type;
 	int base;
-	uint32_t label;
 	int64_t offset;
-	int reloc;
+	union {
+		struct {
+			uint32_t label;
+			int con;
+		} sym;
+		struct {
+			int sz; /* -1 if > NBit */
+			bits m;
+		} loc;
+	} u;
 	Alias *slot;
 };