Re: abs insn with QI and HI mode

2007-07-13 Thread Ying Yi
Hi, Thanks very much for your help. I have fixed the problem of the abs insn with HI and QI mode as you advised. Best regards Maggie

Re: abs insn with QI and HI mode

2007-07-11 Thread Jim Wilson
On Tue, 2007-07-10 at 10:35 +0100, Ying Yi wrote: Thanks very much for your email. Will gcc add the optimization support in the future (method 1)? For method 2, if abs accept short/char, may I give the function names as sabs and qabs? Gcc does already have cabs as complex abs, doesn't

Re: abs insn with QI and HI mode

2007-07-11 Thread Rask Ingemann Lambertsen
On Tue, Jul 10, 2007 at 10:35:01AM +0100, Ying Yi wrote: Hi Jim, To get your special char/short abs instructions, we need one of two things 1) Optimization support to recognize a sign-extend followed by an abs, where the target has an abs instruction that operates on the pre-extended value.

Re: abs insn with QI and HI mode

2007-07-10 Thread Ying Yi
Hi Jim, Thanks very much for your email. Will gcc add the optimization support in the future (method 1)? For method 2, if abs accept short/char, may I give the function names as sabs and qabs? Gcc does already have cabs as complex abs, doesn't it? Best regards Maggie Quoting Jim Wilson

Re: abs insn with QI and HI mode

2007-07-10 Thread Richard Kenner
Will gcc add the optimization support in the future (method 1)? Since GCC is a volunteer project, the answer for any sort of question like that is if somebody writes it, it'll exist and if they don't, it won't. There's no good way to predict what projects people will find interesting.

Re: abs insn with QI and HI mode

2007-07-10 Thread Robert Dewar
Richard Kenner wrote: Will gcc add the optimization support in the future (method 1)? Since GCC is a volunteer project, the answer for any sort of question like that is if somebody writes it, it'll exist and if they don't, it won't. There's no good way to predict what projects people will

Re: abs insn with QI and HI mode

2007-07-09 Thread Jim Wilson
Ying Yi wrote: The generated codes do the following operations: 1) extend variable a_HI (HImode) to temp variable SImode, and do abs operation with SImode operators. I find the gimple intermedia represention as shown below: abs is a standard library function that takes an int as an argument.

abs insn with QI and HI mode

2007-07-07 Thread Ying Yi
Hi all, I have a problem with absm2 insn, my target machine can suppport abs operation with QImode, HImode and SImode. I give machine description in md file as below. (define_mode_macro SHQ [SI HI QI]) (define_insn absmode2 [(set (match_operand:SHQ 0 register_operand =r)