From cc5d2bbeab64da461cc6cc42cd4fe0ff51024e7f Mon Sep 17 00:00:00 2001 From: yhp19 Date: Wed, 16 Dec 2020 00:57:46 +0800 Subject: [PATCH 1/2] changes to input files --- .DS_Store | Bin 0 -> 10244 bytes inputs/.DS_Store | Bin 0 -> 12292 bytes inputs/addu/addu-1.ref.txt | 2 +- inputs/addu/addu-1.txt | 10 +- inputs/and/and-1.ref.txt | 2 +- inputs/and/and-1.txt | 6 +- inputs/andi/andi-1.ref.txt | 2 +- inputs/andi/andi-1.txt | 9 +- inputs/div/div-1.txt | 9 +- inputs/divu/divu-1.ref.txt | 1 + inputs/divu/divu-1.txt | 7 +- inputs/j/j-1.ref.txt | 2 +- inputs/j/j-1.txt | 11 +- inputs/jalr/jalr-1.txt | 2 +- inputs/jr/jr-1.ref.txt | 2 +- inputs/jr/jr-1.txt | 4 +- inputs/lwl/lwl-1.txt | 2 +- inputs/lwr/lwr-1.txt | 4 +- inputs/mfhi/mfhi-1.ref.txt | 1 - inputs/mfhi/mfhi-1.txt | 4 - inputs/mflo/mflo-1.ref.txt | 1 - inputs/mflo/mflo-1.txt | 5 - inputs/mthi/mthi-1.txt | 1 + inputs/mtlo/mtlo-1.ref.txt | 1 + inputs/mtlo/mtlo-1.txt | 1 + inputs/multcurrent/multcurrent-1.txt | 4 - inputs/multucurrent/multucurrent-1.txt | 4 - inputs/ori/ori-1.ref.txt | 2 +- inputs/ori/ori-1.txt | 9 +- inputs/sb/sb-1.ref.txt | 1 + inputs/sb/sb-1.txt | 9 +- inputs/sh/sh-1.ref.txt | 1 + inputs/sh/sh-1.txt | 7 + inputs/slt/.DS_Store | Bin 0 -> 6148 bytes inputs/slt/slt-1.ref.txt | 2 +- reference/ibrahimreference.txt | 483 ------------------------- reference/reference.txt | 15 +- 37 files changed, 66 insertions(+), 560 deletions(-) create mode 100644 .DS_Store create mode 100644 inputs/.DS_Store create mode 100644 inputs/divu/divu-1.ref.txt delete mode 100644 inputs/mfhi/mfhi-1.ref.txt delete mode 100644 inputs/mfhi/mfhi-1.txt delete mode 100644 inputs/mflo/mflo-1.ref.txt delete mode 100644 inputs/mflo/mflo-1.txt create mode 100644 inputs/mtlo/mtlo-1.ref.txt delete mode 100644 inputs/multcurrent/multcurrent-1.txt delete mode 100644 inputs/multucurrent/multucurrent-1.txt create mode 100644 inputs/sb/sb-1.ref.txt create mode 100644 inputs/sh/sh-1.ref.txt create mode 100644 inputs/slt/.DS_Store delete mode 100644 reference/ibrahimreference.txt diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..e50ca118ffd096221b74ac9b84046ff90c35c9c6 GIT binary patch literal 10244 zcmeHMZ)_aJ6@Tx1nB9$oH*tb>tR9on^LSpsoS(XxkCQTB_ z9|kO^RJ5ETmDOd|u_8twMj%EYMj%EYM&Rp!0R3jOB&`xMe#Z#J2*e01BEZ&%3_VQd z0=Xb0UpnZ;j{qc-q~?k8eCtm#!xSWQfm{%hG?Y-dk`%5O95FCBIiPT-`dnbYAf#{y zR_(FvHCOb3(@N7=ajpWV|FyI_LrHJ$M%bWwd(3wr-W-!5q3RJ-duYY)`yXyHa4|*IlC{x&oO=Ba-zP|no z8{!pby-IK!@rPo?GCjY$`#nrFB`<5fT#^(?S*@HY%s8_JU-PS8UUN^e(varQ6odQ- z^>Hz;6;GPR?4-J`$FY6Qv<;U#o4P?Jr$8rywdMNtWbEb;J4dd-m_@ z%X#cC?h^>_kIhz|2I+=cqHp2nvhasY% z5BI=>@D#iNufUt|F?j=XOiFDc4I6&6)&O*s4 zS491$50}+@wH`s=rsi+}-^YNyG=Qm-qhrd7NKL9yAVy1$RV~}zq`Ic0S*5C_`Nm<( zVyJnGqdMU^u1_OHhIN>#RnHhU$ib``z2xSpC_mS-KK;!t+q{=3DYH4NzF=Q z)uMS@)%52?6RFH5SyEp-t-S=6wECc5aMk2Sml@5UeFPw-xR03XH2@Ns++FW}4gOZ*l74&THN z@gw{gKfyoZMf?Z;Gm%WRCpIKfiH<}zu{FVF2&KgtG$G32JF$y$4NIKmg-cxG%t|vP z-S@rz|IrNjKrF9oX>GkayLHDdnkkFC5ljooRZm*Z(*|~Pp7Nnxfncc)<*M`vBC>IA zY1)Ws6izDjaz+DtST#ck>BX*EH!OBB1(-HO^ob4TXB za(cTWiR@lwpQ0vd4vFFc<)ESh&1zB1rSoZ(O^APknoq*BaDk}#3Q_YtBIT#>1zdzL zQN~tm#}sy8nikw^aT{KTowx({;y&EZso979cm!|6qc}pu9K~^*AY$rhpp6y0jni`; ze}D^kC;pJ=c^}@7Kf|BnFYpn30-q5STO{5}k@opOrN*K)WT6evn++F_lP~v~OdYF4}@w zB+o_mM;FPfet*kJv}skzpA6 z;4t)(Umy9DL2vX(us+p)nM{2$V2U0lZR(xT=#l(s#G{EUeXts>67Q~T6>gIljDceW z+|>lf60lYN84Mg7rW>1R>WMUwBtL_BN9-mD`|AJyFBK-Pj}eFw_&-Jflf8xBJar(vyNLFM-L+@vIZF>q z%x*zQ?m{nq9Z!;9$5Vk_$McgZ>4GyU_sfx<`7a1bIZFTaKLg_Pe|-LD_l-+eh5z9j JvakR7|6g}L_*(z~ literal 0 HcmV?d00001 diff --git a/inputs/.DS_Store b/inputs/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2fef42f62f02268eeda45b1f2c43c79252ee41a4 GIT binary patch literal 12292 zcmeI2&x;&Y5XWEd%u2w3K@fu)XxIcqP?Cd6L}6Uk_yaV^21F2a*WK)7Ge6eJ%&Z2H z(HIdg-o@Pg0fB%w1$Eh66%i34_y_pK#{D42bmS@BrR8KcoTO@MRqXoK#{!9pG|nA#ss>s(7GAUalIvw(Gkw z^b~#O?uH0ilgx|PnJM&0we*x*!lA>ldv2&QdzaKC_nE!#R^!2Q!B$3V=_!|1d$gUv znHwwa1A$AL61D}5UN#5a6BWr{|AG0z zPDYxmsShO_6vig;+*FN`LsFB>ovX}bTS>KagX{g(Bh#-T=+Rg*cmHB$u#?1Gt>>w1 z`v}HaAI5yMCOtWQ$N4xjk)OEQ#eQt*hBxz+b>L<*!~q}+RkFW4#O$O+q}weFeifU( z7Q+0qCfQFv!fc^OvZWhbJbNRzV)V73Nak0^naOG-=BmL%UxAnP?)yWWq)FxU0=DvOtzKh(b5erq^{YT42TRo0pGv{029o`E_?s`uaZ&zLkJ^EznhDU6x{AmGm;MP=@@ER&8 zGDH26ePK0vlB+d-056*-{JKWIr1QjM4>J>EAX_<4Sh~S&!Cb%YUQ==UJ62L;oC_zI z8SEr6R}EepcpE@GtBBY;S(D5IQ)UW1X4ldU?kyD;a-~;sj5g6F|FcWXS8bvXb!`kk zd<^3(e*6`QHOXJR%zU9owx!o_dpF2CX_7nmIpGF9axJ}s>#Fm zr}Vv_zY8Np@@{)n@PZnn%vFQeruVg`*@Uo#lT)06v;XEK66-&tXwsCZO_Yo<#`c^tV!nekC-X+ zNUd~wKW`pGf_MM$`9H)^_x>L>YCf6_G#U7RW}s*gjPj{7(;DLR}}6GhdP^9Dq!rBvUB;ll=eeMSy1g-@^RE)~x?G H@%sNSfe9EL literal 0 HcmV?d00001 diff --git a/inputs/addu/addu-1.ref.txt b/inputs/addu/addu-1.ref.txt index 054a1f3..301160a 100644 --- a/inputs/addu/addu-1.ref.txt +++ b/inputs/addu/addu-1.ref.txt @@ -1 +1 @@ -4294963199 \ No newline at end of file +8 \ No newline at end of file diff --git a/inputs/addu/addu-1.txt b/inputs/addu/addu-1.txt index 176ff1d..1c079df 100644 --- a/inputs/addu/addu-1.txt +++ b/inputs/addu/addu-1.txt @@ -1,8 +1,4 @@ -3404FFFF -3405F000 +34040003 +34050005 00851021 -00000008 -00000000 -00000000 -00000000 -00000000 \ No newline at end of file +00000008 \ No newline at end of file diff --git a/inputs/and/and-1.ref.txt b/inputs/and/and-1.ref.txt index 9a03714..a97788c 100644 --- a/inputs/and/and-1.ref.txt +++ b/inputs/and/and-1.ref.txt @@ -1 +1 @@ -10 \ No newline at end of file +2290649224 \ No newline at end of file diff --git a/inputs/and/and-1.txt b/inputs/and/and-1.txt index 24529d7..26f7011 100644 --- a/inputs/and/and-1.txt +++ b/inputs/and/and-1.txt @@ -1,4 +1,6 @@ -3404000A -3405000F +3c05cccc +3405cccc +3c04aaaa +3404aaaa 00851024 00000008 \ No newline at end of file diff --git a/inputs/andi/andi-1.ref.txt b/inputs/andi/andi-1.ref.txt index 7813681..6981cd9 100644 --- a/inputs/andi/andi-1.ref.txt +++ b/inputs/andi/andi-1.ref.txt @@ -1 +1 @@ -5 \ No newline at end of file +34952 \ No newline at end of file diff --git a/inputs/andi/andi-1.txt b/inputs/andi/andi-1.txt index 74b3184..ccc9aa9 100644 --- a/inputs/andi/andi-1.txt +++ b/inputs/andi/andi-1.txt @@ -1,5 +1,4 @@ -34040005 -3082000f -00000008 -00000000 -00000000 \ No newline at end of file +3c04aaaa +3404aaaa +3082cccc +00000008 \ No newline at end of file diff --git a/inputs/div/div-1.txt b/inputs/div/div-1.txt index 6dcc0f5..5753c5a 100644 --- a/inputs/div/div-1.txt +++ b/inputs/div/div-1.txt @@ -1,4 +1,7 @@ -34040004 -34050003 -0085001A +34040003 +34050009 +00A4001A +00002010 +00002812 +00851021 00000008 \ No newline at end of file diff --git a/inputs/divu/divu-1.ref.txt b/inputs/divu/divu-1.ref.txt new file mode 100644 index 0000000..bff4927 --- /dev/null +++ b/inputs/divu/divu-1.ref.txt @@ -0,0 +1 @@ +1073741824 \ No newline at end of file diff --git a/inputs/divu/divu-1.txt b/inputs/divu/divu-1.txt index 039725b..71c00bc 100644 --- a/inputs/divu/divu-1.txt +++ b/inputs/divu/divu-1.txt @@ -1,4 +1,7 @@ -34040004 -34050003 +34048000 +34050002 0085001B +00002010 +00002812 +00851021 00000008 \ No newline at end of file diff --git a/inputs/j/j-1.ref.txt b/inputs/j/j-1.ref.txt index c793025..56a6051 100644 --- a/inputs/j/j-1.ref.txt +++ b/inputs/j/j-1.ref.txt @@ -1 +1 @@ -7 \ No newline at end of file +1 \ No newline at end of file diff --git a/inputs/j/j-1.txt b/inputs/j/j-1.txt index 8955259..0043747 100644 --- a/inputs/j/j-1.txt +++ b/inputs/j/j-1.txt @@ -1,11 +1,6 @@ -083F0004 +08000004 00000000 -00000000 -00000000 -00000000 - 00000008 00000000 -34020007 -00000008 - +34020001 +00000008 \ No newline at end of file diff --git a/inputs/jalr/jalr-1.txt b/inputs/jalr/jalr-1.txt index e4e33a8..fc2bb83 100644 --- a/inputs/jalr/jalr-1.txt +++ b/inputs/jalr/jalr-1.txt @@ -1,5 +1,5 @@ -3405001C 3C05BCF0 +3405001C 00A02009 00000000 24420001 diff --git a/inputs/jr/jr-1.ref.txt b/inputs/jr/jr-1.ref.txt index 19c7bdb..56a6051 100644 --- a/inputs/jr/jr-1.ref.txt +++ b/inputs/jr/jr-1.ref.txt @@ -1 +1 @@ -16 \ No newline at end of file +1 \ No newline at end of file diff --git a/inputs/jr/jr-1.txt b/inputs/jr/jr-1.txt index 88a1c8f..010289b 100644 --- a/inputs/jr/jr-1.txt +++ b/inputs/jr/jr-1.txt @@ -1,7 +1,7 @@ 3C05BFC0 -34A50014 +34050014 00A00008 00000000 00000008 -34020010 +34020001 00000008 diff --git a/inputs/lwl/lwl-1.txt b/inputs/lwl/lwl-1.txt index c682e96..a62ec0b 100644 --- a/inputs/lwl/lwl-1.txt +++ b/inputs/lwl/lwl-1.txt @@ -1,4 +1,4 @@ -34041001 +34041003 34025678 88820003 00000008 \ No newline at end of file diff --git a/inputs/lwr/lwr-1.txt b/inputs/lwr/lwr-1.txt index cea76c4..633db20 100644 --- a/inputs/lwr/lwr-1.txt +++ b/inputs/lwr/lwr-1.txt @@ -1,4 +1,4 @@ -34041002 3C021234 -98820002 +34041002 +98820003 00000008 \ No newline at end of file diff --git a/inputs/mfhi/mfhi-1.ref.txt b/inputs/mfhi/mfhi-1.ref.txt deleted file mode 100644 index e440e5c..0000000 --- a/inputs/mfhi/mfhi-1.ref.txt +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/inputs/mfhi/mfhi-1.txt b/inputs/mfhi/mfhi-1.txt deleted file mode 100644 index fd75215..0000000 --- a/inputs/mfhi/mfhi-1.txt +++ /dev/null @@ -1,4 +0,0 @@ -34040003 -00800011 -00001010 -00000008 \ No newline at end of file diff --git a/inputs/mflo/mflo-1.ref.txt b/inputs/mflo/mflo-1.ref.txt deleted file mode 100644 index 3cacc0b..0000000 --- a/inputs/mflo/mflo-1.ref.txt +++ /dev/null @@ -1 +0,0 @@ -12 \ No newline at end of file diff --git a/inputs/mflo/mflo-1.txt b/inputs/mflo/mflo-1.txt deleted file mode 100644 index db18ff6..0000000 --- a/inputs/mflo/mflo-1.txt +++ /dev/null @@ -1,5 +0,0 @@ -34040004 -34050003 -00850019 -00001012 -00000008 diff --git a/inputs/mthi/mthi-1.txt b/inputs/mthi/mthi-1.txt index a8cc125..d3675d4 100644 --- a/inputs/mthi/mthi-1.txt +++ b/inputs/mthi/mthi-1.txt @@ -1,3 +1,4 @@ 34040005 00800011 +00001010 00000008 \ No newline at end of file diff --git a/inputs/mtlo/mtlo-1.ref.txt b/inputs/mtlo/mtlo-1.ref.txt new file mode 100644 index 0000000..7813681 --- /dev/null +++ b/inputs/mtlo/mtlo-1.ref.txt @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/inputs/mtlo/mtlo-1.txt b/inputs/mtlo/mtlo-1.txt index dc818bc..92e658f 100644 --- a/inputs/mtlo/mtlo-1.txt +++ b/inputs/mtlo/mtlo-1.txt @@ -1,3 +1,4 @@ 34040005 00800013 +00001012 00000008 \ No newline at end of file diff --git a/inputs/multcurrent/multcurrent-1.txt b/inputs/multcurrent/multcurrent-1.txt deleted file mode 100644 index 38f4bf0..0000000 --- a/inputs/multcurrent/multcurrent-1.txt +++ /dev/null @@ -1,4 +0,0 @@ -34040004 -34050003 -00850018 -00000008 \ No newline at end of file diff --git a/inputs/multucurrent/multucurrent-1.txt b/inputs/multucurrent/multucurrent-1.txt deleted file mode 100644 index 7f898e1..0000000 --- a/inputs/multucurrent/multucurrent-1.txt +++ /dev/null @@ -1,4 +0,0 @@ -34040004 -34050003 -00850019 -00000008 \ No newline at end of file diff --git a/inputs/ori/ori-1.ref.txt b/inputs/ori/ori-1.ref.txt index 301160a..c793025 100644 --- a/inputs/ori/ori-1.ref.txt +++ b/inputs/ori/ori-1.ref.txt @@ -1 +1 @@ -8 \ No newline at end of file +7 \ No newline at end of file diff --git a/inputs/ori/ori-1.txt b/inputs/ori/ori-1.txt index 3cc3faa..43a087f 100644 --- a/inputs/ori/ori-1.txt +++ b/inputs/ori/ori-1.txt @@ -1,8 +1,3 @@ +34020003 00000008 -34020008 -00000000 -00000000 -00000000 -00000000 -00000000 -00000000 \ No newline at end of file +34020005 \ No newline at end of file diff --git a/inputs/sb/sb-1.ref.txt b/inputs/sb/sb-1.ref.txt new file mode 100644 index 0000000..8bc6583 --- /dev/null +++ b/inputs/sb/sb-1.ref.txt @@ -0,0 +1 @@ +120 \ No newline at end of file diff --git a/inputs/sb/sb-1.txt b/inputs/sb/sb-1.txt index 01cfb59..a2e8fd6 100644 --- a/inputs/sb/sb-1.txt +++ b/inputs/sb/sb-1.txt @@ -1,4 +1,7 @@ -34040405 -34050001 -a0a40001 +3C041234 +34045678 +3C05BFC0 +3405001C +A0A40000 +80A20000 00000008 \ No newline at end of file diff --git a/inputs/sh/sh-1.ref.txt b/inputs/sh/sh-1.ref.txt new file mode 100644 index 0000000..2bb616a --- /dev/null +++ b/inputs/sh/sh-1.ref.txt @@ -0,0 +1 @@ +22136 \ No newline at end of file diff --git a/inputs/sh/sh-1.txt b/inputs/sh/sh-1.txt index e69de29..17b333d 100644 --- a/inputs/sh/sh-1.txt +++ b/inputs/sh/sh-1.txt @@ -0,0 +1,7 @@ +3C041234 +34045678 +3C05BFC0 +3405001C +A4A40000 +84A40000 +00000008 \ No newline at end of file diff --git a/inputs/slt/.DS_Store b/inputs/slt/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a6c4cc6f92295ade9b56455a8c59adcac3f19c76 GIT binary patch literal 6148 zcmeHKIZgvX5Ud6VMhM9v;d}r~{=s0`fnz>knIl@s5?&<2&HNlc5vmU?FAEY80dz~< zHAmOXZUxgb0A&91Fast4#&kvOH4IJX)dzMKBZ^{c%rM0>9`Qu{nJM=QJ2YrawHRAbxT62uby8rV5lBvwmZj*r9-M?##A5`=qqsU-HF!!CH>a; -} - -ori $4,$0,2 -ori $5,$0,16 -srlv $2,$5,$4 -jr $0 - -register 0 = 3 - -34040002 -34050010 -////// -////// - -=============== SRL Shift right logical ============== - - -int main(void) { - int a = -2147483647>>2; #logical shift - should feed in 0s -} - -ori $4,$0,-2147483647 -srl $2,$4,$2 -jr $0 - -register 0 = 536870912 (2^29) - -34040001 -00041002 -00000008 - -========== SRAV Shift right arithmetic variable ======= - -int main(void) { - int a = 2; - int b = -2147483647>>2; #arithemtic shift not logical - feed in 1s (sign extension) -} - -ori $4, $0, 4 -ori $5,$0,0xF000 -srav $2,$5,$4 -SRAv $v0 $a1 $a0 -jr $0 - -register 0 = -536870912 (first 3 bits high - rest low) - -34040004 -3405F000 - -//////// -/////// - -====== SRA Shift right arithmetic ========== - -int main(void) { - int a = -2147483647>>2; #arithemtic shift not logical - feed in 1s (sign extension) -} - - -ori $4,$0,-2147483647 -sra $2,$4,$2 -jr $0 - -register 0 = -536870912 (first 3 bits high - rest low) - -34040001 -00041003 -00000008 - -======= SLTU Set on less than unsigned ===== - -int main() { - int a = 10; - int b = 9; - - max = a < b ? 1 : 0; - - return max; -} - - -ori $4, $0, 10 -ori $5, $0, 9 -sltu $2, $4, $5 -jr $0 - -register 0 = 0 - -3404000a -34050009 -0085102b -00000008 - -=========== SLTIU Set on less than immediate unsigned ================== - -int main() { - int a = 10; - - max = a < 9 ? 1 : 0; - - return max; -} - - -ori $4, $0, 10 -sltiu $2, $4, 9 -jr $0 - -register 0 = 0 - -3404000a -2c820009 -00000008 - -======= SLTI Set on less than immediate (signed) ======== - -int main() { - int a = 10; - - max = a < 9 ? 1 : 0; - - return max; -} - - -ori $4, $0, 10 -slti $2, $4, 9 -jr $0 - -register 0 = 0 - -3404000a -28820009 -00000008 - - - -======= SLLV Shift left logical variable ====== - - -int main(void) { - int a = 2; - int b = 3< Date: Wed, 16 Dec 2020 01:00:03 +0800 Subject: [PATCH 2/2] reference txt --- .DS_Store | Bin 10244 -> 10244 bytes reference/reference.txt => reference.txt | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename reference/reference.txt => reference.txt (100%) diff --git a/.DS_Store b/.DS_Store index e50ca118ffd096221b74ac9b84046ff90c35c9c6..8fdd269299e733eec7e0deb1df2a8c2e5ba52005 100644 GIT binary patch delta 32 ocmZn(XbG6$&nUAoU^hRb%w`^ecCO7wrJPtNHW+PYSNO{g0JS*^=Kufz delta 65 zcmZn(XbG6$&nUYwU^hRb>}DQ;b}nU3h9ZVkhBP1s(RmEX45^+u`N>H+`AG~63<3-c REWMjsqykwtvn%{%2LL~R5f%Ud diff --git a/reference/reference.txt b/reference.txt similarity index 100% rename from reference/reference.txt rename to reference.txt