-#define UREG(ER, R, RH, RL) union { u32 ER; struct { u16 R; u16 R ## _hi; }; struct { u8 RL; u8 RH; u8 R ## _hilo; u8 R ## _hihi; }; }
-
-// Layout of registers passed in to irq handlers. Note that this
-// layout corresponds to code in romlayout.S - don't change it here
-// without also updating the assembler code.
-struct bregs {
- u16 ds;
- u16 es;
- UREG(edi, di, di_hi, di_lo);
- UREG(esi, si, si_hi, si_lo);
- UREG(ebx, bx, bh, bl);
- UREG(edx, dx, dh, dl);
- UREG(ecx, cx, ch, cl);
- UREG(eax, ax, ah, al);
- u16 ip;
- u16 cs;
- u16 flags;
-} PACKED;
-
-// bregs flags bitdefs
-#define F_ZF (1<<6)
-#define F_CF (1<<0)
-
-static inline void
-set_cf(struct bregs *regs, int cond)
-{
- if (cond)
- regs->flags |= F_CF;
- else
- regs->flags &= ~F_CF;
-}
+#define GET_GLOBAL(var) \
+ GET_VAR(CS, (var))
+#if MODE16
+extern void __force_link_error__set_global_only_in_32bit();
+#define SET_GLOBAL(var, val) \
+ __force_link_error__set_global_only_in_32bit()
+#else
+#define SET_GLOBAL(var, val) \
+ do { (var) = (val); } while (0)
+#endif