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: RFC: PATCH: Add -m8bit-idiv for x86


On Thu, Sep 16, 2010 at 4:48 PM, H.J. Lu <hjl.tools@gmail.com> wrote:

>>>>> > ?I think adding an unspec to the parallel would be less hacky than
>>>>> > reversing
>>>>> > ?the div/mod.
>>>>> >
>>>>
>>>> There are places which check DIV/UDIV.
>>>
>>> I said "adding", like
>>>
>>> ?(parallel [(set ... (div ...))
>>> ? ? ? ? ? ? (set ... (mod ...))
>>> ? ? ? ? ? ? (unspec [] DIV_ALREADY_SPLIT)])
>>
>> I agree with Paolo.
>>
>> BTW: You should write:
>>
>> ? ? ? ? ? ? (unspec [(const_int 0)] DIV_ALREADY_SPLIT)
>>
>> otherwise sky will fall down.
>>
>
> I am testing this patch and will commit it in a few hours.

> +(define_expand "testdi_ccno_1"
> +  [(set (reg:CCNO FLAGS_REG)
> +	(compare:CCNO
> +	  (and:DI (match_operand:DI 0 "nonimmediate_operand" "")
> +		  (match_operand:DI 1 "x86_64_szext_general_operand" ""))
> +	  (const_int 0)))]
> +  "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
> +  "")

Argh! I have just removed these empty preparation statements from *.md
files. Don't let them grow again.

Uros.


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