The for loop on big endian was inverting all the bits instead of just the words
Details
Details
- Reviewers
pfg renato.riolino_eldorado.org.br alfredo - Group Reviewers
numerics - Commits
- rS359342: msun: swap words order instead of bits order on BIG ENDIAN
kyua test -k /usr/tests/lib/msun/Kyuafile nan_test
Diff Detail
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 30093 Build 27901: arc lint + arc unit
Event Timeline
Comment Actions
Hmm... if the tests pass I guess it is good, but does the comment need updating as well?
The else case in the old code was going backwards but this one doesn't.
Comment Actions
The code is rather tricky, it would be convenient to checksum the object code on Little Endian to make sure nothing changes.
lib/msun/src/s_nan.c | ||
---|---|---|
75 | Actually, this doesn't look like correct style: we need spaces around/within that -1- and you it seems like the line is too long. |
Comment Actions
LGTM
lib/msun/src/s_nan.c | ||
---|---|---|
75 | Minor knit, and strictly optional: |
lib/msun/src/s_nan.c | ||
---|---|---|
75 | And actually the parenthesis is unnecessary, as division takes precedence over subtraction. |