Lines Matching defs:inst

170 	fp_inst_type	inst,	/* FPU instruction to simulate. */
182 nrs1 = inst.rs1;
183 nrs2 = inst.rs2;
184 nrd = inst.rd;
194 if (inst.op3 == 0x37) { /* IMPDEP2B FMA-fused opcode */
199 fma_inst = (fp_fma_inst_type *) &inst;
259 if (inst.op3 == 0x35) { /* fpop2 */
262 if ((inst.opcode & 0xf) == 0) {
263 if ((fp_notp) && (inst.prec == 0))
266 return (fmovcc(pfpsd, inst, pfsr)); /* fmovcc */
267 } else if ((inst.opcode & 0x7) == 1) {
268 if ((fp_notp) && (inst.prec == 0))
271 return (fmovr(pfpsd, inst)); /* fmovr */
275 if ((fp_notp) && (inst.ibit != 0))
277 if ((fp_notp) && (inst.prec == 0)) { /* fxto[sdq], fito[sdq] */
278 if ((inst.opcode != flltos) &&
279 (inst.opcode != flltod) &&
280 (inst.opcode != flltox) &&
281 (inst.opcode != fitos) &&
282 (inst.opcode != fitod) &&
283 (inst.opcode != fitox)) {
287 switch (inst.opcode) {
289 if (inst.prec < 2) { /* fmovs */
296 if (inst.prec > 2) { /* fmovq */
307 if (inst.prec < 2) { /* fabss */
316 if (inst.prec > 2) { /* fabsq */
327 if (inst.prec < 2) { /* fnegs */
336 if (inst.prec > 2) { /* fnegq */
348 _fp_unpack(pfpsd, &us1, nrs1, inst.prec);
349 _fp_unpack(pfpsd, &us2, nrs2, inst.prec);
351 _fp_pack(pfpsd, &ud, nrd, inst.prec);
352 FPUINFO_KSTAT_PREC(inst.prec, fpu_sim_fadds,
356 _fp_unpack(pfpsd, &us1, nrs1, inst.prec);
357 _fp_unpack(pfpsd, &us2, nrs2, inst.prec);
359 _fp_pack(pfpsd, &ud, nrd, inst.prec);
360 FPUINFO_KSTAT_PREC(inst.prec, fpu_sim_fsubs,
364 _fp_unpack(pfpsd, &us1, nrs1, inst.prec);
365 _fp_unpack(pfpsd, &us2, nrs2, inst.prec);
367 _fp_pack(pfpsd, &ud, nrd, inst.prec);
368 FPUINFO_KSTAT_PREC(inst.prec, fpu_sim_fmuls,
372 if ((fp_notp) && (inst.prec != 1))
374 _fp_unpack(pfpsd, &us1, nrs1, inst.prec);
375 _fp_unpack(pfpsd, &us2, nrs2, inst.prec);
378 (enum fp_op_type) ((int)inst.prec+1));
382 if ((fp_notp) && (inst.prec != 2))
384 _fp_unpack(pfpsd, &us1, nrs1, inst.prec);
385 _fp_unpack(pfpsd, &us2, nrs2, inst.prec);
388 (enum fp_op_type) ((int)inst.prec+1));
392 _fp_unpack(pfpsd, &us1, nrs1, inst.prec);
393 _fp_unpack(pfpsd, &us2, nrs2, inst.prec);
395 _fp_pack(pfpsd, &ud, nrd, inst.prec);
396 FPUINFO_KSTAT_PREC(inst.prec, fpu_sim_fdivs,
400 _fp_unpack(pfpsd, &us1, nrs1, inst.prec);
401 _fp_unpack(pfpsd, &us2, nrs2, inst.prec);
418 FPUINFO_KSTAT_PREC(inst.prec, fpu_sim_fcmps,
422 _fp_unpack(pfpsd, &us1, nrs1, inst.prec);
423 _fp_unpack(pfpsd, &us2, nrs2, inst.prec);
440 FPUINFO_KSTAT_PREC(inst.prec, fpu_sim_fcmpes,
444 _fp_unpack(pfpsd, &us1, nrs2, inst.prec);
446 _fp_pack(pfpsd, &ud, nrd, inst.prec);
447 FPUINFO_KSTAT_PREC(inst.prec, fpu_sim_fsqrts,
451 _fp_unpack(pfpsd, &us1, nrs2, inst.prec);
455 FPUINFO_KSTAT_PREC(inst.prec, fpu_sim_fstoi,
459 _fp_unpack(pfpsd, &us1, nrs2, inst.prec);
463 FPUINFO_KSTAT_PREC(inst.prec, fpu_sim_fstox,
482 _fp_unpack(pfpsd, &us1, nrs2, inst.prec);
487 _fp_unpack(pfpsd, &us1, nrs2, inst.prec);
492 _fp_unpack(pfpsd, &us1, nrs2, inst.prec);
541 uint32_t inst) /* The FPU instruction to simulate */
546 fp_inst_type inst;
551 fp.i = inst;
570 if ((fp.inst.hibits == 2) && (fp.inst.op3 == 0x36)) {
571 ftt = vis_fpu_simulator(pfpsd, fp.inst,
574 } else if ((fp.inst.hibits == 2) &&
575 ((fp.inst.op3 == 0x34) || (fp.inst.op3 == 0x35) ||
576 (fp.inst.op3 == 0x37))) {
577 ftt = _fp_fpu_simulator(pfpsd, fp.inst, pfsr, gsr);
584 ftt = _fp_iu_simulator(pfpsd, fp.inst, pregs,
600 uint32_t inst) /* The FPU instruction to simulate */
604 fp_inst_type inst;
607 fp.i = inst;
615 return (_fp_fpu_simulator(pfpsd, fp.inst, pfsr, gsr));
633 fp_inst_type inst;
648 pfpsd->fp_trapaddr = (caddr_t)pinst; /* bad inst addr in case we trap */
653 if ((fp.inst.hibits == 2) &&
654 ((fp.inst.op3 == 0x34) || (fp.inst.op3 == 0x35) ||
655 (fp.inst.op3 == 0x37))) {
656 ftt = _fp_fpu_simulator(pfpsd, fp.inst, (fsr_type *)&tfsr, gsr);
670 } else if ((fp.inst.hibits == 2) && (fp.inst.op3 == 0x36)) {
671 ftt = vis_fpu_simulator(pfpsd, fp.inst,
674 ftt = _fp_iu_simulator(pfpsd, fp.inst, pregs, prw, pfpu);
689 pfpsd->fp_trapaddr = (caddr_t)pinst; /* bad inst addr in case we trap */
693 if ((fp.inst.hibits == 2) && /* fpops */
694 ((fp.inst.op3 == 0x34) || (fp.inst.op3 == 0x35) ||
695 (fp.inst.op3 == 0x37))) {
696 ftt = _fp_fpu_simulator(pfpsd, fp.inst, (fsr_type *)&tfsr, gsr);
710 } else if ((fp.inst.hibits == 2) && (fp.inst.op3 == 0x36)) {
711 ftt = vis_fpu_simulator(pfpsd, fp.inst,
715 ((fp.inst.hibits == 2) && ((fp.inst.op3 & 0x3f) == 0x28) &&
716 (fp.inst.rs1 == 0x13)) ||
718 ((fp.inst.hibits == 2) && ((fp.inst.op3 & 0x3f) == 0x30) &&
719 (fp.inst.rd == 0x13)) ||
721 ((fp.inst.hibits == 2) && ((fp.inst.op3 & 0x3f) == 0x2c) &&
724 ((fp.inst.hibits == 0) && (((fp.i>>22) & 0x7) == 5)) ||
726 ((fp.inst.hibits == 3) && ((fp.inst.op3 & 0x38) == 0x20)) ||
728 ((fp.inst.hibits == 0) && (((fp.i>>22) & 0x7) == 6))) {
729 ftt = _fp_iu_simulator(pfpsd, fp.inst, pregs, prw, pfpu);