[llvm-commits] CVS: reopt/lib/LightWtProfiling/RegSaveRestore.h
Brian Gaeke
gaeke at cs.uiuc.edu
Mon Jul 19 20:27:49 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
RegSaveRestore.h updated: 1.4 -> 1.5
---
Log message:
Added save/load macros for L registers, in case they ever end up being handy...
---
Diffs of the changes: (+24 -0)
Index: reopt/lib/LightWtProfiling/RegSaveRestore.h
diff -u reopt/lib/LightWtProfiling/RegSaveRestore.h:1.4 reopt/lib/LightWtProfiling/RegSaveRestore.h:1.5
--- reopt/lib/LightWtProfiling/RegSaveRestore.h:1.4 Sun May 16 00:24:19 2004
+++ reopt/lib/LightWtProfiling/RegSaveRestore.h Mon Jul 19 22:27:39 2004
@@ -39,6 +39,30 @@
asm volatile ("ldx %0, %%i5":: "m"(i_reg_save[5])); \
} while (0)
+#define SAVE_L_REGS(l_reg_save) \
+do { \
+ asm volatile ("stx %%l0, %0": "=m"(l_reg_save[0])); \
+ asm volatile ("stx %%l1, %0": "=m"(l_reg_save[1])); \
+ asm volatile ("stx %%l2, %0": "=m"(l_reg_save[2])); \
+ asm volatile ("stx %%l3, %0": "=m"(l_reg_save[3])); \
+ asm volatile ("stx %%l4, %0": "=m"(l_reg_save[4])); \
+ asm volatile ("stx %%l5, %0": "=m"(l_reg_save[5])); \
+ asm volatile ("stx %%l6, %0": "=m"(l_reg_save[6])); \
+ asm volatile ("stx %%l7, %0": "=m"(l_reg_save[7])); \
+} while (0)
+
+#define LOAD_L_REGS(l_reg_save) \
+do { \
+ asm volatile ("ldx %0, %%l0":: "m"(l_reg_save[0])); \
+ asm volatile ("ldx %0, %%l1":: "m"(l_reg_save[1])); \
+ asm volatile ("ldx %0, %%l2":: "m"(l_reg_save[2])); \
+ asm volatile ("ldx %0, %%l3":: "m"(l_reg_save[3])); \
+ asm volatile ("ldx %0, %%l4":: "m"(l_reg_save[4])); \
+ asm volatile ("ldx %0, %%l5":: "m"(l_reg_save[5])); \
+ asm volatile ("ldx %0, %%l6":: "m"(l_reg_save[6])); \
+ asm volatile ("ldx %0, %%l7":: "m"(l_reg_save[7])); \
+} while (0)
+
#define SAVE_G1_REG(g1_reg) \
asm volatile ("stx %%g1, %0": "=m"(g1_reg))
More information about the llvm-commits
mailing list