aboutsummaryrefslogtreecommitdiff
path: root/notes/backend.txt
diff options
context:
space:
mode:
Diffstat (limited to 'notes/backend.txt')
-rw-r--r--notes/backend.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/notes/backend.txt b/notes/backend.txt
new file mode 100644
index 0000000..c93c20e
--- /dev/null
+++ b/notes/backend.txt
@@ -0,0 +1,26 @@
+* safe&portable IR vs low-level IR
+ - lots of common stuff across ISAs.
+ - calling conventions (e.g. struct passing) can be complex and
+ it would be good to be able to re-use things that are common.
+ - some optimizations might be easier to do on the low-level IR
+ (and vice versa).
+* register alloc can be tricky:
+ - division on x86 is AFAIK limited to specific regs (eax,edx?)
+ - loop instructions on x86
+ - apparently r0 is unavailable in some insns on sh4?
+ - on x86_64, some regs require prefix bytes
+ - types:
+ - byte/short/int that can use parts of a reg on x86
+ - int/long distinction on aarch64
+ - floating point regs
+ - multi-reg types, typically on 32 bit arches:
+ - 64 bit int on i386
+ - 64 bit double on MIPS?
+ - "special-purpose general-purpose" regs
+ - as above, reg for division, looping, etc.
+ - CHERI and pointers
+* floating point
+ - differences across architectures?
+ - calling conventions
+ - alignment, corner cases, etc.
+ - also, see reg alloc