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 about 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 40 to 100
commit 31779036e45a28bb1be446d3d65113584ccb7989 Author: Doma Gergő Mihály <firstname.lastname@example.org> Date: 2019-05-21T12:36:53.000Z 10335 mdb: fix fpcw2str() Reviewed by: John Levon <email@example.com> Reviewed by: Andy Fiddaman <firstname.lastname@example.org> Reviewed by: Toomas Soome <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>