public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [0/11] GET_MODE_PRECISION vs GET_MODE_BITSIZE
@ 2011-07-01 17:26 Bernd Schmidt
  2011-07-01 17:27 ` [1/11] Use targetm.shift_truncation_mask more consistently Bernd Schmidt
                   ` (10 more replies)
  0 siblings, 11 replies; 30+ messages in thread
From: Bernd Schmidt @ 2011-07-01 17:26 UTC (permalink / raw)
  To: GCC Patches

I'm working on a patch to support __int40_t for the C6X target. This
will involve a new integer mode with bitsize 64, and precision 40. A lot
of the existing code doesn't make a distinction between the two values,
since at the moment they are identical for all integer modes (except
BImode).

This patch set tries to address that problem. Roughly speaking, these
are the categories where we should use GET_MODE_SIZE/GET_MODE_BITSIZE:
 * computing subreg words
 * accessing memory
For the following, we should use GET_MODE_PRECISION:
 * shift counts
 * sign bit positions, sign/zero-extending and all other arithmetic
 * testing for paradoxical subregs (or generally, whether we're
   extending or truncating)
 * testing TRULY_NOOP_TRUNCATION
 * testing whether a value can be represented in HOST_WIDE_INT

Undoubtedly there are spots I've missed, but it doesn't all have to be
fixed in one go. Existing targets should be unaffected by any of these
changes, it only becomes important once a new fractional integer mode is
added.

Testing was done with all 11 patches applied, not for each of them
individually. Bootstrapped and regression tested on i686-linux, all
languages except Go. Regression tested on cris-elf. An earlier version,
including support for int40_t, was tested in a 4.5 c6x-elf tree. I've
built at least cc1 for the following compilers, and verified that
generated code is identical on a large set of input files.

i686-linux
i686-linux x cris-elf
i686-linux x ia64-hppa-hpux
x86_64-linux x mips64-linux
x86_64-linux x m68k-elf

All of these tests, except the ia64-linux cross, were with a slightly
earlier version that did not have the BImode special case in patch 11;
the need for that was shown only with ia64 testing.


Bernd

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2011-07-11 10:10 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01 17:26 [0/11] GET_MODE_PRECISION vs GET_MODE_BITSIZE Bernd Schmidt
2011-07-01 17:27 ` [1/11] Use targetm.shift_truncation_mask more consistently Bernd Schmidt
2011-07-04 15:29   ` Richard Henderson
2011-07-06 18:13   ` Richard Sandiford
2011-07-07  0:03     ` Bernd Schmidt
2011-07-07  8:07       ` Richard Sandiford
2011-07-01 17:30 ` [3/11] Remove some dead code Bernd Schmidt
2011-07-05 19:12   ` Richard Henderson
2011-07-01 17:30 ` [2/11] Neater tests for signbits Bernd Schmidt
2011-07-05 19:10   ` Richard Henderson
2011-07-05 21:35     ` Bernd Schmidt
2011-07-01 17:32 ` [4/11] Use precisions for TRULY_NOOP_TRUNCATION Bernd Schmidt
2011-07-05 19:16   ` Richard Henderson
2011-07-01 17:33 ` [5/11] Neater tests for paradoxical subregs Bernd Schmidt
2011-07-05 19:19   ` Richard Henderson
2011-07-01 17:34 ` [6/11] Tests for HOST_WIDE_INT representability Bernd Schmidt
2011-07-05 19:19   ` Richard Henderson
2011-07-01 17:36 ` [7/11] rtl optimizer changes Bernd Schmidt
2011-07-06 18:25   ` Richard Henderson
2011-07-01 17:37 ` [8/11] Expander changes Bernd Schmidt
2011-07-06 18:26   ` Richard Henderson
2011-07-01 17:38 ` [9/11] Fix units mismatch in comparison Bernd Schmidt
2011-07-06 18:27   ` Richard Henderson
2011-07-01 17:41 ` [10/11] Expander fixes for 40-bit integers Bernd Schmidt
2011-07-06 18:37   ` Richard Henderson
2011-07-01 17:42 ` [11/11] Fix get_mode_bounds Bernd Schmidt
2011-07-06 18:38   ` Richard Henderson
2011-07-06 23:16     ` Bernd Schmidt
2011-07-06 23:39       ` Richard Henderson
2011-07-11 10:38     ` Bernd Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).