Deleted Added
sdiff udiff text old ( 3587:841cf134f321 ) new ( 3598:cf3d84886c9f )
full compact
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

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

36decode OP default Unknown::unknown()
37{
38 0x0: decode OP2
39 {
40 //Throw an illegal instruction acception
41 0x0: Trap::illtrap({{fault = new IllegalInstruction;}});
42 format BranchN
43 {
44 0x1: decode COND2
45 {
46 //Branch Always
47 0x8: decode A
48 {
49 0x0: b(19, {{
50 NNPC = xc->readPC() + disp;
51 }});
52 0x1: b(19, {{
53 NPC = xc->readPC() + disp;
54 NNPC = NPC + 4;
55 }}, ',a');
56 }
57 //Branch Never
58 0x0: decode A
59 {
60 0x0: bn(19, {{
61 NNPC = NNPC;//Don't do anything
62 }});
63 0x1: bn(19, {{
64 NPC = xc->readNextPC() + 4;
65 NNPC = NPC + 4;
66 }}, ',a');
67 }
68 default: decode BPCC
69 {
70 0x0: bpcci(19, {{
71 if(passesCondition(Ccr<3:0>, COND2))

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

76 0x2: bpccx(19, {{
77 if(passesCondition(Ccr<7:4>, COND2))
78 NNPC = xc->readPC() + disp;
79 else
80 handle_annul
81 }});
82 }
83 }
84 0x2: bicc(22, {{
85 if(passesCondition(Ccr<3:0>, COND2))
86 NNPC = xc->readPC() + disp;
87 else
88 handle_annul
89 }});
90 }
91 0x3: decode RCOND2
92 {
93 format BranchSplit
94 {
95 0x1: bpreq({{
96 if(Rs1.sdw == 0)
97 NNPC = xc->readPC() + disp;

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

375 else
376 fault = new FpDisabled;
377 }});
378 //0x14-0x15 should cause an illegal instruction exception
379 0x16: Priv::rdsoftint({{Rd = Softint;}});
380 0x17: Priv::rdtick_cmpr({{Rd = TickCmpr;}});
381 0x18: PrivCheck::rdstick({{Rd = Stick}}, {{Stick<63:>}});
382 0x19: Priv::rdstick_cmpr({{Rd = StickCmpr;}});
383 //0x1A-0x1F should cause an illegal instruction exception
384 }
385 0x29: decode RS1 {
386 0x00: HPriv::rdhprhpstate({{Rd = Hpstate;}});
387 0x01: HPriv::rdhprhtstate({{
388 if(Tl == 0)
389 return new IllegalInstruction;
390 Rd = Htstate;
391 }});

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

510 0x16: Priv::wrsoftint({{Softint = Rs1 ^ Rs2_or_imm13;}});
511 0x17: Priv::wrtick_cmpr({{TickCmpr = Rs1 ^ Rs2_or_imm13;}});
512 0x18: NoPriv::wrstick({{
513 if(!Hpstate<2:>)
514 return new IllegalInstruction;
515 Stick = Rs1 ^ Rs2_or_imm13;
516 }});
517 0x19: Priv::wrstick_cmpr({{StickCmpr = Rs1 ^ Rs2_or_imm13;}});
518 //0x1A-0x1F should cause an illegal instruction exception
519 }
520 0x31: decode FCN {
521 0x0: Priv::saved({{
522 assert(Cansave < NWindows - 2);
523 assert(Otherwin || Canrestore);
524 Cansave = Cansave + 1;
525 if(Otherwin == 0)
526 Canrestore = Canrestore - 1;
527 else
528 Otherwin = Otherwin - 1;
529 }});
530 0x1: BasicOperate::restored({{
531 assert(Cansave || Otherwin);
532 assert(Canrestore < NWindows - 2);
533 Canrestore = Canrestore + 1;
534 if(Otherwin == 0)
535 Cansave = Cansave - 1;
536 else
537 Otherwin = Otherwin - 1;
538 }});

--- 705 unchanged lines hidden ---