lkml.org 
[lkml]   [2015]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Design for flag bit outputs from asms
On 05/04/2015 01:45 PM, Linus Torvalds wrote:
> On Mon, May 4, 2015 at 1:33 PM, Richard Henderson <rth@redhat.com> wrote:
>>
>> A fair point. Though honestly, I was hoping that this feature would mostly be
>> used for conditions that are "weird" -- that is, not normally describable by
>> arithmetic at all. Otherwise, why are you using inline asm for it?
>
> I could easily imagine using some of the combinations for atomic operations.
>
> For example, doing a "lock decl", and wanting to see if the result is
> negative or zero. Sure, it would be possible to set *two* booleans (ZF
> and SF), but there's a contiional for "BE"..

Sure.

I'd be more inclined to support these compound conditionals directly, rather
than try to get the compiler to recognize them after the fact.

Indeed, I believe we have a near complete set of them in the x86 backend
already. It'd just be a matter of selecting the spellings for the constraints.


r~


\
 
 \ /
  Last update: 2015-05-04 23:21    [W:0.697 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site