Re: [PATCH v2 6/6] i386: Implement asm flag outputs

2015-05-20 Thread Jeff Law

On 05/15/2015 09:37 AM, Richard Henderson wrote:

Version 2 includes proper test cases and documentation.
Hopefully the documentation even makes sense.  Suggestions
and improvements there gratefully appreciated.


r~
---
  gcc/config/i386/constraints.md |   5 ++
  gcc/config/i386/i386.c | 137 +++--
  gcc/doc/extend.texi|  76 
  gcc/testsuite/gcc.target/i386/asm-flag-0.c |  15 
  gcc/testsuite/gcc.target/i386/asm-flag-1.c |  18 
  gcc/testsuite/gcc.target/i386/asm-flag-2.c |  16 
  gcc/testsuite/gcc.target/i386/asm-flag-3.c |  22 +
  gcc/testsuite/gcc.target/i386/asm-flag-4.c |  20 +
  gcc/testsuite/gcc.target/i386/asm-flag-5.c |  19 
  9 files changed, 321 insertions(+), 7 deletions(-)
  create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-0.c
  create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-1.c
  create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-2.c
  create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-3.c
  create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-4.c
  create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-5.c
It all seems to make sense.  Obviously you'll need a ChangeLog and the 
usual testing before committing.


I won't stress much if this needs a bit of further tweaking as the 
kernel folks start to exploit the capability and we find weaknesses in 
the implementation.


What I don't see is any way to know if the target supports asm flag 
outputs.  Are we expecting the kernel folks to do some kind of test then 
enable/disable based on the result?


I'm going to assume the mapping of the constraints to the actual modes 
and codes is correct.



Jeff




Re: [PATCH v2 6/6] i386: Implement asm flag outputs

2015-05-20 Thread H. Peter Anvin
Well, these kinds of asm are inherently target specific, but I did already ask 
for a cpp symbol to indicate this faculty us available.

On May 20, 2015 9:21:07 AM PDT, Jeff Law  wrote:
>On 05/15/2015 09:37 AM, Richard Henderson wrote:
>> Version 2 includes proper test cases and documentation.
>> Hopefully the documentation even makes sense.  Suggestions
>> and improvements there gratefully appreciated.
>>
>>
>> r~
>> ---
>>   gcc/config/i386/constraints.md |   5 ++
>>   gcc/config/i386/i386.c | 137
>+++--
>>   gcc/doc/extend.texi|  76 
>>   gcc/testsuite/gcc.target/i386/asm-flag-0.c |  15 
>>   gcc/testsuite/gcc.target/i386/asm-flag-1.c |  18 
>>   gcc/testsuite/gcc.target/i386/asm-flag-2.c |  16 
>>   gcc/testsuite/gcc.target/i386/asm-flag-3.c |  22 +
>>   gcc/testsuite/gcc.target/i386/asm-flag-4.c |  20 +
>>   gcc/testsuite/gcc.target/i386/asm-flag-5.c |  19 
>>   9 files changed, 321 insertions(+), 7 deletions(-)
>>   create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-0.c
>>   create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-1.c
>>   create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-2.c
>>   create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-3.c
>>   create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-4.c
>>   create mode 100644 gcc/testsuite/gcc.target/i386/asm-flag-5.c
>It all seems to make sense.  Obviously you'll need a ChangeLog and the 
>usual testing before committing.
>
>I won't stress much if this needs a bit of further tweaking as the 
>kernel folks start to exploit the capability and we find weaknesses in 
>the implementation.
>
>What I don't see is any way to know if the target supports asm flag 
>outputs.  Are we expecting the kernel folks to do some kind of test
>then 
>enable/disable based on the result?
>
>I'm going to assume the mapping of the constraints to the actual modes 
>and codes is correct.
>
>
>Jeff

-- 
Sent from my mobile phone.  Please pardon brevity and lack of formatting.


Re: [PATCH v2 6/6] i386: Implement asm flag outputs

2015-05-20 Thread Richard Henderson
On 05/20/2015 09:21 AM, Jeff Law wrote:
> What I don't see is any way to know if the target supports asm flag outputs. 
> Are we expecting the kernel folks to do some kind of test then enable/disable
> based on the result?

I'd forgotten that we'd talked about a cpp symbol.
I'll add that.


r~