decoder.isa (2954:6839b9e49575) decoder.isa (2963:23ccbcf3fb09)
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

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

410 fault = xc->setMiscRegWithEffect(RD + PrStart, Rs1 ^ Rs2_or_imm13);
411 }});
412 0x33: HPriv::wrhpr({{
413 // XXX Need to protect with format that traps non-priv/priv
414 // access
415 fault = xc->setMiscRegWithEffect(RD + HprStart, Rs1 ^ Rs2_or_imm13);
416 }});
417 0x34: decode OPF{
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

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

410 fault = xc->setMiscRegWithEffect(RD + PrStart, Rs1 ^ Rs2_or_imm13);
411 }});
412 0x33: HPriv::wrhpr({{
413 // XXX Need to protect with format that traps non-priv/priv
414 // access
415 fault = xc->setMiscRegWithEffect(RD + HprStart, Rs1 ^ Rs2_or_imm13);
416 }});
417 0x34: decode OPF{
418 0x01: Trap::fmovs({{fault = new FpDisabled;}});
419 0x02: Trap::fmovd({{fault = new FpDisabled;}});
420 0x03: Trap::fmovq({{fault = new FpDisabled;}});
421 0x05: Trap::fnegs({{fault = new FpDisabled;}});
422 0x06: Trap::fnegd({{fault = new FpDisabled;}});
423 0x07: Trap::fnegq({{fault = new FpDisabled;}});
424 0x09: Trap::fabss({{fault = new FpDisabled;}});
425 0x0A: Trap::fabsd({{fault = new FpDisabled;}});
426 0x0B: Trap::fabsq({{fault = new FpDisabled;}});
427 0x29: Trap::fsqrts({{fault = new FpDisabled;}});
428 0x2A: Trap::fsqrtd({{fault = new FpDisabled;}});
429 0x2B: Trap::fsqrtq({{fault = new FpDisabled;}});
430 0x41: Trap::fadds({{fault = new FpDisabled;}});
431 0x42: BasicOperate::faddd({{Frd = Frs1 + Frs2;}});
432 0x43: Trap::faddq({{fault = new FpDisabled;}});
433 0x45: Trap::fsubs({{fault = new FpDisabled;}});
434 0x46: Trap::fsubd({{fault = new FpDisabled;}});
435 0x47: Trap::fsubq({{fault = new FpDisabled;}});
436 0x49: Trap::fmuls({{fault = new FpDisabled;}});
437 0x4A: BasicOperate::fmuld({{Frd = Frs1.sf * Frs2.sf;}});
438 0x4B: Trap::fmulq({{fault = new FpDisabled;}});
439 0x4D: Trap::fdivs({{fault = new FpDisabled;}});
440 0x4E: Trap::fdivd({{fault = new FpDisabled;}});
441 0x4F: Trap::fdivq({{fault = new FpDisabled;}});
442 0x69: Trap::fsmuld({{fault = new FpDisabled;}});
443 0x6E: Trap::fdmulq({{fault = new FpDisabled;}});
444 0x81: Trap::fstox({{fault = new FpDisabled;}});
445 0x82: Trap::fdtox({{fault = new FpDisabled;}});
446 0x83: Trap::fqtox({{fault = new FpDisabled;}});
447 0x84: Trap::fxtos({{fault = new FpDisabled;}});
448 0x88: Trap::fxtod({{fault = new FpDisabled;}});
449 0x8C: Trap::fxtoq({{fault = new FpDisabled;}});
450 0xC4: Trap::fitos({{fault = new FpDisabled;}});
451 0xC6: Trap::fdtos({{fault = new FpDisabled;}});
452 0xC7: Trap::fqtos({{fault = new FpDisabled;}});
453 0xC8: Trap::fitod({{fault = new FpDisabled;}});
454 0xC9: Trap::fstod({{fault = new FpDisabled;}});
455 0xCB: Trap::fqtod({{fault = new FpDisabled;}});
456 0xCC: Trap::fitoq({{fault = new FpDisabled;}});
457 0xCD: Trap::fstoq({{fault = new FpDisabled;}});
458 0xCE: Trap::fdtoq({{fault = new FpDisabled;}});
459 0xD1: Trap::fstoi({{fault = new FpDisabled;}});
460 0xD2: Trap::fdtoi({{fault = new FpDisabled;}});
461 0xD3: Trap::fqtoi({{fault = new FpDisabled;}});
462 default: Trap::fpop1({{fault = new FpDisabled;}});
418 format BasicOperate{
419 0x01: fmovs({{
420 Frd.sf = Frs2.sf;
421 //fsr.ftt = fsr.cexc = 0
422 Fsr &= ~(7 << 14);
423 Fsr &= ~(0x1F);
424 }});
425 0x02: fmovd({{
426 Frd.df = Frs2.df;
427 //fsr.ftt = fsr.cexc = 0
428 Fsr &= ~(7 << 14);
429 Fsr &= ~(0x1F);
430 }});
431 0x03: Trap::fmovq({{fault = new FpDisabled;}});
432 0x05: fnegs({{
433 //XXX might want to explicitly flip the sign bit
434 //So cases with Nan and +/-0 don't do weird things
435 Frd.sf = -Frs2.sf;
436 //fsr.ftt = fsr.cexc = 0
437 Fsr &= ~(7 << 14);
438 Fsr &= ~(0x1F);
439 }});
440 0x06: fnegd({{
441 //XXX might want to explicitly flip the sign bit
442 //So cases with Nan and +/-0 don't do weird things
443 Frd.df = -Frs2.df;
444 //fsr.ftt = fsr.cexc = 0
445 Fsr &= ~(7 << 14);
446 Fsr &= ~(0x1F);
447 }});
448 0x07: Trap::fnegq({{fault = new FpDisabled;}});
449 0x09: fabss({{
450 //XXX this instruction should be tested individually
451 //Clear the sign bit
452 Frd.sf = (float)(~(1 << 31) & ((uint32_t)Frs2.sf));
453 //fsr.ftt = fsr.cexc = 0
454 Fsr &= ~(7 << 14);
455 Fsr &= ~(0x1F);
456 }});
457 0x0A: fabsd({{
458 //XXX this instruction should be tested individually
459 //Clear the sign bit
460 Frd.df = (float)(~((uint64_t)1 << 63) & ((uint64_t)Frs2.df));
461 //fsr.ftt = fsr.cexc = 0
462 Fsr &= ~(7 << 14);
463 Fsr &= ~(0x1F);
464 }});
465 0x0B: Trap::fabsq({{fault = new FpDisabled;}});
466 0x29: fsqrts({{Frd.sf = sqrt(Frs2.sf);}});
467 0x2A: fsqrtd({{Frd.df = sqrt(Frs2.df);}});
468 0x2B: Trap::fsqrtq({{fault = new FpDisabled;}});
469 0x41: fadds({{Frd.sf = Frs1.sf + Frs2.sf;}});
470 0x42: faddd({{Frd.df = Frs1.df + Frs2.df;}});
471 0x43: Trap::faddq({{fault = new FpDisabled;}});
472 0x45: fsubs({{Frd.sf = Frs1.sf - Frs2.sf;}});
473 0x46: fsubd({{Frd.df = Frs1.df - Frs2.df;}});
474 0x47: Trap::fsubq({{fault = new FpDisabled;}});
475 0x49: fmuls({{Frd.sf = Frs1.sf * Frs2.sf;}});
476 0x4A: fmuld({{Frd.df = Frs1.df * Frs2.df;}});
477 0x4B: Trap::fmulq({{fault = new FpDisabled;}});
478 0x4D: fdivs({{Frd.sf = Frs1.sf / Frs2.sf;}});
479 0x4E: fdivd({{Frd.df = Frs1.df / Frs2.df;}});
480 0x4F: Trap::fdivq({{fault = new FpDisabled;}});
481 0x69: fsmuld({{Frd.df = Frs1.sf * Frs2.sf;}});
482 0x6E: Trap::fdmulq({{fault = new FpDisabled;}});
483 0x81: fstox({{
484 Frd.df = (double)static_cast<int64_t>(Frs2.sf);
485 }});
486 0x82: fdtox({{
487 Frd.df = (double)static_cast<int64_t>(Frs2.df);
488 }});
489 0x83: Trap::fqtox({{fault = new FpDisabled;}});
490 0x84: fxtos({{
491 Frd.sf = static_cast<float>((int64_t)Frs2.df);
492 }});
493 0x88: fxtod({{
494 Frd.df = static_cast<double>((int64_t)Frs2.df);
495 }});
496 0x8C: Trap::fxtoq({{fault = new FpDisabled;}});
497 0xC4: fitos({{
498 Frd.sf = static_cast<float>((int32_t)Frs2.sf);
499 }});
500 0xC6: fdtos({{Frd.sf = Frs2.df;}});
501 0xC7: Trap::fqtos({{fault = new FpDisabled;}});
502 0xC8: fitod({{
503 Frd.df = static_cast<double>((int32_t)Frs2.sf);
504 }});
505 0xC9: fstod({{Frd.df = Frs2.sf;}});
506 0xCB: Trap::fqtod({{fault = new FpDisabled;}});
507 0xCC: Trap::fitoq({{fault = new FpDisabled;}});
508 0xCD: Trap::fstoq({{fault = new FpDisabled;}});
509 0xCE: Trap::fdtoq({{fault = new FpDisabled;}});
510 0xD1: fstoi({{
511 Frd.sf = (float)static_cast<int32_t>(Frs2.sf);
512 }});
513 0xD2: fdtoi({{
514 Frd.sf = (float)static_cast<int32_t>(Frs2.df);
515 }});
516 0xD3: Trap::fqtoi({{fault = new FpDisabled;}});
517 default: Trap::fpop1({{fault = new FpDisabled;}});
518 }
463 }
464 0x35: Trap::fpop2({{fault = new FpDisabled;}});
465 //This used to be just impdep1, but now it's a whole bunch
466 //of instructions
467 0x36: decode OPF{
468 0x00: Trap::edge8({{fault = new IllegalInstruction;}});
469 0x01: Trap::edge8n({{fault = new IllegalInstruction;}});
470 0x02: Trap::edge8l({{fault = new IllegalInstruction;}});

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

475 0x07: Trap::edge16ln({{fault = new IllegalInstruction;}});
476 0x08: Trap::edge32({{fault = new IllegalInstruction;}});
477 0x09: Trap::edge32n({{fault = new IllegalInstruction;}});
478 0x0A: Trap::edge32l({{fault = new IllegalInstruction;}});
479 0x0B: Trap::edge32ln({{fault = new IllegalInstruction;}});
480 0x10: Trap::array8({{fault = new IllegalInstruction;}});
481 0x12: Trap::array16({{fault = new IllegalInstruction;}});
482 0x14: Trap::array32({{fault = new IllegalInstruction;}});
519 }
520 0x35: Trap::fpop2({{fault = new FpDisabled;}});
521 //This used to be just impdep1, but now it's a whole bunch
522 //of instructions
523 0x36: decode OPF{
524 0x00: Trap::edge8({{fault = new IllegalInstruction;}});
525 0x01: Trap::edge8n({{fault = new IllegalInstruction;}});
526 0x02: Trap::edge8l({{fault = new IllegalInstruction;}});

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

531 0x07: Trap::edge16ln({{fault = new IllegalInstruction;}});
532 0x08: Trap::edge32({{fault = new IllegalInstruction;}});
533 0x09: Trap::edge32n({{fault = new IllegalInstruction;}});
534 0x0A: Trap::edge32l({{fault = new IllegalInstruction;}});
535 0x0B: Trap::edge32ln({{fault = new IllegalInstruction;}});
536 0x10: Trap::array8({{fault = new IllegalInstruction;}});
537 0x12: Trap::array16({{fault = new IllegalInstruction;}});
538 0x14: Trap::array32({{fault = new IllegalInstruction;}});
483 0x18: Trap::alignaddress({{fault = new IllegalInstruction;}});
539 0x18: BasicOperate::alignaddress({{
540 uint64_t sum = Rs1 + Rs2;
541 Frd = sum & ~7;
542 Gsr = (Gsr & ~7) | (sum & 7);
543 }});
484 0x19: Trap::bmask({{fault = new IllegalInstruction;}});
544 0x19: Trap::bmask({{fault = new IllegalInstruction;}});
485 0x1A: Trap::alignaddresslittle({{fault = new IllegalInstruction;}});
545 0x1A: BasicOperate::alignaddresslittle({{
546 uint64_t sum = Rs1 + Rs2;
547 Frd = sum & ~7;
548 Gsr = (Gsr & ~7) | ((~sum + 1) & 7);
549 }});
486 0x20: Trap::fcmple16({{fault = new IllegalInstruction;}});
487 0x22: Trap::fcmpne16({{fault = new IllegalInstruction;}});
488 0x24: Trap::fcmple32({{fault = new IllegalInstruction;}});
489 0x26: Trap::fcmpne32({{fault = new IllegalInstruction;}});
490 0x28: Trap::fcmpgt16({{fault = new IllegalInstruction;}});
491 0x2A: Trap::fcmpeq16({{fault = new IllegalInstruction;}});
492 0x2C: Trap::fcmpgt32({{fault = new IllegalInstruction;}});
493 0x2E: Trap::fcmpeq32({{fault = new IllegalInstruction;}});
494 0x31: Trap::fmul8x16({{fault = new IllegalInstruction;}});
495 0x33: Trap::fmul8x16au({{fault = new IllegalInstruction;}});
496 0x35: Trap::fmul8x16al({{fault = new IllegalInstruction;}});
497 0x36: Trap::fmul8sux16({{fault = new IllegalInstruction;}});
498 0x37: Trap::fmul8ulx16({{fault = new IllegalInstruction;}});
499 0x38: Trap::fmuld8sux16({{fault = new IllegalInstruction;}});
500 0x39: Trap::fmuld8ulx16({{fault = new IllegalInstruction;}});
501 0x3A: Trap::fpack32({{fault = new IllegalInstruction;}});
502 0x3B: Trap::fpack16({{fault = new IllegalInstruction;}});
503 0x3D: Trap::fpackfix({{fault = new IllegalInstruction;}});
504 0x3E: Trap::pdist({{fault = new IllegalInstruction;}});
550 0x20: Trap::fcmple16({{fault = new IllegalInstruction;}});
551 0x22: Trap::fcmpne16({{fault = new IllegalInstruction;}});
552 0x24: Trap::fcmple32({{fault = new IllegalInstruction;}});
553 0x26: Trap::fcmpne32({{fault = new IllegalInstruction;}});
554 0x28: Trap::fcmpgt16({{fault = new IllegalInstruction;}});
555 0x2A: Trap::fcmpeq16({{fault = new IllegalInstruction;}});
556 0x2C: Trap::fcmpgt32({{fault = new IllegalInstruction;}});
557 0x2E: Trap::fcmpeq32({{fault = new IllegalInstruction;}});
558 0x31: Trap::fmul8x16({{fault = new IllegalInstruction;}});
559 0x33: Trap::fmul8x16au({{fault = new IllegalInstruction;}});
560 0x35: Trap::fmul8x16al({{fault = new IllegalInstruction;}});
561 0x36: Trap::fmul8sux16({{fault = new IllegalInstruction;}});
562 0x37: Trap::fmul8ulx16({{fault = new IllegalInstruction;}});
563 0x38: Trap::fmuld8sux16({{fault = new IllegalInstruction;}});
564 0x39: Trap::fmuld8ulx16({{fault = new IllegalInstruction;}});
565 0x3A: Trap::fpack32({{fault = new IllegalInstruction;}});
566 0x3B: Trap::fpack16({{fault = new IllegalInstruction;}});
567 0x3D: Trap::fpackfix({{fault = new IllegalInstruction;}});
568 0x3E: Trap::pdist({{fault = new IllegalInstruction;}});
505 0x48: Trap::faligndata({{fault = new IllegalInstruction;}});
569 0x48: BasicOperate::faligndata({{
570 uint64_t msbX = (uint64_t)Frs1;
571 uint64_t lsbX = (uint64_t)Frs2;
572 uint64_t msbShift = Gsr<2:0> * 8;
573 uint64_t lsbShift = (8 - Gsr<2:0>) * 8;
574 uint64_t msbMask = ((uint64_t)(-1)) << msbShift;
575 uint64_t lsbMask = ((uint64_t)(-1)) << lsbShift;
576 Frd = ((msbX << msbShift) & msbMask) |
577 ((lsbX << lsbShift) & lsbMask);
578 }});
506 0x4B: Trap::fpmerge({{fault = new IllegalInstruction;}});
507 0x4C: Trap::bshuffle({{fault = new IllegalInstruction;}});
508 0x4D: Trap::fexpand({{fault = new IllegalInstruction;}});
509 0x50: Trap::fpadd16({{fault = new IllegalInstruction;}});
510 0x51: Trap::fpadd16s({{fault = new IllegalInstruction;}});
511 0x52: Trap::fpadd32({{fault = new IllegalInstruction;}});
512 0x53: Trap::fpadd32s({{fault = new IllegalInstruction;}});
513 0x54: Trap::fpsub16({{fault = new IllegalInstruction;}});
514 0x55: Trap::fpsub16s({{fault = new IllegalInstruction;}});
515 0x56: Trap::fpsub32({{fault = new IllegalInstruction;}});
516 0x57: Trap::fpsub32s({{fault = new IllegalInstruction;}});
579 0x4B: Trap::fpmerge({{fault = new IllegalInstruction;}});
580 0x4C: Trap::bshuffle({{fault = new IllegalInstruction;}});
581 0x4D: Trap::fexpand({{fault = new IllegalInstruction;}});
582 0x50: Trap::fpadd16({{fault = new IllegalInstruction;}});
583 0x51: Trap::fpadd16s({{fault = new IllegalInstruction;}});
584 0x52: Trap::fpadd32({{fault = new IllegalInstruction;}});
585 0x53: Trap::fpadd32s({{fault = new IllegalInstruction;}});
586 0x54: Trap::fpsub16({{fault = new IllegalInstruction;}});
587 0x55: Trap::fpsub16s({{fault = new IllegalInstruction;}});
588 0x56: Trap::fpsub32({{fault = new IllegalInstruction;}});
589 0x57: Trap::fpsub32s({{fault = new IllegalInstruction;}});
517 0x60: BasicOperate::fzero({{Frd = 0;}});
518 0x61: Trap::fzeros({{fault = new IllegalInstruction;}});
590 0x60: BasicOperate::fzero({{Frd.df = 0;}});
591 0x61: BasicOperate::fzeros({{Frd.sf = 0;}});
519 0x62: Trap::fnor({{fault = new IllegalInstruction;}});
520 0x63: Trap::fnors({{fault = new IllegalInstruction;}});
521 0x64: Trap::fandnot2({{fault = new IllegalInstruction;}});
522 0x65: Trap::fandnot2s({{fault = new IllegalInstruction;}});
592 0x62: Trap::fnor({{fault = new IllegalInstruction;}});
593 0x63: Trap::fnors({{fault = new IllegalInstruction;}});
594 0x64: Trap::fandnot2({{fault = new IllegalInstruction;}});
595 0x65: Trap::fandnot2s({{fault = new IllegalInstruction;}});
523 0x66: Trap::fnot2({{fault = new IllegalInstruction;}});
524 0x67: Trap::fnot2s({{fault = new IllegalInstruction;}});
596 0x66: BasicOperate::fnot2({{
597 Frd.df = (double)(~((uint64_t)Frs2.df));
598 }});
599 0x67: BasicOperate::fnot2s({{
600 Frd.sf = (float)(~((uint32_t)Frs2.sf));
601 }});
525 0x68: Trap::fandnot1({{fault = new IllegalInstruction;}});
526 0x69: Trap::fandnot1s({{fault = new IllegalInstruction;}});
602 0x68: Trap::fandnot1({{fault = new IllegalInstruction;}});
603 0x69: Trap::fandnot1s({{fault = new IllegalInstruction;}});
527 0x6A: Trap::fnot1({{fault = new IllegalInstruction;}});
528 0x6B: Trap::fnot1s({{fault = new IllegalInstruction;}});
604 0x6A: BasicOperate::fnot1({{
605 Frd.df = (double)(~((uint64_t)Frs1.df));
606 }});
607 0x6B: BasicOperate::fnot1s({{
608 Frd.sf = (float)(~((uint32_t)Frs1.sf));
609 }});
529 0x6C: Trap::fxor({{fault = new IllegalInstruction;}});
530 0x6D: Trap::fxors({{fault = new IllegalInstruction;}});
531 0x6E: Trap::fnand({{fault = new IllegalInstruction;}});
532 0x6F: Trap::fnands({{fault = new IllegalInstruction;}});
533 0x70: Trap::fand({{fault = new IllegalInstruction;}});
534 0x71: Trap::fands({{fault = new IllegalInstruction;}});
535 0x72: Trap::fxnor({{fault = new IllegalInstruction;}});
536 0x73: Trap::fxnors({{fault = new IllegalInstruction;}});
610 0x6C: Trap::fxor({{fault = new IllegalInstruction;}});
611 0x6D: Trap::fxors({{fault = new IllegalInstruction;}});
612 0x6E: Trap::fnand({{fault = new IllegalInstruction;}});
613 0x6F: Trap::fnands({{fault = new IllegalInstruction;}});
614 0x70: Trap::fand({{fault = new IllegalInstruction;}});
615 0x71: Trap::fands({{fault = new IllegalInstruction;}});
616 0x72: Trap::fxnor({{fault = new IllegalInstruction;}});
617 0x73: Trap::fxnors({{fault = new IllegalInstruction;}});
537 0x74: Trap::fsrc1({{fault = new IllegalInstruction;}});
538 0x75: Trap::fsrc1s({{fault = new IllegalInstruction;}});
618 0x74: BasicOperate::fsrc1({{Frd.df = Frs1.df;}});
619 0x75: BasicOperate::fsrc1s({{Frd.sf = Frs1.sf;}});
539 0x76: Trap::fornot2({{fault = new IllegalInstruction;}});
540 0x77: Trap::fornot2s({{fault = new IllegalInstruction;}});
620 0x76: Trap::fornot2({{fault = new IllegalInstruction;}});
621 0x77: Trap::fornot2s({{fault = new IllegalInstruction;}});
541 0x78: Trap::fsrc2({{fault = new IllegalInstruction;}});
542 0x79: Trap::fsrc2s({{fault = new IllegalInstruction;}});
622 0x78: BasicOperate::fsrc2({{Frd.df = Frs2.df;}});
623 0x79: BasicOperate::fsrc2s({{Frd.sf = Frs2.sf;}});
543 0x7A: Trap::fornot1({{fault = new IllegalInstruction;}});
544 0x7B: Trap::fornot1s({{fault = new IllegalInstruction;}});
545 0x7C: Trap::for({{fault = new IllegalInstruction;}});
546 0x7D: Trap::fors({{fault = new IllegalInstruction;}});
547 0x7E: Trap::fone({{fault = new IllegalInstruction;}});
548 0x7F: Trap::fones({{fault = new IllegalInstruction;}});
549 0x80: Trap::shutdown({{fault = new IllegalInstruction;}});
550 0x81: Trap::siam({{fault = new IllegalInstruction;}});

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

766 }}, {{8}});
767 0x1E: Store::stxa({{Mem = Rd}}, {{64}});
768 0x1F: LoadStore::swapa({{
769 uint32_t temp = Rd;
770 Rd = Mem;
771 Mem = temp;
772 }}, {{32}});
773 format Trap {
624 0x7A: Trap::fornot1({{fault = new IllegalInstruction;}});
625 0x7B: Trap::fornot1s({{fault = new IllegalInstruction;}});
626 0x7C: Trap::for({{fault = new IllegalInstruction;}});
627 0x7D: Trap::fors({{fault = new IllegalInstruction;}});
628 0x7E: Trap::fone({{fault = new IllegalInstruction;}});
629 0x7F: Trap::fones({{fault = new IllegalInstruction;}});
630 0x80: Trap::shutdown({{fault = new IllegalInstruction;}});
631 0x81: Trap::siam({{fault = new IllegalInstruction;}});

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

847 }}, {{8}});
848 0x1E: Store::stxa({{Mem = Rd}}, {{64}});
849 0x1F: LoadStore::swapa({{
850 uint32_t temp = Rd;
851 Rd = Mem;
852 Mem = temp;
853 }}, {{32}});
854 format Trap {
774 0x20: ldf({{fault = new FpDisabled;}});
855 0x20: Load::ldf({{Frd.sf = ((float)Mem);}}, {{32}});
775 0x21: decode X {
776 0x0: Load::ldfsr({{Fsr = Mem<31:0> | Fsr<63:32>;}}, {{32}});
777 0x1: Load::ldxfsr({{Fsr = Mem;}}, {{64}});
778 }
779 0x22: ldqf({{fault = new FpDisabled;}});
856 0x21: decode X {
857 0x0: Load::ldfsr({{Fsr = Mem<31:0> | Fsr<63:32>;}}, {{32}});
858 0x1: Load::ldxfsr({{Fsr = Mem;}}, {{64}});
859 }
860 0x22: ldqf({{fault = new FpDisabled;}});
780 0x23: lddf({{fault = new FpDisabled;}});
781 0x24: stf({{fault = new FpDisabled;}});
861 0x23: Load::lddf({{Frd.df = ((double)Mem);}}, {{64}});
862 0x24: Store::stf({{Mem = ((int32_t)Frd.sf);}}, {{32}});
782 0x25: decode X {
783 0x0: Store::stfsr({{Mem = Fsr<31:0>;}}, {{32}});
784 0x1: Store::stxfsr({{Mem = Fsr;}}, {{64}});
785 }
786 0x26: stqf({{fault = new FpDisabled;}});
863 0x25: decode X {
864 0x0: Store::stfsr({{Mem = Fsr<31:0>;}}, {{32}});
865 0x1: Store::stxfsr({{Mem = Fsr;}}, {{64}});
866 }
867 0x26: stqf({{fault = new FpDisabled;}});
787 0x27: stdf({{fault = new FpDisabled;}});
868 0x27: Store::stdf({{Mem = ((int64_t)Frd.df);}}, {{64}});
788 0x2D: Nop::prefetch({{ }});
869 0x2D: Nop::prefetch({{ }});
789 0x30: ldfa({{fault = new FpDisabled;}});
870 0x30: Load::ldfa({{Frd.sf = ((float)Mem);}}, {{32}});
790 0x32: ldqfa({{fault = new FpDisabled;}});
871 0x32: ldqfa({{fault = new FpDisabled;}});
791 0x33: lddfa({{fault = new FpDisabled;}});
792 0x34: stfa({{fault = new FpDisabled;}});
872 0x33: Load::lddfa({{Frd.df = ((double)Mem);}}, {{64}});
873 0x34: Store::stfa({{Mem = ((int32_t)Frd.sf);}}, {{32}});
793 0x36: stqfa({{fault = new FpDisabled;}});
794 //XXX need to work in the ASI thing
874 0x36: stqfa({{fault = new FpDisabled;}});
875 //XXX need to work in the ASI thing
795 0x37: Store::stdfa({{Mem = ((uint64_t)Frd);}}, {{64}});
876 0x37: Store::stdfa({{Mem = ((uint64_t)Frd.df);}}, {{64}});
796 0x3C: Cas::casa({{
797 uint64_t val = Mem.uw;
798 if(Rs2.uw == val)
799 Mem.uw = Rd.uw;
800 Rd.uw = val;
801 }});
802 0x3D: Nop::prefetcha({{ }});
803 0x3E: Cas::casxa({{
804 uint64_t val = Mem.udw;
805 if(Rs2 == val)
806 Mem.udw = Rd;
807 Rd = val;
808 }});
809 }
810 }
811}
877 0x3C: Cas::casa({{
878 uint64_t val = Mem.uw;
879 if(Rs2.uw == val)
880 Mem.uw = Rd.uw;
881 Rd.uw = val;
882 }});
883 0x3D: Nop::prefetcha({{ }});
884 0x3E: Cas::casxa({{
885 uint64_t val = Mem.udw;
886 if(Rs2 == val)
887 Mem.udw = Rd;
888 Rd = val;
889 }});
890 }
891 }
892}