[PATCH] i386: cr8 handling

Jan Beulich JBeulich@novell.com
Tue Mar 1 14:19:00 GMT 2005


>> @@ -5040,6 +5047,7 @@ parse_register (reg_string, end_op)
>>  
>>    if (r != NULL
>>        && ((r->reg_flags & (RegRex64 | RegRex)) | (r->reg_type &
Reg64)) != 0
>> +      && r->reg_type != Control
>
>I think this should be
>      && (r->reg_type != Control || (cpu_arch_flags & CpuSledgehammer)
!= 0)
>
>ie. Only enable cr8..cr15 if given ".arch sledgehammer".

I thought about that, too. But SledgeHammer isn't really the right
thing here, because only newer (future) processors are going to support
this. The granularity of these CPU-level things isn't right these days
anymore; you'd have to have a way to specify individual features...
Also, I'd think it should be
      && (r->reg_type != Control || !(cpu_arch_flags &
CpuSledgehammer))
Please let me know if you indeed want me to add this additional check.

>Otherwise the patch looks OK to apply.  Of course, you'll need to
adjust
>your testcases to supply .arch.

Why? CpuUnknownFlags contains CpuSledgehammer, so it should be enabled
by default.

Thanks, Jan



More information about the Binutils mailing list