diff options
-rw-r--r-- | notes/todo | 94 | ||||
-rw-r--r-- | src/display.rs | 7 | ||||
-rw-r--r-- | src/lib.rs | 32 | ||||
-rw-r--r-- | tests/from_brain.rs | 9 |
4 files changed, 95 insertions, 47 deletions
@@ -338,9 +338,9 @@ test |0 1 0 0|1 i i 0 1 1 0|i i i i i| P P |i t t t t t i i i|i i i i i| memd(gp |0 1 1 0|0 0 0 1 0 0 i|s s s s s| P P |i 0 i i i i i i i|i i i i -| if (Rs!=#0) jump:nt #r13:2 - J/slot 3 |0 1 1 0|0 0 0 1 0 0 i|s s s s s| P P |i 1 i i i i i i i|i i i i -| if (Rs!=#0) jump:t #r13:2 - J/slot 3 |0 1 1 0|0 0 0 1 0 1 i|s s s s s| P P |i 0 i i i i i i i|i i i i -| if (Rs==#0) jump:nt #r13:2 - J/slot 3 -|0 1 1 0|0 0 0 1 0 1 i|s s s s s| P P |i 0 i i i i i i i|i i i i -| if (Rs>=#0) jump:nt #r13:2 - J/slot 3 +|0 1 1 0|0 0 0 1 0 1 i|s s s s s| P P |i 0 i i i i i i i|i i i i -| if (Rs>=#0) jump:nt #r13:2 - J/slot 3 # TODO: probably transcription error |0 1 1 0|0 0 0 1 0 1 i|s s s s s| P P |i 1 i i i i i i i|i i i i -| if (Rs==#0) jump:t #r13:2 - J/slot 3 -|0 1 1 0|0 0 0 1 0 1 i|s s s s s| P P |i 1 i i i i i i i|i i i i -| if (Rs>=#0) jump:t #r13:2 - J/slot 3 +|0 1 1 0|0 0 0 1 0 1 i|s s s s s| P P |i 1 i i i i i i i|i i i i -| if (Rs>=#0) jump:t #r13:2 - J/slot 3 # TODO: probably transcription error |0 1 1 0|0 0 0 1 1 1 i|s s s s s| P P |i 0 i i i i i i i|i i i i -| if (Rs<=#0) jump:nt #r13:2 - J/slot 3 |0 1 1 0|0 0 0 1 1 1 i|s s s s s| P P |i 1 i i i i i i i|i i i i -| if (Rs<=#0) jump:t #r13:2 - J/slot 3 @@ -640,101 +640,101 @@ test |0 1 0 0|1 i i 0 1 1 0|i i i i i| P P |i t t t t t i i i|i i i i i| memd(gp |1 0 0 1|1 0 0 0 0 0 1|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rd=membh(Rx++#s4:1:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 0 0 0 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=membh(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 0 0 1 0|x x x x x| P P |u 0 - - 0 i i i i|y y y y y| Ryy=memh_fifo(Rx++#s4:0:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 0 0 1 0|x x x x x| P P |u 0 - - 1 - 0 - -|y y y y y| Ryy=memh_fifo(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 0 0 1 1|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rd=memubh(Rx++#s4:1:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 0 0 1 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=memubh(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 0 1 0 0|x x x x x| P P |u 0 - - 0 i i i i|y y y y y| Ryy=memb_fifo(Rx++#s4:0:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 0 1 0 0|x x x x x| P P |u 0 - - 1 - 0 - -|y y y y y| Ryy=memb_fifo(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 0 1 0 1|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rdd=memubh(Rx++#s4:2:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 0 1 0 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rdd=memubh(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 0 1 1 1|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rdd=membh(Rx++#s4:2:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 0 1 1 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rdd=membh(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 1 0 0 0|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rd=memb(Rx++#s4:3:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 1 0 0 0|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=memb(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 1 0 0 1|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rdd=memub(Rx++#s4:3:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 1 0 0 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rdd=memub(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 1 0 1 0|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rd=memh(Rx++#s4:3:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 1 0 1 0|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=memh(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 1 0 1 1|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rdd=memuh(Rx++#s4:3:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 1 0 1 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rdd=memuh(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 1 1 0 0|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rd=memw(Rx++#s4:3:circ(Mu)) - LD/slot 0,1 -|1 0 0 1|1 0 0 1 1 0 0|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=memw(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 1 1 1 0|x x x x x| P P |u 0 - - 0 i i i i|d d d d d| Rdd=memd(Rx++#s4:3:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 0 0 0 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=membh(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 0 0 1 0|x x x x x| P P |u 0 - - 1 - 0 - -|y y y y y| Ryy=memh_fifo(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 0 0 1 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=memubh(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 0 1 0 0|x x x x x| P P |u 0 - - 1 - 0 - -|y y y y y| Ryy=memb_fifo(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 0 1 0 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rdd=memubh(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 0 1 1 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rdd=membh(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 1 0 0 0|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=memb(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 1 0 0 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rdd=memub(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 1 0 1 0|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=memh(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 1 0 1 1|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rdd=memuh(Rx++I:circ(Mu)) - LD/slot 0,1 +|1 0 0 1|1 0 0 1 1 0 0|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rd=memw(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 1 1 1 0|x x x x x| P P |u 0 - - 1 - 0 - -|d d d d d| Rdd=memd(Rx++I:circ(Mu)) - LD/slot 0,1 |1 0 0 1|1 0 0 1 1 1 1|t t t t t| P P |0 s s s s s 0 0 1|d d d d d| Rdd=linecpy(Rs,Rtt) - LD/slot 0,1 - Solo |1 0 0 1|1 0 0 1 1 1 1|t t t t t| P P |0 x x x x x 0 0 0|d d d d d| Rdd=pmemcpy(Rx,Rtt) - LD/slot 0,1 - Solo -|1 0 0 1|1 0 1 0 0 0 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=membh(Re=#U6) - LD/slot 0,1 |1 0 0 1|1 0 1 0 0 0 1|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rd=membh(Rx++#s:4) - LD/slot 0,1 -|1 0 0 1|1 0 1 0 0 1 0|e e e e e| P P |0 1 l l l l - l l|y y y y y| Ryy=memh_fifo(Re=#U6) - LD/slot 0,1 |1 0 0 1|1 0 1 0 0 1 0|x x x x x| P P |0 0 - - - i i i i|y y y y y| Ryy=memh_fifo(Rx++#s4:0) - LD/slot 0,1 -|1 0 0 1|1 0 1 0 0 1 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=memubh(Re=#U6) - LD/slot 0,1 |1 0 0 1|1 0 1 0 0 1 1|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rd=memubh(Rx++#s:4) - LD/slot 0,1 -|1 0 0 1|1 0 1 0 1 0 0|e e e e e| P P |0 1 l l l l - l l|y y y y y| Ryy=memb_fifo(Re=#U6) - LD/slot 0,1 |1 0 0 1|1 0 1 0 1 0 0|x x x x x| P P |0 0 - - - i i i i|y y y y y| Ryy=memb_fifo(Rx++#s4:0) - LD/slot 0,1 -|1 0 0 1|1 0 1 0 1 0 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=memubh(Re=#U6) - LD/slot 0,1 |1 0 0 1|1 0 1 0 1 0 1|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rdd=memubh(Rx++#s:4) - LD/slot 0,1 -|1 0 0 1|1 0 1 0 1 1 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=membh(Re=#U6) - LD/slot 0,1 |1 0 0 1|1 0 1 0 1 1 1|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rdd=membh(Rx++#s:4) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 0 0 0|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=memb(Re=#U6) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 0 0|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rd=memb(Rx++#s4:3) - LD/slot 0,1 +|1 0 0 1|1 0 1 0 0 0 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=membh(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 0 0 1 0|e e e e e| P P |0 1 l l l l - l l|y y y y y| Ryy=memh_fifo(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 0 0 1 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=memubh(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 0 1 0 0|e e e e e| P P |0 1 l l l l - l l|y y y y y| Ryy=memb_fifo(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 0 1 0 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=memubh(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 0 1 1 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=membh(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 0 0 1|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rdd=memub(Rx++#s4:3) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 0 1 0|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rd=memh(Rx++#s4:3) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 0 1 1|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rdd=memuh(Rx++#s4:3) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 1 0 0|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rd=memw(Rx++#s4:3) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 1 1 0|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rdd=memd(Rx++#s4:3) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 0 0 0|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=memb(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 0 0 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=memub(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 0 1 0|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=memh(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 0 1 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=memuh(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 1 0 0|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=memw(Re=#U6) - LD/slot 0,1 +|1 0 0 1|1 0 1 1 1 1 0|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=memd(Re=#U6) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 0 0|x x x x x| P P |1 0 0 t t i i i i|d d d d d| if (Pt) Rd=memb(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 0 0|x x x x x| P P |1 0 1 t t i i i i|d d d d d| if (!Pt) Rd=memb(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 0 0|x x x x x| P P |1 1 0 t t i i i i|d d d d d| if (Pt.new) Rd=memb(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 0 0|x x x x x| P P |1 1 1 t t i i i i|d d d d d| if (!Pt.new) Rd=memb(Rx++#s4:3) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 0 0 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=memub(Re=#U6) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 0 0 1|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rdd=memub(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 0 1|x x x x x| P P |1 0 0 t t i i i i|d d d d d| if (Pt) Rd=memub(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 0 1|x x x x x| P P |1 0 1 t t i i i i|d d d d d| if (!Pt) Rd=memub(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 0 1|x x x x x| P P |1 1 0 t t i i i i|d d d d d| if (Pt.new) Rd=memub(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 0 1|x x x x x| P P |1 1 1 t t i i i i|d d d d d| if (!Pt.new) Rd=memub(Rx++#s4:3) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 0 1 0|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=memh(Re=#U6) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 0 1 0|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rd=memh(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 1 0|x x x x x| P P |1 0 0 t t i i i i|d d d d d| if (Pt) Rd=memh(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 1 0|x x x x x| P P |1 0 1 t t i i i i|d d d d d| if (!Pt) Rd=memh(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 1 0|x x x x x| P P |1 1 0 t t i i i i|d d d d d| if (Pt.new) Rd=memh(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 1 0|x x x x x| P P |1 1 1 t t i i i i|d d d d d| if (!Pt.new) Rd=memh(Rx++#s4:3) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 0 1 1|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=memuh(Re=#U6) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 0 1 1|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rdd=memuh(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 1 1|x x x x x| P P |1 0 0 t t i i i i|d d d d d| if (Pt) Rd=memuh(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 1 1|x x x x x| P P |1 0 1 t t i i i i|d d d d d| if (!Pt) Rd=memuh(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 1 1|x x x x x| P P |1 1 0 t t i i i i|d d d d d| if (Pt.new) Rd=memuh(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 0 1 1|x x x x x| P P |1 1 1 t t i i i i|d d d d d| if (!Pt.new) Rd=memuh(Rx++#s4:3) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 1 0 0|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rd=memw(Re=#U6) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 1 0 0|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rd=memw(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 1 0 0|x x x x x| P P |1 0 0 t t i i i i|d d d d d| if (Pt) Rd=memw(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 1 0 0|x x x x x| P P |1 0 1 t t i i i i|d d d d d| if (!Pt) Rd=memw(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 1 0 0|x x x x x| P P |1 1 0 t t i i i i|d d d d d| if (Pt.new) Rd=memw(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 1 0 0|x x x x x| P P |1 1 1 t t i i i i|d d d d d| if (!Pt.new) Rd=memw(Rx++#s4:3) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 1 1 0|e e e e e| P P |0 1 l l l l - l l|d d d d d| Rdd=memd(Re=#U6) - LD/slot 0,1 -|1 0 0 1|1 0 1 1 1 1 0|x x x x x| P P |0 0 - - - i i i i|d d d d d| Rdd=memd(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 1 1 0|x x x x x| P P |1 0 0 t t i i i i|d d d d d| if (Pt) Rdd=memd(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 1 1 0|x x x x x| P P |1 0 1 t t i i i i|d d d d d| if (!Pt) Rdd=memd(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 1 1 0|x x x x x| P P |1 1 0 t t i i i i|d d d d d| if (Pt.new) Rdd=memd(Rx++#s4:3) - LD/slot 0,1 |1 0 0 1|1 0 1 1 1 1 0|x x x x x| P P |1 1 1 t t i i i i|d d d d d| if (!Pt.new) Rdd=memd(Rx++#s4:3) - LD/slot 0,1 -|1 0 0 1|1 1 0 0 0 0 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=membh(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 0 0 0 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=membh(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 0 0 1 0|t t t t t| P P |i 1 l l l l i l l|y y y y y| Ryy=memh_fifo(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 0 0 1 0|x x x x x| P P |u 0 - - - - 0 - -|y y y y y| Ryy=memh_fifo(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 0 0 1 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=memubh(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 0 0 1 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memubh(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 0 1 0 0|t t t t t| P P |i 1 l l l l i l l|y y y y y| Ryy=memb_fifo(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 0 1 0 0|x x x x x| P P |u 0 - - - - 0 - -|y y y y y| Ryy=memb_fifo(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 0 1 0 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rdd=memubh(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 0 1 0 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memubh(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 0 1 1 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rdd=membh(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 0 1 1 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=membh(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 1 0 0 0|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=memb(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 1 0 0 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memb(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 1 0 0 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rdd=memub(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 1 0 0 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memub(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 1 0 1 0|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=memh(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 1 0 1 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memh(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 1 0 1 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rdd=memuh(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 1 0 1 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memuh(Rx++Mu) - LD/slot 0,1 -|1 0 0 1|1 1 0 1 1 0 0|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=memw(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 1 1 0 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memw(Rx++Mu) - LD/slot 0,1 +|1 0 0 1|1 1 0 0 0 0 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=membh(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 0 0 1 0|t t t t t| P P |i 1 l l l l i l l|y y y y y| Ryy=memh_fifo(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 0 0 1 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=memubh(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 0 1 0 0|t t t t t| P P |i 1 l l l l i l l|y y y y y| Ryy=memb_fifo(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 0 1 0 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rdd=memubh(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 0 1 1 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rdd=membh(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 1 0 0 0|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=memb(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 1 0 0 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rdd=memub(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 1 0 1 0|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=memh(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 1 0 1 1|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rdd=memuh(Rt<<#u2+#U6) - LD/slot 0,1 +|1 0 0 1|1 1 0 1 1 0 0|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rd=memw(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 1 1 1 0|t t t t t| P P |i 1 l l l l i l l|d d d d d| Rdd=memd(Rt<<#u2+#U6) - LD/slot 0,1 |1 0 0 1|1 1 0 1 1 1 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memd(Rx++Mu) - LD/slot 0,1 |1 0 0 1|1 1 1 0 0 0 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=membh(Rx++Mu:brev) - LD/slot 0,1 @@ -743,36 +743,36 @@ test |0 1 0 0|1 i i 0 1 1 0|i i i i i| P P |i t t t t t i i i|i i i i i| memd(gp |1 0 0 1|1 1 1 0 1 0 0|x x x x x| P P |u 0 - - - - 0 - -|y y y y y| Ryy=memb_fifo(Rx++Mu:brev) - LD/slot 0,1 |1 0 0 1|1 1 1 0 1 0 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memubh(Rx++Mu:brev) - LD/slot 0,1 |1 0 0 1|1 1 1 0 1 1 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=membh(Rx++Mu:brev) - LD/slot 0,1 +|1 0 0 1|1 1 1 1 0 0 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memb(Rx++Mu:brev) - LD/slot 0,1 +|1 0 0 1|1 1 1 1 0 0 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memub(Rx++Mu:brev) - LD/slot 0,1 +|1 0 0 1|1 1 1 1 0 1 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memh(Rx++Mu:brev) - LD/slot 0,1 +|1 0 0 1|1 1 1 1 0 1 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memuh(Rx++Mu:brev) - LD/slot 0,1 +|1 0 0 1|1 1 1 1 1 0 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memw(Rx++Mu:brev) - LD/slot 0,1 +|1 0 0 1|1 1 1 1 1 1 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memd(Rx++Mu:brev) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 0 0|i i i i i| P P |1 0 0 t t i 1 - -|d d d d d| if (Pt) Rd=memb(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 0 0|i i i i i| P P |1 0 1 t t i 1 - -|d d d d d| if (!Pt) Rd=memb(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 0 0|i i i i i| P P |1 1 0 t t i 1 - -|d d d d d| if (Pt.new) Rd=memb(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 0 0|i i i i i| P P |1 1 1 t t i 1 - -|d d d d d| if (!Pt.new) Rd=memb(#u6) - LD/slot 0,1 -|1 0 0 1|1 1 1 1 0 0 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memb(Rx++Mu:brev) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 0 1|i i i i i| P P |1 0 0 t t i 1 - -|d d d d d| if (Pt) Rd=memub(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 0 1|i i i i i| P P |1 0 1 t t i 1 - -|d d d d d| if (!Pt) Rd=memub(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 0 1|i i i i i| P P |1 1 0 t t i 1 - -|d d d d d| if (Pt.new) Rd=memub(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 0 1|i i i i i| P P |1 1 1 t t i 1 - -|d d d d d| if (!Pt.new) Rd=memub(#u6) - LD/slot 0,1 -|1 0 0 1|1 1 1 1 0 0 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memub(Rx++Mu:brev) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 1 0|i i i i i| P P |1 0 0 t t i 1 - -|d d d d d| if (Pt) Rd=memh(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 1 0|i i i i i| P P |1 0 1 t t i 1 - -|d d d d d| if (!Pt) Rd=memh(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 1 0|i i i i i| P P |1 1 0 t t i 1 - -|d d d d d| if (Pt.new) Rd=memh(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 1 0|i i i i i| P P |1 1 1 t t i 1 - -|d d d d d| if (!Pt.new) Rd=memh(#u6) - LD/slot 0,1 -|1 0 0 1|1 1 1 1 0 1 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memh(Rx++Mu:brev) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 1 1|i i i i i| P P |1 0 0 t t i 1 - -|d d d d d| if (Pt) Rd=memuh(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 1 1|i i i i i| P P |1 0 1 t t i 1 - -|d d d d d| if (!Pt) Rd=memuh(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 1 1|i i i i i| P P |1 1 0 t t i 1 - -|d d d d d| if (Pt.new) Rd=memuh(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 0 1 1|i i i i i| P P |1 1 1 t t i 1 - -|d d d d d| if (!Pt.new) Rd=memuh(#u6) - LD/slot 0,1 -|1 0 0 1|1 1 1 1 0 1 1|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memuh(Rx++Mu:brev) - LD/slot 0,1 |1 0 0 1|1 1 1 1 1 0 0|i i i i i| P P |1 0 0 t t i 1 - -|d d d d d| if (Pt) Rd=memw(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 1 0 0|i i i i i| P P |1 0 1 t t i 1 - -|d d d d d| if (!Pt) Rd=memw(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 1 0 0|i i i i i| P P |1 1 0 t t i 1 - -|d d d d d| if (Pt.new) Rd=memw(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 1 0 0|i i i i i| P P |1 1 1 t t i 1 - -|d d d d d| if (!Pt.new) Rd=memw(#u6) - LD/slot 0,1 -|1 0 0 1|1 1 1 1 1 0 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rd=memw(Rx++Mu:brev) - LD/slot 0,1 |1 0 0 1|1 1 1 1 1 1 0|i i i i i| P P |1 0 0 t t i 1 - -|d d d d d| if (Pt) Rdd=memd(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 1 1 0|i i i i i| P P |1 0 1 t t i 1 - -|d d d d d| if (!Pt) Rdd=memd(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 1 1 0|i i i i i| P P |1 1 0 t t i 1 - -|d d d d d| if (Pt.new) Rdd=memd(#u6) - LD/slot 0,1 |1 0 0 1|1 1 1 1 1 1 0|i i i i i| P P |1 1 1 t t i 1 - -|d d d d d| if (!Pt.new) Rdd=memd(#u6) - LD/slot 0,1 -|1 0 0 1|1 1 1 1 1 1 0|x x x x x| P P |u 0 - - - - 0 - -|d d d d d| Rdd=memd(Rx++Mu:brev) - LD/slot 0,1 diff --git a/src/display.rs b/src/display.rs index 46fd534..11d5489 100644 --- a/src/display.rs +++ b/src/display.rs @@ -244,6 +244,13 @@ impl fmt::Display for Opcode { Opcode::StoreMemw => { f.write_str("memw") }, Opcode::StoreMemd => { f.write_str("memd") }, + Opcode::MembAdd => { f.write_str("memb") }, + Opcode::MembSub => { f.write_str("memb") }, + Opcode::MembAnd => { f.write_str("memb") }, + Opcode::MembOr => { f.write_str("memb") }, + Opcode::MembClr => { f.write_str("memb") }, + Opcode::MembSet => { f.write_str("memb") }, + Opcode::Membh => { f.write_str("membh") }, Opcode::MemhFifo => { f.write_str("memh_fifo") }, Opcode::Memubh => { f.write_str("memubh") }, @@ -1636,7 +1636,39 @@ fn decode_instruction< // 0b11, so bits are like 0011|11xxxx // these are all stores to Rs+#u6:N, shift is determined by op size. // the first few are stores of immediates, most others operate on registers. + let opc_bits = (inst >> 21) & 0b11111; + let opc_upper = opc_bits >> 3; + let opc_lower = opc_bits & 0b11; + let uuuuuu = (inst >> 7) & 0b111111; + + match opc_upper { + 0b00 | + 0b01 => { + let i7 = inst & 0b111_1111; + let i_hi = ((inst >> 13) & 0b1) << 7; + let i = i_hi | i7; + + (match opc_upper { + 0b00 => { + handler.on_opcode_decoded(Opcode::StoreMemb)?; + } + 0b01 => { + Ok(Opcode::StoreMemh), + } + 0b10 => { + Ok(Opcode::StoreMemd), + } + _ => Err(DecodeError::InvalidOpcode) + }?)?; + handler.on_source_decoded(Operand::imm_i8(i as i8))?; + }, + 0b10 => { + + }, + _ => { panic!("TODO: other: {}", other); + } + } } } } diff --git a/tests/from_brain.rs b/tests/from_brain.rs index 90a3d1d..8473617 100644 --- a/tests/from_brain.rs +++ b/tests/from_brain.rs @@ -527,6 +527,15 @@ fn inst_1011() { test_display(&0b1011_1000001_00100_11_1_0_0000_001_10110u32.to_le_bytes(), "{ R22 = add(R4, #-31999) }"); } +#[test] +fn inst_1100() { + test_display(&0b1100_0000_000_00100_11_0_1_0000_010_10110u32.to_le_bytes(), "{ R23:22 = valignb(R17:16, R5:4, #2) }"); + test_display(&0b1100_0000_100_00100_11_0_1_0000_010_10110u32.to_le_bytes(), "{ R23:22 = vspliceb(R5:4, R17:16, #2) }"); + test_display(&0b1100_0001_000_00100_11_0_1_0000_000_10110u32.to_le_bytes(), "{ R23:22 = extractu(R5:4, R17:16) }"); + test_display(&0b1100_0001_000_00100_11_0_1_0000_010_10110u32.to_le_bytes(), "{ R23:22 = shuffeb(R5:4, R17:16) }"); + test_display(&0b1100_0001_000_00100_11_0_1_0000_100_10110u32.to_le_bytes(), "{ R23:22 = shuffob(R17:16, R5:4) }"); + test_display(&0b1100_0001_000_00100_11_0_1_0000_110_10110u32.to_le_bytes(), "{ R23:22 = shuffeh(R17:16, R5:4) }"); +} #[test] fn inst_1111() { |