Deleted Added
sdiff udiff text old ( 4005:c31dee26d855 ) new ( 4008:ccad3906006a )
full compact
1// Copyright (c) 2006-2007 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

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

713 //0x02 should cause an illegal instruction exception
714 0x03: HPriv::wrhprhintp({{Hintp = Rs1 ^ Rs2_or_imm13;}});
715 //0x04 should cause an illegal instruction exception
716 0x05: HPriv::wrhprhtba({{Htba = Rs1 ^ Rs2_or_imm13;}});
717 //0x06-0x01D should cause an illegal instruction exception
718 0x1F: HPriv::wrhprhstick_cmpr({{HstickCmpr = Rs1 ^ Rs2_or_imm13;}});
719 }
720 0x34: decode OPF{
721 format FpBasic{
722 0x01: fmovs({{
723 Frds.uw = Frs2s.uw;
724 //fsr.ftt = fsr.cexc = 0
725 Fsr &= ~(7 << 14);
726 Fsr &= ~(0x1F);
727 }});
728 0x02: fmovd({{
729 Frd.udw = Frs2.udw;

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

760 0x0B: FpUnimpl::fabsq();
761 0x29: fsqrts({{Frds.sf = std::sqrt(Frs2s.sf);}});
762 0x2A: fsqrtd({{Frd.df = std::sqrt(Frs2.df);}});
763 0x2B: FpUnimpl::fsqrtq();
764 0x41: fadds({{Frds.sf = Frs1s.sf + Frs2s.sf;}});
765 0x42: faddd({{Frd.df = Frs1.df + Frs2.df;}});
766 0x43: FpUnimpl::faddq();
767 0x45: fsubs({{Frds.sf = Frs1s.sf - Frs2s.sf;}});
768 0x46: fsubd({{Frd.df = Frs1.df - Frs2.df; }});
769 0x47: FpUnimpl::fsubq();
770 0x49: fmuls({{Frds.sf = Frs1s.sf * Frs2s.sf;}});
771 0x4A: fmuld({{Frd.df = Frs1.df * Frs2.df;}});
772 0x4B: FpUnimpl::fmulq();
773 0x4D: fdivs({{Frds.sf = Frs1s.sf / Frs2s.sf;}});
774 0x4E: fdivd({{Frd.df = Frs1.df / Frs2.df;}});
775 0x4F: FpUnimpl::fdivq();
776 0x69: fsmuld({{Frd.df = Frs1s.sf * Frs2s.sf;}});
777 0x6E: FpUnimpl::fdmulq();
778 0x81: fstox({{
779 Frd.sdw = static_cast<int64_t>(Frs2s.sf);
780 }});
781 0x82: fdtox({{
782 Frd.sdw = static_cast<int64_t>(Frs2.df);
783 }});
784 0x83: FpUnimpl::fqtox();
785 0x84: fxtos({{
786 Frds.sf = static_cast<float>(Frs2.sdw);
787 }});
788 0x88: fxtod({{
789 Frd.df = static_cast<double>(Frs2.sdw);
790 }});
791 0x8C: FpUnimpl::fxtoq();
792 0xC4: fitos({{
793 Frds.sf = static_cast<float>(Frs2s.sw);
794 }});
795 0xC6: fdtos({{Frds.sf = Frs2.df;}});
796 0xC7: FpUnimpl::fqtos();
797 0xC8: fitod({{
798 Frd.df = static_cast<double>(Frs2s.sw);
799 }});
800 0xC9: fstod({{Frd.df = Frs2s.sf;}});
801 0xCB: FpUnimpl::fqtod();
802 0xCC: FpUnimpl::fitoq();
803 0xCD: FpUnimpl::fstoq();
804 0xCE: FpUnimpl::fdtoq();
805 0xD1: fstoi({{
806 Frds.sw = static_cast<int32_t>(Frs2s.sf);
807 float t = Frds.sw;
808 if (t != Frs2s.sf)
809 Fsr = insertBits(Fsr, 4,0, 0x01);
810 Fsr |= Fsr<4:0> << 5;
811 }});
812 0xD2: fdtoi({{
813 Frds.sw = static_cast<int32_t>(Frs2.df);
814 double t = Frds.sw;
815 if (t != Frs2.df)
816 Fsr = insertBits(Fsr, 4,0, 0x01);
817 Fsr |= Fsr<4:0> << 5;
818 }});
819 0xD3: FpUnimpl::fqtoi();
820 default: FailUnimpl::fpop1();
821 }
822 }
823 0x35: decode OPF{
824 format FpBasic{
825 0x51: fcmps({{
826 uint8_t fcc;
827 if(isnan(Frs1s) || isnan(Frs2s))
828 fcc = 3;
829 else if(Frs1s < Frs2s)
830 fcc = 1;
831 else if(Frs1s > Frs2s)
832 fcc = 2;
833 else
834 fcc = 0;
835 uint8_t firstbit = 10;
836 if(FCMPCC)
837 firstbit = FCMPCC * 2 + 30;
838 Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc);
839 }});
840 0x52: fcmpd({{
841 uint8_t fcc;
842 if(isnan(Frs1) || isnan(Frs2))
843 fcc = 3;
844 else if(Frs1 < Frs2)
845 fcc = 1;
846 else if(Frs1 > Frs2)
847 fcc = 2;
848 else
849 fcc = 0;
850 uint8_t firstbit = 10;
851 if(FCMPCC)
852 firstbit = FCMPCC * 2 + 30;
853 Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc);
854 }});

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

863 fcc = 2;
864 uint8_t firstbit = 10;
865 if(FCMPCC)
866 firstbit = FCMPCC * 2 + 30;
867 Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc);
868 }});
869 0x56: fcmped({{
870 uint8_t fcc = 0;
871 if(isnan(Frs1) || isnan(Frs2))
872 fault = new FpExceptionIEEE754;
873 if(Frs1 < Frs2)
874 fcc = 1;
875 else if(Frs1 > Frs2)
876 fcc = 2;
877 uint8_t firstbit = 10;
878 if(FCMPCC)
879 firstbit = FCMPCC * 2 + 30;
880 Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc);
881 }});
882 0x57: FpUnimpl::fcmpeq();
883 default: FailUnimpl::fpop2();

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

963 0x50: FailUnimpl::fpadd16();
964 0x51: FailUnimpl::fpadd16s();
965 0x52: FailUnimpl::fpadd32();
966 0x53: FailUnimpl::fpadd32s();
967 0x54: FailUnimpl::fpsub16();
968 0x55: FailUnimpl::fpsub16s();
969 0x56: FailUnimpl::fpsub32();
970 0x57: FailUnimpl::fpsub32s();
971 0x60: FpBasic::fzero({{Frd.df = 0;}});
972 0x61: FpBasic::fzeros({{Frds.sf = 0;}});
973 0x62: FailUnimpl::fnor();
974 0x63: FailUnimpl::fnors();
975 0x64: FailUnimpl::fandnot2();
976 0x65: FailUnimpl::fandnot2s();
977 0x66: FpBasic::fnot2({{
978 Frd.df = (double)(~((uint64_t)Frs2.df));
979 }});
980 0x67: FpBasic::fnot2s({{
981 Frds.sf = (float)(~((uint32_t)Frs2s.sf));
982 }});
983 0x68: FailUnimpl::fandnot1();
984 0x69: FailUnimpl::fandnot1s();
985 0x6A: FpBasic::fnot1({{
986 Frd.df = (double)(~((uint64_t)Frs1.df));
987 }});
988 0x6B: FpBasic::fnot1s({{
989 Frds.sf = (float)(~((uint32_t)Frs1s.sf));
990 }});
991 0x6C: FailUnimpl::fxor();
992 0x6D: FailUnimpl::fxors();
993 0x6E: FailUnimpl::fnand();
994 0x6F: FailUnimpl::fnands();
995 0x70: FailUnimpl::fand();
996 0x71: FailUnimpl::fands();
997 0x72: FailUnimpl::fxnor();
998 0x73: FailUnimpl::fxnors();
999 0x74: FpBasic::fsrc1({{Frd.udw = Frs1.udw;}});
1000 0x75: FpBasic::fsrc1s({{Frds.uw = Frs1s.uw;}});
1001 0x76: FailUnimpl::fornot2();
1002 0x77: FailUnimpl::fornot2s();
1003 0x78: FpBasic::fsrc2({{Frd.udw = Frs2.udw;}});
1004 0x79: FpBasic::fsrc2s({{Frds.uw = Frs2s.uw;}});
1005 0x7A: FailUnimpl::fornot1();
1006 0x7B: FailUnimpl::fornot1s();
1007 0x7C: FailUnimpl::for();
1008 0x7D: FailUnimpl::fors();
1009 0x7E: FpBasic::fone({{Frd.udw = std::numeric_limits<uint64_t>::max();}});
1010 0x7F: FpBasic::fones({{Frds.uw = std::numeric_limits<uint32_t>::max();}});
1011 0x80: Trap::shutdown({{fault = new IllegalInstruction;}});
1012 0x81: FailUnimpl::siam();
1013 }
1014 0x37: Trap::impdep2({{fault = new IllegalInstruction;}});
1015 0x38: Branch::jmpl({{
1016 Addr target = Rs1 + Rs2_or_imm13;
1017 if(target & 0x3)
1018 fault = new MemAddressNotAligned;

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

1239 Mem.ub = 0xFF;}}, {{EXT_ASI}});
1240 0x1E: StoreAlt::stxa({{Mem.udw = Rd}}, {{EXT_ASI}});
1241 0x1F: LoadStoreAlt::swapa(
1242 {{ uReg0 = Mem.uw}},
1243 {{ Mem.uw = Rd.uw;
1244 Rd.uw = uReg0;}}, {{EXT_ASI}});
1245 format Trap {
1246 0x20: Load::ldf({{Frds.uw = Mem.uw;}});
1247 0x21: decode RD {
1248 0x0: Load::ldfsr({{Fsr = Mem.uw | Fsr<63:32>;}});
1249 0x1: Load::ldxfsr({{Fsr = Mem.udw;}});
1250 default: FailUnimpl::ldfsrOther();
1251 }
1252 0x22: ldqf({{fault = new FpDisabled;}});
1253 0x23: Load::lddf({{Frd.udw = Mem.udw;}});
1254 0x24: Store::stf({{Mem.uw = Frds.uw;}});
1255 0x25: decode RD {
1256 0x0: Store::stfsr({{Mem.uw = Fsr<31:0>;
1257 Fsr = insertBits(Fsr,16,14,0);}});
1258 0x1: Store::stxfsr({{Mem.udw = Fsr;
1259 Fsr = insertBits(Fsr,16,14,0);}});
1260 default: FailUnimpl::stfsrOther();
1261 }
1262 0x26: stqf({{fault = new FpDisabled;}});
1263 0x27: Store::stdf({{Mem.udw = Frd.udw;}});
1264 0x2D: Nop::prefetch({{ }});
1265 0x30: LoadAlt::ldfa({{Frds.uw = Mem.uw;}}, {{EXT_ASI}});
1266 0x32: ldqfa({{fault = new FpDisabled;}});
1267 format LoadAlt {
1268 0x33: decode EXT_ASI {

--- 180 unchanged lines hidden ---