> On Sep 13, 2018, at 10:39 AM, Andrew Stubbs <a...@codesourcery.com> wrote:
> 
> On 13/09/18 15:16, Paul Koning wrote:
>> If you don't have machine operations that add without messing with
>> condition codes, wouldn't it make sense to omit the definition of the
>> add-pointer patterns?  GCC will build things out of normal
>> (CC-clobbering) adds if there are no add-pointer operations, which
>> may well be more efficient in most cases than explicitly
>> saving/restoring a CC that may in fact not matter right at that
>> spot.
> 
> I thought the whole point of addptr is that it *is* needed when add
> clobbers CC? As in, LRA spills are malformed without this.
> 
> Did something change? The internals manual still says "It only needs to
> be defined if addm3 sets the condition code."

It's ambiguous, because the last sentence of that paragraph says "addm3 is used 
if addptrm3 is not defined."  

I don't know of any change in this area.  All I know is that pdp11 has adds 
that clobber CC and it doesn't define addptrm3, relying on that last sentence.  
I've tried LRA and for the most part it compiles successfully, I suppose I 
should verify the generated code based on the point you raised.  If I really 
have to define addptr, I'm in trouble because  save/restore CC is not easy on 
pdp11.

        paul

Reply via email to