Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx> writes: > Hi Richard, > > On Mon, Feb 03, 2020 at 11:04:39AM +0000, Richard Sandiford wrote: >> Another unfortunate assumption from the old days is: >> >> 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; >> >> (genmodes.c). Nothing much should depend on this behaviour though. > > Wow. Yeah, I don't remember ever seeing this, is size of CC ever used > at all? > >> So one option might be to: >> >> - Add a new genmodes.c macro (e.g. CC_MODE_WITH_SIZE) that creates a CC >> mode with a specific byte size. > > But Henri needs CC regs that are three bits. The hardware reg is 12 bits, > four times three bits, packed, so subregs can still not work after your > extra macro. The idea to use a byte size for the smallest thing that needs to be addressed individually, then use aggregates for everything else. It doesn't matter whether that thing has 8 significant bits or not. Richard