7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26 /*
27 * Copyright 2015 Joyent, Inc.
28 */
29
30 /*
31 * User Process Target Intel 32-bit component
32 *
33 * This file provides the ISA-dependent portion of the user process target.
34 * For more details on the implementation refer to mdb_proc.c.
35 */
36
37 #include <mdb/mdb_proc.h>
38 #include <mdb/mdb_kreg.h>
39 #include <mdb/mdb_err.h>
40 #include <mdb/mdb_ia32util.h>
41 #include <mdb/mdb.h>
42
43 #include <sys/ucontext.h>
44 #include <sys/frame.h>
45 #include <libproc.h>
46 #include <sys/fp.h>
47 #include <ieeefp.h>
233 if (cw & FPDM)
234 p += mdb_snprintf(p, (size_t)(end - p), "|DM");
235 if (cw & FPZM)
236 p += mdb_snprintf(p, (size_t)(end - p), "|ZM");
237 if (cw & FPOM)
238 p += mdb_snprintf(p, (size_t)(end - p), "|OM");
239 if (cw & FPUM)
240 p += mdb_snprintf(p, (size_t)(end - p), "|UM");
241 if (cw & FPPM)
242 p += mdb_snprintf(p, (size_t)(end - p), "|PM");
243 if (cw & FPPC)
244 p += mdb_snprintf(p, (size_t)(end - p), "|PC");
245 if (cw & FPRC)
246 p += mdb_snprintf(p, (size_t)(end - p), "|RC");
247 if (cw & FPIC)
248 p += mdb_snprintf(p, (size_t)(end - p), "|IC");
249
250 /*
251 * Decode precision, rounding, and infinity options in control word.
252 */
253 if (cw & FPSIG24)
254 p += mdb_snprintf(p, (size_t)(end - p), "|SIG24");
255 if (cw & FPSIG53)
256 p += mdb_snprintf(p, (size_t)(end - p), "|SIG53");
257 if (cw & FPSIG64)
258 p += mdb_snprintf(p, (size_t)(end - p), "|SIG64");
259
260 if ((cw & FPRC) == (FPRD|FPRU))
261 p += mdb_snprintf(p, (size_t)(end - p), "|RTZ");
262 else if (cw & FPRD)
263 p += mdb_snprintf(p, (size_t)(end - p), "|RD");
264 else if (cw & FPRU)
265 p += mdb_snprintf(p, (size_t)(end - p), "|RU");
266 else
267 p += mdb_snprintf(p, (size_t)(end - p), "|RTN");
268
269 if (cw & FPA)
270 p += mdb_snprintf(p, (size_t)(end - p), "|A");
271 else
272 p += mdb_snprintf(p, (size_t)(end - p), "|P");
273 if (cw & WFPB17)
274 p += mdb_snprintf(p, (size_t)(end - p), "|WFPB17");
|
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26 /*
27 * Copyright (c) 2018, Joyent, Inc.
28 */
29
30 /*
31 * User Process Target Intel 32-bit component
32 *
33 * This file provides the ISA-dependent portion of the user process target.
34 * For more details on the implementation refer to mdb_proc.c.
35 */
36
37 #include <mdb/mdb_proc.h>
38 #include <mdb/mdb_kreg.h>
39 #include <mdb/mdb_err.h>
40 #include <mdb/mdb_ia32util.h>
41 #include <mdb/mdb.h>
42
43 #include <sys/ucontext.h>
44 #include <sys/frame.h>
45 #include <libproc.h>
46 #include <sys/fp.h>
47 #include <ieeefp.h>
233 if (cw & FPDM)
234 p += mdb_snprintf(p, (size_t)(end - p), "|DM");
235 if (cw & FPZM)
236 p += mdb_snprintf(p, (size_t)(end - p), "|ZM");
237 if (cw & FPOM)
238 p += mdb_snprintf(p, (size_t)(end - p), "|OM");
239 if (cw & FPUM)
240 p += mdb_snprintf(p, (size_t)(end - p), "|UM");
241 if (cw & FPPM)
242 p += mdb_snprintf(p, (size_t)(end - p), "|PM");
243 if (cw & FPPC)
244 p += mdb_snprintf(p, (size_t)(end - p), "|PC");
245 if (cw & FPRC)
246 p += mdb_snprintf(p, (size_t)(end - p), "|RC");
247 if (cw & FPIC)
248 p += mdb_snprintf(p, (size_t)(end - p), "|IC");
249
250 /*
251 * Decode precision, rounding, and infinity options in control word.
252 */
253 if (cw & FPSIG53)
254 p += mdb_snprintf(p, (size_t)(end - p), "|SIG53");
255 if (cw & FPSIG64)
256 p += mdb_snprintf(p, (size_t)(end - p), "|SIG64");
257
258 if ((cw & FPRC) == (FPRD|FPRU))
259 p += mdb_snprintf(p, (size_t)(end - p), "|RTZ");
260 else if (cw & FPRD)
261 p += mdb_snprintf(p, (size_t)(end - p), "|RD");
262 else if (cw & FPRU)
263 p += mdb_snprintf(p, (size_t)(end - p), "|RU");
264 else
265 p += mdb_snprintf(p, (size_t)(end - p), "|RTN");
266
267 if (cw & FPA)
268 p += mdb_snprintf(p, (size_t)(end - p), "|A");
269 else
270 p += mdb_snprintf(p, (size_t)(end - p), "|P");
271 if (cw & WFPB17)
272 p += mdb_snprintf(p, (size_t)(end - p), "|WFPB17");
|