This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SImode and PSImode question
- From: Jim Wilson <wilson at specifix dot com>
- To: Tal Agmon <Tal dot Agmon at ceva-dsp dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 11 Sep 2007 18:17:05 -0700
- Subject: Re: SImode and PSImode question
- References: <853530F948FC344697BE780237FDC39101E2F2FE@speedy.corp.local>
Tal Agmon wrote:
I see many references in gcc code to SImode. Isn't this problematic for
ports such as this when SImode does not represent the natural int?
In the gcc dir, "grep SImode *.[ch] | wc" shows only 67 lines. That
isn't a large number relatively speaking. Many of these are in
comments, and some are correct because they relate to libgcc functions.
It does look like loop-iv.c is broken though. Every
simplify_gen_relational call uses SImode. That probably should be
word_mode instead. You might want to submit a bug report for that.
I would like to define PSImode for 36-bit accumulators. Yet, when I'm
using attribute mode to define PSImode variable, gcc
Is choosing SImode which is the smallest mode for it defined through
wider_mode table. I want to define different behavior for PSImode
Variables, how can I make sure this mode is actually attached to a
variable?
I'm not sure if anyone has ever done this before. The
assembler/linker/etc have no support for odd sized variables. Usually
the partial int modes were just used internal to gcc. For instance, if
you have 24-bit address registers, you would use 32-bit pointers, and
convert on input/output to the 24-bit PSImode internally, but no user
variable would ever be PSImode.
Anyways, I assume you are talking about the code in stor-layout.c in
layout_type that calls smallest_mode_for_size. This uses
TYPE_PRECISION. Have you defined a built-in type with an appropriate
size for your PSImode variables? There is certainly no standard type
with odd sizes that will work here.