summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-06-02 19:27:13 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-23 22:48:18 -0400
commit7750bd456f32c3e91b9165587fe290122b9c2444 (patch)
tree4413a4e945b731aaea00a2e0195d9f546053c5b0 /includes
parent809caedffe489931efa8c96a60eaed6d7ff739b9 (diff)
downloadhaskell-7750bd456f32c3e91b9165587fe290122b9c2444.tar.gz
Cmm: introduce SAVE_REGS/RESTORE_REGS
We don't want to save both Fn and Dn register sets on x86-64 as they are aliased to the same arch register (XMMn). Moreover, when SAVE_STGREGS was used in conjunction with `jump foo [*]` which makes a set of Cmm registers alive so that they cover all arch registers used to pass parameter, we could have Fn, Dn and XMMn alive at the same time. It made the LLVM code generator choke (see #17920). Now `SAVE_REGS/RESTORE_REGS` and `jump foo [*]` use the same set of registers.
Diffstat (limited to 'includes')
-rw-r--r--includes/Cmm.h69
1 files changed, 0 insertions, 69 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 349d6985f8..fc80ff76aa 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -740,75 +740,6 @@
TICK_BUMP_BY(ALLOC_RTS_tot,bytes)
/* -----------------------------------------------------------------------------
- Saving and restoring STG registers
-
- STG registers must be saved around a C call, just in case the STG
- register is mapped to a caller-saves machine register. Normally we
- don't need to worry about this the code generator has already
- loaded any live STG registers into variables for us, but in
- hand-written low-level Cmm code where we don't know which registers
- are live, we might have to save them all.
- -------------------------------------------------------------------------- */
-
-#define SAVE_STGREGS \
- W_ r1, r2, r3, r4, r5, r6, r7, r8; \
- F_ f1, f2, f3, f4, f5, f6; \
- D_ d1, d2, d3, d4, d5, d6; \
- L_ l1; \
- \
- r1 = R1; \
- r2 = R2; \
- r3 = R3; \
- r4 = R4; \
- r5 = R5; \
- r6 = R6; \
- r7 = R7; \
- r8 = R8; \
- \
- f1 = F1; \
- f2 = F2; \
- f3 = F3; \
- f4 = F4; \
- f5 = F5; \
- f6 = F6; \
- \
- d1 = D1; \
- d2 = D2; \
- d3 = D3; \
- d4 = D4; \
- d5 = D5; \
- d6 = D6; \
- \
- l1 = L1;
-
-
-#define RESTORE_STGREGS \
- R1 = r1; \
- R2 = r2; \
- R3 = r3; \
- R4 = r4; \
- R5 = r5; \
- R6 = r6; \
- R7 = r7; \
- R8 = r8; \
- \
- F1 = f1; \
- F2 = f2; \
- F3 = f3; \
- F4 = f4; \
- F5 = f5; \
- F6 = f6; \
- \
- D1 = d1; \
- D2 = d2; \
- D3 = d3; \
- D4 = d4; \
- D5 = d5; \
- D6 = d6; \
- \
- L1 = l1;
-
-/* -----------------------------------------------------------------------------
Misc junk
-------------------------------------------------------------------------- */