Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-08-26 Thread Andrew Stubbs
On 16/06/11 10:13, Stubbs, Andrew wrote: On 02/06/11 11:36, Ramana Radhakrishnan wrote: OK. I've not yet committed this patch because my final testing revealed an unexpected bootstrap failure. I'm still investigating. I'll commit or post a replacement soon ... ish. Ok, it wasn't very soon,

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-16 Thread Stubbs, Andrew
On 02/06/11 11:36, Ramana Radhakrishnan wrote: > On 2 June 2011 10:03, Andrew Stubbs wrote: >> On 02/06/11 09:23, Ramana Radhakrishnan wrote: >>> >>> Please remove the alternatives in the subsi3 pattern since that is just >>> unnecessary. Please make the constraints internal only. >> >> Is this be

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-15 Thread Richard Earnshaw
On 06/06/11 15:31, Andrew Stubbs wrote: > On 06/06/11 15:26, Dmitry Plotnikov wrote: >> On 06/06/2011 05:33 PM, Andrew Stubbs wrote: >>> On 06/06/11 14:26, Dmitry Plotnikov wrote: if (const_ok_for_arm (INTVAL (x)) - || const_ok_for_arm (~INTVAL (x))) + || const_ok_for_arm (~INTVAL (x

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-06 Thread Andrew Stubbs
On 06/06/11 15:26, Dmitry Plotnikov wrote: On 06/06/2011 05:33 PM, Andrew Stubbs wrote: On 06/06/11 14:26, Dmitry Plotnikov wrote: if (const_ok_for_arm (INTVAL (x)) - || const_ok_for_arm (~INTVAL (x))) + || const_ok_for_arm (~INTVAL (x)) + || (TARGET_THUMB2&& outer == PLUS + && (const_ok_for_op

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-06 Thread Dmitry Plotnikov
On 06/06/2011 05:33 PM, Andrew Stubbs wrote: On 06/06/11 14:26, Dmitry Plotnikov wrote: if (const_ok_for_arm (INTVAL (x)) - || const_ok_for_arm (~INTVAL (x))) + || const_ok_for_arm (~INTVAL (x)) + || (TARGET_THUMB2&& outer == PLUS + && (const_ok_for_op (INTVAL (x), outer

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-06 Thread Andrew Stubbs
On 06/06/11 14:26, Dmitry Plotnikov wrote: if (const_ok_for_arm (INTVAL (x)) - || const_ok_for_arm (~INTVAL (x))) + || const_ok_for_arm (~INTVAL (x)) + || (TARGET_THUMB2&& outer == PLUS + && (const_ok_for_op (INTVAL (x), outer Sorry, I should have not

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-06 Thread Dmitry Plotnikov
On 06/06/2011 04:41 PM, Andrew Stubbs wrote: On 06/06/11 13:15, Dmitry Plotnikov wrote: + && (const_ok_for_op (INTVAL (x), outer) + || const_ok_for_op (~INTVAL (x), outer The second call is redundant. const_ok_for_op should already do that. Fixed patch is attached. Ok? 201

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-06 Thread Andrew Stubbs
On 06/06/11 13:15, Dmitry Plotnikov wrote: + && (const_ok_for_op (INTVAL (x), outer) + || const_ok_for_op (~INTVAL (x), outer The second call is redundant. const_ok_for_op should already do that. Andrew

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-06 Thread Dmitry Plotnikov
This is follow-up patch that fixes rtx costs for CONST_INT in PLUS pattern. Original discussion is here: http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01427.html 2011-06-06 Dmitry PLotnikov gcc/ * config/arm/arm.c (arm_rtx_costs_1): Fixed costs for CONST_INT in PLUS pattern. diff --git a/

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-02 Thread Ramana Radhakrishnan
On 2 June 2011 10:03, Andrew Stubbs wrote: > On 02/06/11 09:23, Ramana Radhakrishnan wrote: >> >> Please remove the alternatives in the subsi3 pattern since that is just >> unnecessary. Please make the constraints internal only. > > Is this better? > OK. Ramana > Andrew >

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-02 Thread Andrew Stubbs
On 02/06/11 09:23, Ramana Radhakrishnan wrote: Please remove the alternatives in the subsi3 pattern since that is just unnecessary. Please make the constraints internal only. Is this better? Andrew 2011-06-02 Andrew Stubbs gcc/ * config/arm/arm-protos.h (const_ok_for_op): Add prototype.

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-02 Thread Ramana Radhakrishnan
> OK? > This is largely OK modulo the following. Please remove the alternatives in the subsi3 pattern since that is just unnecessary. Please make the constraints internal only. cheers Ramana > Andrew

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-06-02 Thread Andrew Stubbs
Ping 2. On 20/04/11 16:27, Andrew Stubbs wrote: This patch adds basic support for the Thumb ADDW and SUBW instructions. The patch permits the compiler to use the new instructions for constants that can be loaded with a single instruction (i.e. 16-bit unshifted), but does not support use of addw

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-05-18 Thread Andrew Stubbs
Ping. On 20/04/11 16:27, Andrew Stubbs wrote: This patch adds basic support for the Thumb ADDW and SUBW instructions. The patch permits the compiler to use the new instructions for constants that can be loaded with a single instruction (i.e. 16-bit unshifted), but does not support use of addw w

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-04-20 Thread Andrew Stubbs
On 20/04/11 16:27, Andrew Stubbs wrote: (*arm_subsi3_insn): Add subw support. Oh, I should probably say that I've added subw support to arm_subsi3 even though it's not obvious that anything will ever use this. The existing implementation of arm_subsi3 (sans 'w') supports immediates,

[PATCH][ARM] Add support for ADDW and SUBW instructions

2011-04-20 Thread Andrew Stubbs
This patch adds basic support for the Thumb ADDW and SUBW instructions. The patch permits the compiler to use the new instructions for constants that can be loaded with a single instruction (i.e. 16-bit unshifted), but does not support use of addw with split-constants; I have a patch for that