Re: [PATCH v3 2/2] x86_64: Don't save flags on context switch

From: Andy Lutomirski
Date: Wed Oct 01 2014 - 14:45:18 EST


On Wed, Oct 1, 2014 at 11:35 AM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 10/01/2014 11:28 AM, Andy Lutomirski wrote:
>>
>> #define __EXTRA_CLOBBER \
>> , "rcx", "rbx", "rdx", "r8", "r9", "r10", "r11", \
>> - "r12", "r13", "r14", "r15"
>> + "r12", "r13", "r14", "r15", "flags"
>>
>
> I was under the impression that gcc *always* assumes the flags were
> clobbered for an asm statement. Otherwise I think we'd have a lot of
> problems.
>

I have no idea, but I doubt that adding the explicit "flags" clobber
hurts, and it will make other people who are unsure about this less
worried.

--Andy

> -hpa
>
>



--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/