This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] i386: Remove "m" constraint for "register_operand"


From binutils:

[hjl@gnu-6 i386]$ grep extractps *.s
sse4_1.s:       extractps       $0,%xmm0,%ecx
sse4_1.s:       extractps       $0,%xmm0,(%ecx)
...

Memory is allowed as destination. It was an oversight in my SSE4 patch.
Thanks for catching it.


H.J.
hongjiu.lu@intel.com 

>-----Original Message-----
>From: Jan Hubicka [mailto:hubicka@ucw.cz] 
>Sent: Tuesday, August 14, 2007 6:08 AM
>To: Rask Ingemann Lambertsen; Lu, Hongjiu
>Cc: gcc-patches@gcc.gnu.org
>Subject: Re: [PATCH] i386: Remove "m" constraint for "register_operand"
>
>>    There is a mismatch between the constraints permitting 
>memory operands
>> and the predicate accepting only register operands. This 
>patch fixes that.
>> Bootstrapped and tested on x86_64-unknown-linux-gnu with no 
>regressions. Ok
>> for trunk?
>
>The i386.md part is OK (zext variants really needs to destinate)
>with following change:
>> -		 (match_operand:SI 2 "general_operand" "ri,rm")))))
>> +		 (match_operand:SI 2 "general_operand" "g")))))
>
>"rim" here for consistency.  I guess we should rename them all 
>to "g" in
>followup step.
>
>For sse.md part:
>>  (define_insn "*sse4_1_extractps"
>> -  [(set (match_operand:SF 0 "register_operand" "=rm")
>> +  [(set (match_operand:SF 0 "register_operand" "=r")
>
>H.J., can you please double check that memory is not allowed here?
>It seems to me that changing register_operand to nonimmediate_operand
>would be correct fix.
>This instruction is not yet in my ISA reference.
>>  	(vec_select:SF
>>  	  (match_operand:V4SF 1 "register_operand" "x")
>>  	  (parallel [(match_operand:SI 2 "const_0_to_3_operand" 
>"n")])))]
>> @@ -1694,7 +1694,7 @@
>>  (define_insn "sse2_vmsqrtv2df2"
>>    [(set (match_operand:V2DF 0 "register_operand" "=x")
>>  	(vec_merge:V2DF
>> -	  (sqrt:V2DF (match_operand:V2DF 1 "register_operand" "xm"))
>> +	  (sqrt:V2DF (match_operand:V2DF 1 "register_operand" "x"))
>nonimmediate_operand here instead of removing 'm'
>
>Honza
>>  	  (match_operand:V2DF 2 "register_operand" "0")
>>  	  (const_int 1)))]
>>    "TARGET_SSE2"
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]