[PATCH] bfd sparc64 fixes and tail call optimizations (take 2)

Doug Evans dje@transmeta.com
Tue May 23 09:42:00 GMT 2000


Jakub Jelinek writes:
 > +	      if (((x >> 30) & 3) == 1 && ((y >> 30) & 3) == 2)
 > +		{
 > +		  if ((((y >> 19) & 0x3f) == 0x3d /* restore */
 > +		       || ((y & (0x28 << 19)) == 0 /* arithmetic */
 > +			   && ((y >> 25) & 0x1f) == 15))
 > +		      && ((y >> 14) & 0x1f) != 15
 > +		      && ((y & (1 << 13))
 > +			  || (y & 0x1f) != 15))
 > +		    {
 > [... there's more ...]

As a coding style issue, there's far too many magic numbers here (IMHO).
It'd be nice if part of every opcodes port involved a consistent set
of instruction encoders/decoders (including symbolic constants for
all useful magic numbers) for use in situations like this (for example).
Consistency is very important here - if everyone does it their own
way then it's harder to jump from port to port.

I'll bet one could even machine generate the necessary headers
from some sort of machine description. :-)


More information about the Binutils mailing list