Electronic – In disassembly, I see instruction LI, but I can’t find such instruction in MIPS instruction set

mipspic

I have little test project for PIC32MX CPU, here's a part of disassembly:

(I know this code is not atomic, I'm just testing things. Actually, I'm pretty newbie in MIPS)

 72:                        LATEbits.LATE0 ^= 0x1;  //-- toggle LATE0
9D0015BE      B309   LW V1, 36(PC)
9D0015C0      9B80   LW A0, 0(V1)
9D0015C2      6A01   LI V0, 1       <--- what is this?
9D0015C4      6D01   LI A1, 1       <--- and this one
9D0015C6      EC4C   AND A0, V0
9D0015C8      EC11   ZEB A0
9D0015CA      ECAE   XOR A0, A1
9D0015CC      EC4C   AND A0, V0
9D0015CE      9B40   LW V0, 0(V1)
9D0015D0      4DFD   ADDIU A1, -3
9D0015D2      EAAC   AND V0, A1
9D0015D4      EA8D   OR V0, A0
9D0015D6      17EF   B 0x9D0015B6
9D0015D8      6100   BTNEZ 0x9D0015DA
9D0015DC      6120   BTNEZ 0x9D00161E
9D0015E0      6120   BTNEZ 0x9D001622

Is command LI an alias for something? I have checked MIPS Architecture For Programmers Volume I-A and II-A, but don't see any occurence of LI.

More, I have this assembly code (it is from TNKernel RTOS, I'm not author of this code):

tn_enter_critical:

        la      $t0,    tn_sys_context
        lw      $t0,    0($t0)
        bne     $t0,    $zero,      1f          /* return if non-task context */
        nop

 ....................

There is instruction la in this code, and in disasm this instruction is shown as LUI:

                                                  119:   tn_enter_critical:
                                                  120:           
9D000020  3C08A000   LUI T0, -24576               121:           la      $t0,    tn_sys_context
9D000028  8D080000   LW T0, 0(T0)                 122:           lw      $t0,    0($t0)
9D00002C  15000006   BNE T0, ZERO, 0x9D000048     123:           bne     $t0,    $zero,      1f          /* return if non-task context */
9D000030  00000000   NOP                          124:           nop
                                                  125:       
 ....................

Now, reversed situation: I see instruction LUI in the docs, but can't find LA. It makes me believe that there really should be aliases, but I can't find them too.

Please explain it to me.

Best Answer

Oh, I really missed that I use -mips16 compiler option. So, LI instruction is definitely from there (here's MIPS16e docs)

As to that la, it seems to be Assembler pseudo-instruction, which is specified in MIPS32 Instruction Set Quick Reference.

Thanks to guys from Microchip forum for help.