Patch for alpha -mno-fp-regs

Michael Meissner meissner@cygnus.com
Thu Mar 23 15:42:00 GMT 2000


On Wed, Mar 22, 2000 at 02:57:05PM -0800, Richard Henderson wrote:
> On Tue, Mar 21, 2000 at 01:55:17PM -0500, Michael Meissner wrote:
> > In generating the patch, I discovered that the recent TF support
> > also didn't check for whether you could use the FP registers...
> 
> Which would be correct, since the TFmode support doesn't
> use the FP registers.  Please back this out.

Ok.

> > 	(movsf/movdf recognizers): Add separate insns if -mno-fp-regs is
> > 	used to only use the gprs.
> 
> I don't understand why this is necessary.  With -mno-fp-regs
> all of the fprs are marked fixed, and so reload and friends
> shouldn't be choosing them, and so the "f" alternatives just
> don't get used.

Since * is used instead of !, reload will never pick a register.  I can rewrite
the movsf/movdf patterns to use ! instead of *, and it works for the small
example, but may or may not be desirable on a global basis.

> The only bits in this patch I agree with is the added test
> for floatunsdisf2 and floatunsdidf2. 
> 
> What is the nature of the code that's aborting?

typedef unsigned int __u32;

typedef struct rc4_key_st
{
  unsigned int  x,y;
  unsigned int  data[256];
} RC4_KEY;

struct compstat {
    __u32       unc_bytes;       
    __u32       unc_packets;     
    __u32       comp_bytes;      
    __u32       comp_packets;    
    __u32       inc_bytes;       
    __u32       inc_packets;     
    __u32       in_count;        
    __u32       bytes_out;       
    double      ratio;           
};

struct ppp_mppe_state {
    unsigned int        ccount;  
    RC4_KEY             RC4_send_key;  
    RC4_KEY             RC4_recv_key;
    unsigned char       session_send_key[16];
    unsigned char       session_recv_key[16];
    unsigned char       master_send_key[16];
    unsigned char       master_recv_key[16];
    int                 keylen;
    int                 stateless;
    int                 decomp_error;
    unsigned int        bits;
    int                 unit;
    int                 debug;
    int                 mru;
    struct compstat     stats;
};

static void
mppe_comp_stats(void *arg, struct compstat *stats)
{
    struct ppp_mppe_state *state = (struct ppp_mppe_state *)arg;
    (state->stats).in_count = (state->stats).unc_bytes;
    (state->stats).bytes_out = (state->stats).comp_bytes;
    (state->stats).ratio = (state->stats).in_count/(state->stats).bytes_out;
    *stats = state->stats;
}

-- 
Michael Meissner, Cygnus Solutions, a Red Hat company.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482


More information about the Gcc-patches mailing list