decoder.isa (3274:75d7e0bc4c1b) decoder.isa (3279:cf42adf4588f)
1// Copyright (c) 2006 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

--- 427 unchanged lines hidden (view full) ---

436 0x33: HPriv::wrhpr({{
437 // XXX Need to protect with format that traps non-priv/priv
438 // access
439 fault = xc->setMiscRegWithEffect(RD + HprStart, Rs1 ^ Rs2_or_imm13);
440 }});
441 0x34: decode OPF{
442 format BasicOperate{
443 0x01: fmovs({{
1// Copyright (c) 2006 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

--- 427 unchanged lines hidden (view full) ---

436 0x33: HPriv::wrhpr({{
437 // XXX Need to protect with format that traps non-priv/priv
438 // access
439 fault = xc->setMiscRegWithEffect(RD + HprStart, Rs1 ^ Rs2_or_imm13);
440 }});
441 0x34: decode OPF{
442 format BasicOperate{
443 0x01: fmovs({{
444 Frd.uw = Frs2.uw;
444 Frds.uw = Frs2s.uw;
445 //fsr.ftt = fsr.cexc = 0
446 Fsr &= ~(7 << 14);
447 Fsr &= ~(0x1F);
448 }});
449 0x02: fmovd({{
450 Frd.udw = Frs2.udw;
451 //fsr.ftt = fsr.cexc = 0
452 Fsr &= ~(7 << 14);
453 Fsr &= ~(0x1F);
454 }});
455 0x03: Trap::fmovq({{fault = new FpDisabled;}});
456 0x05: fnegs({{
445 //fsr.ftt = fsr.cexc = 0
446 Fsr &= ~(7 << 14);
447 Fsr &= ~(0x1F);
448 }});
449 0x02: fmovd({{
450 Frd.udw = Frs2.udw;
451 //fsr.ftt = fsr.cexc = 0
452 Fsr &= ~(7 << 14);
453 Fsr &= ~(0x1F);
454 }});
455 0x03: Trap::fmovq({{fault = new FpDisabled;}});
456 0x05: fnegs({{
457 Frd.uw = Frs2.uw ^ (1UL << 31);
457 Frds.uw = Frs2s.uw ^ (1UL << 31);
458 //fsr.ftt = fsr.cexc = 0
459 Fsr &= ~(7 << 14);
460 Fsr &= ~(0x1F);
461 }});
462 0x06: fnegd({{
463 Frd.udw = Frs2.udw ^ (1ULL << 63);
464 //fsr.ftt = fsr.cexc = 0
465 Fsr &= ~(7 << 14);
466 Fsr &= ~(0x1F);
467 }});
468 0x07: Trap::fnegq({{fault = new FpDisabled;}});
469 0x09: fabss({{
458 //fsr.ftt = fsr.cexc = 0
459 Fsr &= ~(7 << 14);
460 Fsr &= ~(0x1F);
461 }});
462 0x06: fnegd({{
463 Frd.udw = Frs2.udw ^ (1ULL << 63);
464 //fsr.ftt = fsr.cexc = 0
465 Fsr &= ~(7 << 14);
466 Fsr &= ~(0x1F);
467 }});
468 0x07: Trap::fnegq({{fault = new FpDisabled;}});
469 0x09: fabss({{
470 Frd.uw = ((1UL << 31) - 1) & Frs2.uw;
470 Frds.uw = ((1UL << 31) - 1) & Frs2s.uw;
471 //fsr.ftt = fsr.cexc = 0
472 Fsr &= ~(7 << 14);
473 Fsr &= ~(0x1F);
474 }});
475 0x0A: fabsd({{
476 Frd.udw = ((1ULL << 63) - 1) & Frs2.udw;
477 //fsr.ftt = fsr.cexc = 0
478 Fsr &= ~(7 << 14);
479 Fsr &= ~(0x1F);
480 }});
481 0x0B: Trap::fabsq({{fault = new FpDisabled;}});
471 //fsr.ftt = fsr.cexc = 0
472 Fsr &= ~(7 << 14);
473 Fsr &= ~(0x1F);
474 }});
475 0x0A: fabsd({{
476 Frd.udw = ((1ULL << 63) - 1) & Frs2.udw;
477 //fsr.ftt = fsr.cexc = 0
478 Fsr &= ~(7 << 14);
479 Fsr &= ~(0x1F);
480 }});
481 0x0B: Trap::fabsq({{fault = new FpDisabled;}});
482 0x29: fsqrts({{Frd.sf = sqrt(Frs2.sf);}});
482 0x29: fsqrts({{Frds.sf = sqrt(Frs2s.sf);}});
483 0x2A: fsqrtd({{Frd.df = sqrt(Frs2.df);}});
484 0x2B: Trap::fsqrtq({{fault = new FpDisabled;}});
483 0x2A: fsqrtd({{Frd.df = sqrt(Frs2.df);}});
484 0x2B: Trap::fsqrtq({{fault = new FpDisabled;}});
485 0x41: fadds({{Frd.sf = Frs1.sf + Frs2.sf;}});
485 0x41: fadds({{Frds.sf = Frs1s.sf + Frs2s.sf;}});
486 0x42: faddd({{Frd.df = Frs1.df + Frs2.df;}});
487 0x43: Trap::faddq({{fault = new FpDisabled;}});
486 0x42: faddd({{Frd.df = Frs1.df + Frs2.df;}});
487 0x43: Trap::faddq({{fault = new FpDisabled;}});
488 0x45: fsubs({{Frd.sf = Frs1.sf - Frs2.sf;}});
488 0x45: fsubs({{Frds.sf = Frs1s.sf - Frs2s.sf;}});
489 0x46: fsubd({{Frd.df = Frs1.df - Frs2.df;}});
490 0x47: Trap::fsubq({{fault = new FpDisabled;}});
489 0x46: fsubd({{Frd.df = Frs1.df - Frs2.df;}});
490 0x47: Trap::fsubq({{fault = new FpDisabled;}});
491 0x49: fmuls({{Frd.sf = Frs1.sf * Frs2.sf;}});
491 0x49: fmuls({{Frds.sf = Frs1s.sf * Frs2s.sf;}});
492 0x4A: fmuld({{Frd.df = Frs1.df * Frs2.df;}});
493 0x4B: Trap::fmulq({{fault = new FpDisabled;}});
492 0x4A: fmuld({{Frd.df = Frs1.df * Frs2.df;}});
493 0x4B: Trap::fmulq({{fault = new FpDisabled;}});
494 0x4D: fdivs({{Frd.sf = Frs1.sf / Frs2.sf;}});
494 0x4D: fdivs({{Frds.sf = Frs1s.sf / Frs2s.sf;}});
495 0x4E: fdivd({{Frd.df = Frs1.df / Frs2.df;}});
496 0x4F: Trap::fdivq({{fault = new FpDisabled;}});
495 0x4E: fdivd({{Frd.df = Frs1.df / Frs2.df;}});
496 0x4F: Trap::fdivq({{fault = new FpDisabled;}});
497 0x69: fsmuld({{Frd.df = Frs1.sf * Frs2.sf;}});
497 0x69: fsmuld({{Frd.df = Frs1s.sf * Frs2s.sf;}});
498 0x6E: Trap::fdmulq({{fault = new FpDisabled;}});
499 0x81: fstox({{
498 0x6E: Trap::fdmulq({{fault = new FpDisabled;}});
499 0x81: fstox({{
500 Frd.df = (double)static_cast(Frs2.sf);
500 Frd.df = (double)static_cast<int64_t>(Frs2s.sf);
501 }});
502 0x82: fdtox({{
503 Frd.df = (double)static_cast<int64_t>(Frs2.df);
504 }});
505 0x83: Trap::fqtox({{fault = new FpDisabled;}});
506 0x84: fxtos({{
501 }});
502 0x82: fdtox({{
503 Frd.df = (double)static_cast<int64_t>(Frs2.df);
504 }});
505 0x83: Trap::fqtox({{fault = new FpDisabled;}});
506 0x84: fxtos({{
507 Frd.sf = static_cast((int64_t)Frs2.df);
507 Frds.sf = static_cast<float>((int64_t)Frs2.df);
508 }});
509 0x88: fxtod({{
510 Frd.df = static_cast<double>((int64_t)Frs2.df);
511 }});
512 0x8C: Trap::fxtoq({{fault = new FpDisabled;}});
513 0xC4: fitos({{
508 }});
509 0x88: fxtod({{
510 Frd.df = static_cast<double>((int64_t)Frs2.df);
511 }});
512 0x8C: Trap::fxtoq({{fault = new FpDisabled;}});
513 0xC4: fitos({{
514 Frd.sf = static_cast<float>((int32_t)Frs2.sf);
514 Frds.sf = static_cast<float>((int32_t)Frs2s.sf);
515 }});
515 }});
516 0xC6: fdtos({{Frd.sf = Frs2.df;}});
516 0xC6: fdtos({{Frds.sf = Frs2.df;}});
517 0xC7: Trap::fqtos({{fault = new FpDisabled;}});
518 0xC8: fitod({{
517 0xC7: Trap::fqtos({{fault = new FpDisabled;}});
518 0xC8: fitod({{
519 Frd.df = static_cast((int32_t)Frs2.sf);
519 Frd.df = static_cast<double>((int32_t)Frs2s.sf);
520 }});
520 }});
521 0xC9: fstod({{Frd.df = Frs2.sf;}});
521 0xC9: fstod({{Frd.df = Frs2s.sf;}});
522 0xCB: Trap::fqtod({{fault = new FpDisabled;}});
523 0xCC: Trap::fitoq({{fault = new FpDisabled;}});
524 0xCD: Trap::fstoq({{fault = new FpDisabled;}});
525 0xCE: Trap::fdtoq({{fault = new FpDisabled;}});
526 0xD1: fstoi({{
522 0xCB: Trap::fqtod({{fault = new FpDisabled;}});
523 0xCC: Trap::fitoq({{fault = new FpDisabled;}});
524 0xCD: Trap::fstoq({{fault = new FpDisabled;}});
525 0xCE: Trap::fdtoq({{fault = new FpDisabled;}});
526 0xD1: fstoi({{
527 Frd.sf = (float)static_cast<int32_t>(Frs2.sf);
527 Frds.sf = (float)static_cast<int32_t>(Frs2s.sf);
528 }});
529 0xD2: fdtoi({{
528 }});
529 0xD2: fdtoi({{
530 Frd.sf = (float)static_cast(Frs2.df);
530 Frds.sf = (float)static_cast<int32_t>(Frs2.df);
531 }});
532 0xD3: Trap::fqtoi({{fault = new FpDisabled;}});
533 default: Trap::fpop1({{fault = new FpDisabled;}});
534 }
535 }
536 0x35: Trap::fpop2({{fault = new FpDisabled;}});
537 //This used to be just impdep1, but now it's a whole bunch
538 //of instructions

--- 76 unchanged lines hidden (view full) ---

615 0x51: Trap::fpadd16s({{fault = new IllegalInstruction;}});
616 0x52: Trap::fpadd32({{fault = new IllegalInstruction;}});
617 0x53: Trap::fpadd32s({{fault = new IllegalInstruction;}});
618 0x54: Trap::fpsub16({{fault = new IllegalInstruction;}});
619 0x55: Trap::fpsub16s({{fault = new IllegalInstruction;}});
620 0x56: Trap::fpsub32({{fault = new IllegalInstruction;}});
621 0x57: Trap::fpsub32s({{fault = new IllegalInstruction;}});
622 0x60: BasicOperate::fzero({{Frd.df = 0;}});
531 }});
532 0xD3: Trap::fqtoi({{fault = new FpDisabled;}});
533 default: Trap::fpop1({{fault = new FpDisabled;}});
534 }
535 }
536 0x35: Trap::fpop2({{fault = new FpDisabled;}});
537 //This used to be just impdep1, but now it's a whole bunch
538 //of instructions

--- 76 unchanged lines hidden (view full) ---

615 0x51: Trap::fpadd16s({{fault = new IllegalInstruction;}});
616 0x52: Trap::fpadd32({{fault = new IllegalInstruction;}});
617 0x53: Trap::fpadd32s({{fault = new IllegalInstruction;}});
618 0x54: Trap::fpsub16({{fault = new IllegalInstruction;}});
619 0x55: Trap::fpsub16s({{fault = new IllegalInstruction;}});
620 0x56: Trap::fpsub32({{fault = new IllegalInstruction;}});
621 0x57: Trap::fpsub32s({{fault = new IllegalInstruction;}});
622 0x60: BasicOperate::fzero({{Frd.df = 0;}});
623 0x61: BasicOperate::fzeros({{Frd.sf = 0;}});
623 0x61: BasicOperate::fzeros({{Frds.sf = 0;}});
624 0x62: Trap::fnor({{fault = new IllegalInstruction;}});
625 0x63: Trap::fnors({{fault = new IllegalInstruction;}});
626 0x64: Trap::fandnot2({{fault = new IllegalInstruction;}});
627 0x65: Trap::fandnot2s({{fault = new IllegalInstruction;}});
628 0x66: BasicOperate::fnot2({{
629 Frd.df = (double)(~((uint64_t)Frs2.df));
630 }});
631 0x67: BasicOperate::fnot2s({{
624 0x62: Trap::fnor({{fault = new IllegalInstruction;}});
625 0x63: Trap::fnors({{fault = new IllegalInstruction;}});
626 0x64: Trap::fandnot2({{fault = new IllegalInstruction;}});
627 0x65: Trap::fandnot2s({{fault = new IllegalInstruction;}});
628 0x66: BasicOperate::fnot2({{
629 Frd.df = (double)(~((uint64_t)Frs2.df));
630 }});
631 0x67: BasicOperate::fnot2s({{
632 Frd.sf = (float)(~((uint32_t)Frs2.sf));
632 Frds.sf = (float)(~((uint32_t)Frs2s.sf));
633 }});
634 0x68: Trap::fandnot1({{fault = new IllegalInstruction;}});
635 0x69: Trap::fandnot1s({{fault = new IllegalInstruction;}});
636 0x6A: BasicOperate::fnot1({{
637 Frd.df = (double)(~((uint64_t)Frs1.df));
638 }});
639 0x6B: BasicOperate::fnot1s({{
633 }});
634 0x68: Trap::fandnot1({{fault = new IllegalInstruction;}});
635 0x69: Trap::fandnot1s({{fault = new IllegalInstruction;}});
636 0x6A: BasicOperate::fnot1({{
637 Frd.df = (double)(~((uint64_t)Frs1.df));
638 }});
639 0x6B: BasicOperate::fnot1s({{
640 Frd.sf = (float)(~((uint32_t)Frs1.sf));
640 Frds.sf = (float)(~((uint32_t)Frs1s.sf));
641 }});
642 0x6C: Trap::fxor({{fault = new IllegalInstruction;}});
643 0x6D: Trap::fxors({{fault = new IllegalInstruction;}});
644 0x6E: Trap::fnand({{fault = new IllegalInstruction;}});
645 0x6F: Trap::fnands({{fault = new IllegalInstruction;}});
646 0x70: Trap::fand({{fault = new IllegalInstruction;}});
647 0x71: Trap::fands({{fault = new IllegalInstruction;}});
648 0x72: Trap::fxnor({{fault = new IllegalInstruction;}});

--- 373 unchanged lines hidden ---
641 }});
642 0x6C: Trap::fxor({{fault = new IllegalInstruction;}});
643 0x6D: Trap::fxors({{fault = new IllegalInstruction;}});
644 0x6E: Trap::fnand({{fault = new IllegalInstruction;}});
645 0x6F: Trap::fnands({{fault = new IllegalInstruction;}});
646 0x70: Trap::fand({{fault = new IllegalInstruction;}});
647 0x71: Trap::fands({{fault = new IllegalInstruction;}});
648 0x72: Trap::fxnor({{fault = new IllegalInstruction;}});

--- 373 unchanged lines hidden ---