decoder.isa (3911:226fba0da6f3) | decoder.isa (3918:1f9a98d198e8) |
---|---|
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 --- 454 unchanged lines hidden (view full) --- 463 0x0C: Priv::rdprcleanwin({{Rd = Cleanwin;}}); 464 0x0D: Priv::rdprotherwin({{Rd = Otherwin;}}); 465 0x0E: Priv::rdprwstate({{Rd = Wstate;}}); 466 //0x0F should cause an illegal instruction exception 467 0x10: Priv::rdprgl({{Rd = Gl;}}); 468 //0x11-0x1F should cause an illegal instruction exception 469 } 470 0x2B: BasicOperate::flushw({{ | 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 --- 454 unchanged lines hidden (view full) --- 463 0x0C: Priv::rdprcleanwin({{Rd = Cleanwin;}}); 464 0x0D: Priv::rdprotherwin({{Rd = Otherwin;}}); 465 0x0E: Priv::rdprwstate({{Rd = Wstate;}}); 466 //0x0F should cause an illegal instruction exception 467 0x10: Priv::rdprgl({{Rd = Gl;}}); 468 //0x11-0x1F should cause an illegal instruction exception 469 } 470 0x2B: BasicOperate::flushw({{ |
471 if(NWindows - 2 - Cansave != 0) | 471 if(NWindows - 2 - Cansave == 0) |
472 { 473 if(Otherwin) | 472 { 473 if(Otherwin) |
474 fault = new SpillNOther(4*Wstate<5:3>); | 474 fault = new SpillNOther(Wstate<5:3>); |
475 else | 475 else |
476 fault = new SpillNNormal(4*Wstate<2:0>); | 476 fault = new SpillNNormal(Wstate<2:0>); |
477 } 478 }}); 479 0x2C: decode MOVCC3 480 { 481 0x0: Trap::movccfcc({{fault = new FpDisabled;}}); 482 0x1: decode CC 483 { 484 0x0: movcci({{ --- 195 unchanged lines hidden (view full) --- 680 }}); 681 0x0A: fabsd({{ 682 Frd.udw = ((1ULL << 63) - 1) & Frs2.udw; 683 //fsr.ftt = fsr.cexc = 0 684 Fsr &= ~(7 << 14); 685 Fsr &= ~(0x1F); 686 }}); 687 0x0B: Trap::fabsq({{fault = new FpDisabled;}}); | 477 } 478 }}); 479 0x2C: decode MOVCC3 480 { 481 0x0: Trap::movccfcc({{fault = new FpDisabled;}}); 482 0x1: decode CC 483 { 484 0x0: movcci({{ --- 195 unchanged lines hidden (view full) --- 680 }}); 681 0x0A: fabsd({{ 682 Frd.udw = ((1ULL << 63) - 1) & Frs2.udw; 683 //fsr.ftt = fsr.cexc = 0 684 Fsr &= ~(7 << 14); 685 Fsr &= ~(0x1F); 686 }}); 687 0x0B: Trap::fabsq({{fault = new FpDisabled;}}); |
688 0x29: fsqrts({{Frds.sf = sqrt(Frs2s.sf);}}); 689 0x2A: fsqrtd({{Frd.df = sqrt(Frs2.df);}}); | 688 0x29: fsqrts({{Frds.sf = std::sqrt(Frs2s.sf);}}); 689 0x2A: fsqrtd({{Frd.df = std::sqrt(Frs2.df);}}); |
690 0x2B: Trap::fsqrtq({{fault = new FpDisabled;}}); 691 0x41: fadds({{Frds.sf = Frs1s.sf + Frs2s.sf;}}); 692 0x42: faddd({{Frd.df = Frs1.df + Frs2.df;}}); 693 0x43: Trap::faddq({{fault = new FpDisabled;}}); 694 0x45: fsubs({{Frds.sf = Frs1s.sf - Frs2s.sf;}}); 695 0x46: fsubd({{Frd.df = Frs1.df - Frs2.df;}}); 696 0x47: Trap::fsubq({{fault = new FpDisabled;}}); 697 0x49: fmuls({{Frds.sf = Frs1s.sf * Frs2s.sf;}}); --- 190 unchanged lines hidden (view full) --- 888 fault = new MemAddressNotAligned; 889 else 890 NNPC = target; 891 if(fault == NoFault) 892 { 893 if(Canrestore == 0) 894 { 895 if(Otherwin) | 690 0x2B: Trap::fsqrtq({{fault = new FpDisabled;}}); 691 0x41: fadds({{Frds.sf = Frs1s.sf + Frs2s.sf;}}); 692 0x42: faddd({{Frd.df = Frs1.df + Frs2.df;}}); 693 0x43: Trap::faddq({{fault = new FpDisabled;}}); 694 0x45: fsubs({{Frds.sf = Frs1s.sf - Frs2s.sf;}}); 695 0x46: fsubd({{Frd.df = Frs1.df - Frs2.df;}}); 696 0x47: Trap::fsubq({{fault = new FpDisabled;}}); 697 0x49: fmuls({{Frds.sf = Frs1s.sf * Frs2s.sf;}}); --- 190 unchanged lines hidden (view full) --- 888 fault = new MemAddressNotAligned; 889 else 890 NNPC = target; 891 if(fault == NoFault) 892 { 893 if(Canrestore == 0) 894 { 895 if(Otherwin) |
896 fault = new FillNOther(4*Wstate<5:3>); | 896 fault = new FillNOther(Wstate<5:3>); |
897 else | 897 else |
898 fault = new FillNNormal(4*Wstate<2:0>); | 898 fault = new FillNNormal(Wstate<2:0>); |
899 } 900 else 901 { 902 //CWP should be set directly so that it always happens 903 //Also, this will allow writing to the new window and 904 //reading from the old one 905 Cwp = (Cwp - 1 + NWindows) % NWindows; 906 Cansave = Cansave + 1; --- 37 unchanged lines hidden (view full) --- 944 0x3B: Nop::flush({{/*Instruction memory flush*/}}); 945 0x3C: save({{ 946 //CWP should be set directly so that it always happens 947 //Also, this will allow writing to the new window and 948 //reading from the old one 949 if(Cansave == 0) 950 { 951 if(Otherwin) | 899 } 900 else 901 { 902 //CWP should be set directly so that it always happens 903 //Also, this will allow writing to the new window and 904 //reading from the old one 905 Cwp = (Cwp - 1 + NWindows) % NWindows; 906 Cansave = Cansave + 1; --- 37 unchanged lines hidden (view full) --- 944 0x3B: Nop::flush({{/*Instruction memory flush*/}}); 945 0x3C: save({{ 946 //CWP should be set directly so that it always happens 947 //Also, this will allow writing to the new window and 948 //reading from the old one 949 if(Cansave == 0) 950 { 951 if(Otherwin) |
952 fault = new SpillNOther(4*Wstate<5:3>); | 952 fault = new SpillNOther(Wstate<5:3>); |
953 else | 953 else |
954 fault = new SpillNNormal(4*Wstate<2:0>); | 954 fault = new SpillNNormal(Wstate<2:0>); |
955 //Cwp = (Cwp + 2) % NWindows; 956 } 957 else if(Cleanwin - Canrestore == 0) 958 { 959 //Cwp = (Cwp + 1) % NWindows; 960 fault = new CleanWindow; 961 } 962 else --- 7 unchanged lines hidden (view full) --- 970 //are written in the new window as well. 971 xc->setMiscRegWithEffect(MISCREG_CWP, Cwp); 972 } 973 }}); 974 0x3D: restore({{ 975 if(Canrestore == 0) 976 { 977 if(Otherwin) | 955 //Cwp = (Cwp + 2) % NWindows; 956 } 957 else if(Cleanwin - Canrestore == 0) 958 { 959 //Cwp = (Cwp + 1) % NWindows; 960 fault = new CleanWindow; 961 } 962 else --- 7 unchanged lines hidden (view full) --- 970 //are written in the new window as well. 971 xc->setMiscRegWithEffect(MISCREG_CWP, Cwp); 972 } 973 }}); 974 0x3D: restore({{ 975 if(Canrestore == 0) 976 { 977 if(Otherwin) |
978 fault = new FillNOther(4*Wstate<5:3>); | 978 fault = new FillNOther(Wstate<5:3>); |
979 else | 979 else |
980 fault = new FillNNormal(4*Wstate<2:0>); | 980 fault = new FillNNormal(Wstate<2:0>); |
981 } 982 else 983 { 984 //CWP should be set directly so that it always happens 985 //Also, this will allow writing to the new window and 986 //reading from the old one 987 Cwp = (Cwp - 1 + NWindows) % NWindows; 988 Rd = Rs1 + Rs2_or_imm13; --- 323 unchanged lines hidden --- | 981 } 982 else 983 { 984 //CWP should be set directly so that it always happens 985 //Also, this will allow writing to the new window and 986 //reading from the old one 987 Cwp = (Cwp - 1 + NWindows) % NWindows; 988 Rd = Rs1 + Rs2_or_imm13; --- 323 unchanged lines hidden --- |