This is the mail archive of the gcc-bugs@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]

[Bug other/50434] New: genmodes.c hardcodes size of CCmode


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


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