>>> On 09.04.15 at 22:06, <andrew.coop...@citrix.com> wrote: > @@ -26,18 +27,24 @@ > #endif > > #ifndef NDEBUG > -#define ASSERT_INTERRUPT_STATUS(x) \ > - pushf; \ > - testb $X86_EFLAGS_IF>>8,1(%rsp); \ > - j##x 1f; \ > - ud2a; \ > -1: addq $8,%rsp; > +#define ASSERT_INTERRUPTS_ENABLED \ > + pushf; \ > + testb $X86_EFLAGS_IF>>8,1(%rsp); \ > + jnz 1f; \ > + ASSERT_FAILED("INTERRUPTS ENABLED"); \ > +1: addq $8,%rsp; > + > +#define ASSERT_INTERRUPTS_DISABLED \ > + pushf; \ > + testb $X86_EFLAGS_IF>>8,1(%rsp); \ > + jz 1f; \ > + ASSERT_FAILED("INTERRUPTS DISABLED"); \ > +1: addq $8,%rsp; > #else > -#define ASSERT_INTERRUPT_STATUS(x) > +#define ASSERT_INTERRUPTS_ENABLED > +#define ASSERT_INTERRUPTS_DISABLED > #endif > > -#define ASSERT_INTERRUPTS_ENABLED ASSERT_INTERRUPT_STATUS(nz) > -#define ASSERT_INTERRUPTS_DISABLED ASSERT_INTERRUPT_STATUS(z)
So what's the point of deleting these and duplicating most of the macro definition text above? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel