Re: [PATCH 1/3] sparc64: correctly recognise M7 cpu type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sam, Richard,
>>>>> @@ -414,6 +414,7 @@ sun4v_chip_type:
>>>>>       cmp    %g2, 'T'
>>>>>       be,pt    %xcc, 70f
>>>>>        cmp    %g2, 'M'
>>>>> +    be,pt    %xcc, 71f
>>>>>       bne,pn    %xcc, 49f
>>>> Looks like you are missing a nop in the delay slot?
>>>
>>>    I don't think so. I have tested the patch on M7 and I have had no issues with it.
>> Even if it works as expected then it is confusing.
>> I read the code like this:
>>
>> if xcc equals pt then jump to 71 but if pn is not equal to xcc then jump to 49
>>
>> Maybe the second opcode is ignored because it is a conditional jump or maybe
>> they are always equal.
> The two branches are the logical opposite of each other so only one is ever taken and that is why the code "works".

  I'll go ahead and add the delay slot for better readability. It'll look something like this,

	 cmp	%g2, 'T'
 	be,pt	%xcc, 70f
 	 cmp	%g2, 'M'
+	be,pt	%xcc, 71f
+ 	 nop
 	bne,pn	%xcc, 49f
 	 nop

- ALlen
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux