@@ -11,7 +11,6 @@ define token instr (16)
1111 o8 = (4,11) signed
1212 u4 = (4,7)
1313 i4 = (4,7)
14- o4 = (4,7) signed
1514 rj = (4,7)
1615 rs4_4 = (4,7)
1716
@@ -21,8 +20,6 @@ define token instr (16)
2120 rel8 = (0,7) signed
2221 dir8 = (0,7)
2322 rlist = (0,7)
24- rlist_lo = (0,7)
25- rlist_hi = (0,7)
2623
2724 ri = (0,3)
2825 rs = (0,3)
@@ -595,8 +592,8 @@ DIR8B_REL: reloc is dir8 [ reloc = dir8 * 1; ] {
595592 *:4 (FP + o8_imm) = ri;
596593}
597594
598- :ST ri, @(SP, o4_imm ) is op8=0x13 & o4 & ri & SP [ o4_imm = o4 * 4; ] {
599- *:4 (SP + o4_imm ) = ri;
595+ :ST ri, @(SP, u4_imm ) is op8=0x13 & u4 & ri & SP [ u4_imm = u4 * 4; ] {
596+ *:4 (SP + u4_imm ) = ri;
600597}
601598
602599:ST ri @-SP is op12=0x170 & ri & SP {
@@ -776,13 +773,13 @@ DIR8B_REL: reloc is dir8 [ reloc = dir8 * 1; ] {
776773}
777774
778775:CALL_D REL_SEXT11 is op5=0x1b & REL_SEXT11 {
779- RP = inst_next + 2 ;
776+ RP = inst_next;
780777 delayslot(1);
781778 call REL_SEXT11;
782779}
783780
784781:CALL_D @ri is op12=0x9f1 & ri {
785- RP = inst_next + 2 ;
782+ RP = inst_next;
786783 delayslot(1);
787784 call [ri];
788785}
@@ -802,73 +799,87 @@ DIR8B_REL: reloc is dir8 [ reloc = dir8 * 1; ] {
802799}
803800
804801:BEQ_D REL is op4=0xf & cc=0x2 & REL {
802+ local t = Z == 1;
805803 delayslot(1);
806- if (Z == 1 ) goto REL;
804+ if (t ) goto REL;
807805}
808806
809807:BNE_D REL is op4=0xf & cc=0x3 & REL {
808+ local t = Z == 0;
810809 delayslot(1);
811- if (Z == 0 ) goto REL;
810+ if (t ) goto REL;
812811}
813812
814813:BC_D REL is op4=0xf & cc=0x4 & REL {
814+ local t = C == 1;
815815 delayslot(1);
816- if (C == 1 ) goto REL;
816+ if (t ) goto REL;
817817}
818818
819819:BNC_D REL is op4=0xf & cc=0x5 & REL {
820+ local t = C == 0;
820821 delayslot(1);
821- if (C == 0 ) goto REL;
822+ if (t ) goto REL;
822823}
823824
824825:BN_D REL is op4=0xf & cc=0x6 & REL {
826+ local t = N == 1;
825827 delayslot(1);
826- if (N == 1 ) goto REL;
828+ if (t ) goto REL;
827829}
828830
829831:BP_D REL is op4=0xf & cc=0x7 & REL {
832+ local t = N == 0;
830833 delayslot(1);
831- if (N == 0 ) goto REL;
834+ if (t ) goto REL;
832835}
833836
834837:BV_D REL is op4=0xf & cc=0x8 & REL {
838+ local t = V == 1;
835839 delayslot(1);
836- if (V == 1 ) goto REL;
840+ if (t ) goto REL;
837841}
838842
839843:BNV_D REL is op4=0xf & cc=0x9 & REL {
844+ local t = V == 0;
840845 delayslot(1);
841- if (V == 0 ) goto REL;
846+ if (t ) goto REL;
842847}
843848
844849:BLT_D REL is op4=0xf & cc=0xa & REL {
850+ local t = (V ^ N) == 1;
845851 delayslot(1);
846- if ((V ^ N) == 1 ) goto REL;
852+ if (t ) goto REL;
847853}
848854
849855:BGE_D REL is op4=0xf & cc=0xb & REL {
856+ local t = (V ^ N) == 0;
850857 delayslot(1);
851- if ((V ^ N) == 0 ) goto REL;
858+ if (t ) goto REL;
852859}
853860
854861:BLE_D REL is op4=0xf & cc=0xc & REL {
862+ local t = ((V ^ N) | Z) == 1;
855863 delayslot(1);
856- if (((V ^ N) | Z) == 1 ) goto REL;
864+ if (t ) goto REL;
857865}
858866
859867:BGT_D REL is op4=0xf & cc=0xd & REL {
868+ local t = ((V ^ N) | Z) == 0;
860869 delayslot(1);
861- if (((V ^ N) | Z) == 0 ) goto REL;
870+ if (t ) goto REL;
862871}
863872
864873:BLS_D REL is op4=0xf & cc=0xe & REL {
874+ local t = (C | Z) == 1;
865875 delayslot(1);
866- if ((C | Z) == 1 ) goto REL;
876+ if (t ) goto REL;
867877}
868878
869879:BHI_D REL is op4=0xf & cc=0xf & REL {
880+ local t = (C | Z) == 0;
870881 delayslot(1);
871- if ((C | Z) == 0 ) goto REL;
882+ if (t ) goto REL;
872883}
873884
874885# ====
@@ -1019,9 +1030,8 @@ DIR8B_REL: reloc is dir8 [ reloc = dir8 * 1; ] {
10191030}
10201031
10211032:LEAVE is op16=0x9f90 {
1022- local pointer:4 = SP - 4;
10231033 SP = FP + 4;
1024- FP = *:4 pointer ;
1034+ FP = *:4 (SP - 4) ;
10251035}
10261036
10271037# ====
0 commit comments