On 28/06/12 10:03, Carrot Wei wrote: > Hi Ramana > > Thanks for the review, please see my inlined comments. > > On Thu, Jun 28, 2012 at 12:02 AM, Ramana Radhakrishnan > <ramana.radhakrish...@linaro.org> wrote: >> >> On 8 June 2012 10:12, Carrot Wei <car...@google.com> wrote: >>> Hi >>> >>> In rtl expression, substract a constant c is expressed as add a value -c, >>> so it >>> is alse processed by adddi3, and I extend it more to handle a subtraction of >>> 64bit constant. I created an insn pattern arm_subdi3_immediate to >>> specifically >>> represent substraction with 64bit constant while continue keeping the add >>> rtl >>> expression. >>> >> >> Sorry about the time it has taken to review this patch -Thanks for >> tackling this but I'm not convinced that this patch is correct and >> definitely can be more efficient. >> >> The range of valid 64 bit constants allowed would be in my opinion are >> the following- obtained by dividing the 64 bit constant into 2 32 bit >> halves (upper32 and lower32 referred to as upper and lower below) >> >> arm_not_operand (upper) && arm_add_operand (lower) which boils down >> to the valid combination of >> >> adds lo : adc hi - both positive constants. >> adds lo ; sbc hi - lower positive, upper negative > I assume you mean "sbc -hi" or "sbc abs(hi)", similar for following > instructions >
No, it's sbc ~hi -- bitwise inversion It all falls out from the specification, where adc == X + Y + C and sbc == X + ~Y + C. Hence the need to use arm_not_operand. R.