anchor.diff:                          (ori   #b001101) (slti #b001010) (sltiu #b001011) (xori   #b001110)
                           (lb  #b100000) (lbu #b100100) (ld  #b110111) (ldl #b011010) (ldr #b011011)
                           (lwl #b100010) (lh  #b100001) (lhu #b100101) (lw  #b100011) (lq  #b011110)
  -                        (lwl #b100010) (lwr #b100110) (lwu #b100111)
  -                        (sb  #b101000) (sd  #b111111) (sdl #b101100) (sdr #b101101) (sh  #b101001)
  -                        (sw  #b101011) (swl #b101010) (swr #b101110) (sq  #b011111)
  -                        (beq  #b000100) (beql #b000100) (bne  #b000101) (bnel #b010101)))
  -
  -(make-ee-instructions (make-encoding :spec 0 :inst 0 :rs 16 :rt 11 :imm 5 :type 0 :func #'inst-type0)
  +                        (lwl #b100010) (lwr #b100110) (lwu #b100111) (sb  #b101000) (sd  #b111111) 
  +      (sdl #b101100) (sdr #b101101) (sh  #b101001) (sw  #b101011) (swl #b101010) 
  +      (swr #b101110) (sq  #b011111)))
  +
  +(make-ee-instructions (make-encoding :inst 26 :rs 21 :rt 16 :imm 0 :type 0 :func #'inst-type0)
  +                      '((beq  #b000100) (beql #b000100) (bne  #b000101) (bnel #b010101)))
  +
  +(make-ee-instructions (make-encoding :spec 0 :inst 0 :rs 11 :rt 16 :imm 5 :type 0 :func #'inst-type0)
                         '((dsll   #b111000) (dsll32 #b111100) (dsra   #b111011) 
                           (dsra32 #b111111) (drsl   #b111010) (drsl32 #b111110)
                           (sll    #b000000) (sra    #b000011) (srl    #b000010)))
   
  -(make-ee-instructions (make-encoding :inst 0 :spec 0 :rs 16 :rt 11 :imm 6 :type 0 :func #'inst-type0)
  +(make-ee-instructions (make-encoding :inst 0 :spec 0 :rs 21 :rt 16 :imm 6 :type 0 :func #'inst-type0)
                         '((teq #b110100) (tge #b110000) (tlt #b110010) (tne #b110110)))
   
  +(make-ee-instructions (make-encoding :spec 0 :inst 0 :rs 16 :rt 21 :rd 11 :type 1 :func #'inst-type1)
  +                      '((add   #b100000) (addu  #b100001) (and   #b100100) (dadd  #b101100) (daddu #b101101) 
  +                        (dsub  #b101110) (dsubu #b101111) (movn  #b001011) (movz  #b001010) (nor   #b100111) 
  +      (or    #b100101) (slt   #b101010) (sltu  #b101011)))
  +
   (make-ee-instructions (make-encoding :spec 0 :inst 0 :rs 21 :rt 16 :rd 11 :type 1 :func #'inst-type1)
  -                      '((add   #b100000) (addu  #b100001) (and   #b100100) (dadd  #b101100) (daddu #b101101) 
  -                        (dsllv #b010100) (dsrav #b010111) (dsrlv #b010110) (dsub  #b101110) (dsubu #b101111)
  -                        (movn  #b001011) (movz  #b001010) (nor   #b100111) (or    #b100101)
  -                        (sllv  #b000100) (slt   #b101010) (sltu  #b101011) (srav  #b000111) (srlv  #b000110)
  -                        (sub   #b100010) (subu  #b100011) (xor   #b100110)))
  -
  -(make-ee-instructions (make-encoding :spec #b011100 :fixed #b001000 :inst 6 :rs 21 :rt 16 :rd 11 :type 1 :func #'inst-type1)
  +                      '((dsllv #b010100) (dsrav #b010111) (dsrlv #b010110) (sllv  #b000100) 
  +      (srav  #b000111) (srlv  #b000110)))
  +
  +(make-ee-instructions (make-encoding :spec #b011100 :fixed #b001000 :inst 6 :rs 16 :rt 21 :rd 11 :type 1 :func #'inst-type1)
                         '((paddb  #b01000) (paddh  #b00100) (paddsb #b11000) (paddsh #b10100) (paddsw #b10000)
                           (paddw  #b00000) (pcgtb  #b01010) (pcgth  #b00110) (pcgtw  #b00010) 
                           (pextlb #b11010) (pextlh #b10110) (pextlw #b10010) (pmaxh  #b00111) (pmaxw  #b00011)
                           (ppacb  #b11011) (ppach  #b10111) (ppacw  #b10011) (psubb  #b01001)
                           (psubh  #b00101) (psubsb #b11001) (psubsh #b10101) (psubsw #b10001) (psubw  #b00001)))
   
  -(make-ee-instructions (make-encoding :spec #b011100 :fixed #b101000 :inst 6 :rs 21 :rt 16 :rd 11 :type 1 :func #'inst-type1)
  +(make-ee-instructions (make-encoding :spec #b011100 :fixed #b101000 :inst 6 :rs 16 :rt 21 :rd 11 :type 1 :func #'inst-type1)
                         '((paddub #b11000) (padduh #b10100) (padduw #b10000)
                           (padsbh #b00100) (pceqb  #b01010) (pceqh  #b00110) (pceqw  #b00010) (pextub #b11010)
                           (pextuh #b10110) (pextuw #b10010) (pminh  #b00111) (pminw  #b00011) (psubub #b11001)
                           (psubuh #b10101) (psubuw #b10001) (qfsrv  #b11011)))
   
  -(make-ee-instructions (make-encoding :spec #b011100 :fixed #b001001 :inst 6 :rs 21 :rt 16 :rd 11 :type 1 :func #'inst-type1)
  +(make-ee-instructions (make-encoding :spec #b011100 :fixed #b001001 :inst 6 :rs 16 :rt 21 :rd 11 :type 1 :func #'inst-type1)
                         '((pand   #b10010) (pcpyld #b01110) 
                           (phmadh #b10001) (phmsbh #b10101) (pinth  #b01010) (pmaddh #b10000) (pmaddw #b00000)
                           (pmsubh #b10100) (pmsubw #b00100) (pmulth #b11100)
  -                        (pmultw #b01100) (psllvw #b00010) (psrlvw #b00011)
  -                        (pxor   #b10011)))
  +                        (pmultw #b01100) (pxor   #b10011)))
  +
  +(make-ee-instructions (make-encoding :spec #b011100 :fixed #b001001 :inst 6 :rs 21 :rt 16 :rd 11 :type 1 :func #'inst-type1)
  +                      '((psllvw #b00010) (psrlvw #b00011)))
   
   (make-ee-instructions (make-encoding :spec #b011100 :fixed #b101001 :inst 6 :rs 21 :rt 16 :rd 11 :type 1 :func #'inst-type1)
                         '((pcpyud #b01110) (pinteh #b01010) (pmadduw #b00000) 
                           (psravw #b00011)))
   
  -(make-ee-instructions (make-encoding :spec #b011100 :inst 0 :rs 16 :rt 11 :rd 6 :type 1 :func #'inst-type1)
  +(make-ee-instructions (make-encoding :spec #b011100 :inst 0 :rs 6 :rt 16 :rd 11 :type 1 :func #'inst-type1)
                         '((psllh #b110100) (psllw #b111100) (psrlh #b110110) (psrlw #b111110)))
   
   (make-ee-instructions (make-encoding :spec 1 :inst 16 :rs 21 :imm 0 :type 2 :func #'inst-type2)
  
positive.code: ;;; write value to the stream
  
  (defun write-value (stream value byte-count)
    (format t "Writing value #x~x" value)
    (loop for i from 0 to (1- byte-count)
      do (write-byte (ldb (byte 8 (* 8 i)) value) stream)))
  
  
negative.code: (defmacro def-inst-type (name inst-layout)
   `(progn
      (defun ,name (stream instruction arguments enc)
        (let ((code 0))
          ,(when (first inst-layout)
            ;; Generate the let for all the registers
  