This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid explicit use of machine modes (6/n) objc/objc-act.c


On Mon, 29 Sep 2003, Zack Weinberg wrote:

> objc-act.c uses mode numbers to determine the encoding of type
> strings.  I looked into matching what cp/mangle.c does when faced with
> a similar problem (it uses itk_* numbers) but I did not think I could
> guarantee no ABI changes if I did that.  So I just made the codes
> depend on the mode bitsizes instead of the modes directly.

> +      switch (GET_MODE_BITSIZE (TYPE_MODE (type)))

> +	case 8:  c = TREE_UNSIGNED (type) ? 'C' : 'c'; break;
> +	case 16: c = TREE_UNSIGNED (type) ? 'S' : 's'; break;
> +	case 32:

> -         if (TYPE_MODE (type) == QImode)
> -           obstack_1grow (&util_obstack, 'C');

I think you still changed the ABI for e.g. c4x, where
BITS_PER_UNIT is 32 and thus QImode is 32 bits.  I don't imagine
that it matters for that target though, but checking the results
after dividing by BITS_PER_UNIT might have helped.

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]