From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Geoffrey KEATING Cc: egcs@cygnus.com Subject: Re: asm clobbers, !SMALL_REGISTER_CLASSES patch. Date: Sun, 15 Feb 1998 11:33:00 -0000 Message-id: <1597.887561232@hurl.cygnus.com> References: <199802150511.QAA00712@discus.anu.edu.au> X-SW-Source: 1998-02/msg00708.html In message < 199802150511.QAA00712@discus.anu.edu.au >you write: > > Yes, but your patch can/will end up breaking other ports, possibly > > more so than they currently break. > > I said that in my first message. Isn't it great we now have EGCS, so > we can just find out what, if anything, breaks, rather than trying to > guess? It's not a question of "if" something breaks, but "when". Or to put it another way, your patch makes an already bad problem worse instead of better by introducing more places where we can lose. It is plain wrong to have a register which is in a class by itself mentioned explicitly in RTL *and* in a pattern via its register class. I wonder if it makes more sense to have asm clobbers specify a register class instead of explicit registers as an option. That would at least give us the option of doing the clobber both ways depending on how the target port handled the register in question. > The reason this patch is `safe' is that it doesn't do anything that > the user couldn't have done (except for the cases involving MODE_CC, > which I'm pretty sure only affect ppc). It may (I haven't seen an > example yet and am not sure that such a thing exists) cause gcc to > crash, but if you can show me an input which crashes gcc with this > patch I can show you an input which causes gcc to crash _without_ this > patch (excepting mistakes in the patch, of course). Right. I don't disagree that we can cause crashes with or without your patch. I'm saying your patch makes it easier to introduce crashes and violates a basic assumption made by the compiler. asms are dangerous and have to be written very carefully -- it's trivial to write an asm that will crash any port. What we need to do is look for a better solution for asms that need to clobber a register that is in a class by itself. jeff