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

Re: [PATCH, i386]: Add support for CPUID 4 in driver-i386.c


On Mon, Oct 13, 2008 at 7:07 AM, Andi Kleen <andi@firstfloor.org> wrote:

>> Sparse 256-slot table that deals with two (and perhaps someday three)
>> different cache descriptors, indexed by a char selector? I don't think
>> so, but the patch that further cleans this messy stuff is always welcome.
>
> Not sparse, a search table.

4.5 material, we are already changing too much for stage3.

>> >>+   case CACHE_END:
>> >>+     return;
>> >>+   case CACHE_DATA:
>> >>+   case CACHE_UNIFIED:
>> >>+     {
>> >>+       switch ((eax >> 5) & 0x07)
>> >>+         {
>> >>+         case 1:
>> >>+           cache = level1;
>> >>+           break;
>> >>+         case 2:
>> >>+           cache = level2;
>> >>+           break;
>> >>+         default:
>> >>+           cache = NULL;
>> >>
>> >
>> >That seems like a weird value for a enum

> I meant NULL is a pointer, not a integer.
>
> At least sparse tends to complain loudly about that.

Look again, as we have

+  struct cache_desc *cache;

Uros.


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