svn commit: r233043 - head/sys/i386/include

Tijl Coosemans tijl at freebsd.org
Sat Mar 17 23:53:44 UTC 2012


On Saturday 17 March 2012 12:48:17 Bruce Evans wrote:
> On Fri, 16 Mar 2012, Julian Elischer wrote:
>> On 3/16/12 12:42 PM, Tijl Coosemans wrote:
>>> int32_t		en_sw;		/* status word (16bits) */
>>
>> what's wrong with this picture?
> 
> Only the excessive indentation in the new version.

There's only one tab in the uint16_t fields and style(9) says two tabs
for the other fields is ok unless it affects at least 90% of the fields
which isn't the case here.

> The 16 in the comment is not mismatched with 32 in the code, but is
> less needed that before, since it is more obvious that the code uses
> 32 and it goes without saying that this would only be used if it is
> correct.  The comment says that although field has 32 bits in memory,
> only 16 bits of it are used in the status word register.  For fields
> in this struct that use all of the bits in memory, no comment is made
> about the number of bits in the register, and vice versa.  I forget
> if the padding bits in memory are read or written by the hardware.  On
> write, they might not be touched, or they might be filled with garbage,
> or all zeros, or all 1's, or a "reserved" not-quite garbage value.
> Probably closest the latter, with the actual bits being all 0 or all
> 1.  On read, they might be ignored or checked for garbage.  I think
> they are ignored for this file.d

AMD documentation says the upper 16 bits are "reserved,ignored" which
means their value is indeterminate, but the cpu doesn't care about
them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120317/d0584e7c/attachment.pgp


More information about the svn-src-all mailing list