From 5a5fcdcc74c80d1e1baefcc819302ef1a2938705 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 25 Aug 2009 16:47:16 -0700 Subject: [PATCH] --- yaml --- r: 158653 b: refs/heads/master c: ab94fcf528d127fcb490175512a8910f37e5b346 h: refs/heads/master i: 158651: 25549e1f39521be42f25e13722164ab798067553 v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/irqflags.h | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index d745de66d4ae..7c45c6f11c80 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e8a2eb47e6ca03d4a4f98f0beef73720c5dddc0c +refs/heads/master: ab94fcf528d127fcb490175512a8910f37e5b346 diff --git a/trunk/arch/x86/include/asm/irqflags.h b/trunk/arch/x86/include/asm/irqflags.h index c6ccbe7e81ad..9e2b952f810a 100644 --- a/trunk/arch/x86/include/asm/irqflags.h +++ b/trunk/arch/x86/include/asm/irqflags.h @@ -13,14 +13,13 @@ static inline unsigned long native_save_fl(void) unsigned long flags; /* - * Note: this needs to be "=r" not "=rm", because we have the - * stack offset from what gcc expects at the time the "pop" is - * executed, and so a memory reference with respect to the stack - * would end up using the wrong address. + * "=rm" is safe here, because "pop" adjusts the stack before + * it evaluates its effective address -- this is part of the + * documented behavior of the "pop" instruction. */ asm volatile("# __raw_save_flags\n\t" "pushf ; pop %0" - : "=r" (flags) + : "=rm" (flags) : /* no input */ : "memory");