|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] xen/x86: Use real assert frames for ASSERT_INTERRUPTS_{EN, DIS}ABLED
>>> On 09.04.15 at 22:06, <andrew.cooper3@xxxxxxxxxx> 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |