+#include "lightning-wrapper.h"
+
+#if defined(__sh__)
+# define NUM_REGS JIT_V_NUM
+# define LIGHTREC_REG_STATE _GBR
+#else
+# define NUM_REGS (JIT_V_NUM - 1)
+# define LIGHTREC_REG_STATE (JIT_V(JIT_V_NUM - 1))
+#endif
+
+#if defined(__powerpc__)
+# define NUM_TEMPS JIT_R_NUM
+/* JIT_R0 is callee-saved on PowerPC, we have to use something else */
+# define LIGHTREC_REG_CYCLE _R10
+# define FIRST_TEMP 0
+#else
+# define NUM_TEMPS (JIT_R_NUM - 1)
+# define LIGHTREC_REG_CYCLE JIT_R0
+# define FIRST_TEMP 1
+#endif
+