I was thinking a bit about it and I am not sure whether using SSE registers is a win here. From my (limited) experience with Pascal programming the sets used are often very small and used for conditionals. SSE is very poor when used to test specific bits, so perhaps integer is better.
Agreed
--- gcc-3.3.orig/gcc/config/i386/i386.c Thu Apr 3 00:01:58 2003 +++ gcc-3.3/gcc/config/i386/i386.c Thu Jun 12 20:30:48 2003 @@ -1853,6 +1853,18 @@ } } }
else if (TREE_CODE (type) == SET_TYPE)
{
if (mode == DImode)
{
classes[0] = X86_64_INTEGER_CLASS;
return 1;
}
else if (mode == BLKmode)
return 0;
else
abort();
}
What happens for very small sets - will these get QImode or so?
Pascal forces sets to go in multiples of C longs (even the smallest ones) so the mode is always the same as the mode for long (or BLKmode). Pascal patches the backend (stor-layout.c) to get this. More precisely `stor-layout.c' contains the following (at line 1813):
if (rounded_size > (int) alignment) TYPE_MODE (type) = BLKmode; else TYPE_MODE (type) = mode_for_size (alignment, MODE_INT, 1);
Pascal makes alignment equal to size of long. By default alignment is BITS_PER_WORD. I do not know what other front ends are doing, but safe way is to expect any integer mode.