mdb: fix fpcw2str()
mdb - modular debugger
The fpcw2str() implementation (both in usr/src/cmd/mdb/intel/mdb/proc_amd64dep.c and in usr/src/cmd/mdb/intel/mdb/proc_ia32dep.c) have multiple problems:
- FPPC, FPRC and FPIC macro constants should be used as bitfield masks, meaningless to print those out because the masked bits aren't simple yes-no values
- To decode precision, rounding and infinity options, cw should be masked with the corresponding bit-mask first, then use equality check instead of bitwise &.
This bug found during the review of #10132: smatch fixes for MDB.
Updated by Electric Monk 7 months ago
- % Done changed from 40 to 100
- Status changed from In Progress to Closed
commit 31779036e45a28bb1be446d3d65113584ccb7989 Author: Doma Gergő Mihály <email@example.com> Date: 2019-05-21T12:36:53.000Z 10335 mdb: fix fpcw2str() Reviewed by: John Levon <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Approved by: Gordon Ross <email@example.com>