This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/50434] New: genmodes.c hardcodes size of CCmode
- From: "Paulo.Matos at csr dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Sep 2011 14:00:48 +0000
- Subject: [Bug other/50434] New: genmodes.c hardcodes size of CCmode
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50434
Bug #: 50434
Summary: genmodes.c hardcodes size of CCmode
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Paulo.Matos@csr.com
The size of CCmode is harcoded in genmodes.c as 4 bytes:
case MODE_CC:
/* Again, nothing more need be said. For historical reasons,
the size of a CC mode is four units. */
validate_mode (m, UNSET, UNSET, UNSET, UNSET, UNSET);
m->bytesize = 4;
m->ncomponents = 1;
m->component = 0;
break;
However, this seems to work when the size of a byte is 8 bits, however, if this
changes then things start to break. I have a backend where a byte is 16 bits
(size of a word and unit and also size of int) and m->bytesize = 1; is the
correct value.
Paul Koning suggested making it equal to word size.
Thread is :
http://www.mail-archive.com/gcc@gcc.gnu.org/msg59864.html