SH: use register names instead of numbers

Alexandre Oliva aoliva@redhat.com
Wed Nov 22 18:26:00 GMT 2000


On Nov 23, 2000, Joern Rennecke <amylaar@redhat.com> wrote:

> I would rather have the UNSPEC symbols with a leading UNSPEC, and
> UNSPECV for UNSPEC_VOLATILE.

But have the REG names end with _REG?  This doesn't seem consistent.
I actually prefer them all as suffixes, but it's your call.  Let's
just please get it installed today!  I've got too many other patches
depending on it.  I don't have a strong opinion on differentiating
UNSPEC from UNSPEC_VOLATILE constants.  Since they're always used
close enough to the corresponding unspec type, I don't really see a
need for the lexical difference, but, again, it's your call.

>> +  (BREDIR_UNSPEC	4)

> I'm having a hard time to associate this with block_branch_redirect.
> It would be easier if it was called UNSPEC_BBR or UNSPEC_BL_BR_REDIR

Please pick one of these, and I'll do the change.

>> +  (CALLER_UNSPEC	10)

> I don't know what this is, and I couldn't find it anywhere in the code,
> either.

Oops.  It's part of a patch I haven't posted yet.  I may keep it out,
or book it in advance, whatever you prefer.

>> @@ -3269,8 +3374,8 @@
>> (define_insn "calli"
>> [(call (mem:SI (match_operand:SI 0 "arith_reg_operand" "r"))
>> (match_operand 1 "" ""))
>> -   (use (reg:SI 48))
>> -   (clobber (reg:SI 17))]
>> +   (use (reg:PSI FPSCR_REG))
>> +   (clobber (reg:SI PR_REG))]
>> ""
>> "jsr	@%0%#"
>> [(set_attr "type" "call")
> ...
>> @@ -3354,8 +3510,8 @@
>> [(parallel [(set (match_operand 0 "arith_reg_operand" "")
>> (call (mem:SI (match_operand 1 "arith_reg_operand" ""))
>> (match_operand 2 "" "")))
>> -	      (use (reg:SI 48))
>> -	      (clobber (reg:SI 17))])]
>> +	      (use (reg:PSI FPSCR_REG))
>> +	      (clobber (reg:SI PR_REG))])]
>> ""
>> "
>> {

> Let's keep this patch to naming and reformatting issues.

Isn't that what it does?

> Burying semantic changes in textual changes makes it hard to track
> down what is going on.

Is changing FPSCR_REG to the mode in which it's used in all other
places a semantic change?  I take it as fixing a typo.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


More information about the Gcc-patches mailing list