Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the instruction types of assembly language MIPS

Shulou Source: shulou.com Published: 2022-06-02 16:30:53 10月02日 Update

This article mainly explains "what are the instruction types of assembly language MIPS". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what assembly language MIPS instruction types are.

I. related concepts

Instruction set: a set of instructions contained in a given computer architecture.

Stored program concept: the concept that many types of instructions and data are stored in memory in digital form, which is the reason for stored program computers.

2. 32 registers of MIPS Operand name register number register function $zero$0 is always equal to zero $at$1 is retained by the assembler Used to deal with large constants $v0-$v1 $2koto 3 to store the function return value $a0-$a3 $4Function7 transfer function parameter $T0-$T7 $8Mizo 15 to store the temporary variable $S0-$S7 $16FLV 23 to store the temporary value to be saved $T8-$T9 $24Must27 additional temporary variable $K0-$K1 $26FLY 27 for the operating system kernel $gp$28 pointer $sp$29 to the global variable $fp$30 pointer to the top of the stack pointer to the stack frame $ra$31 return address For function calls 3. MIPS assembly language instruction types and addressing methods 1. R instruction

2. Type I instruction

3. J instruction

4. Analysis of MIPS types and addressing methods 1. MIPS field naming op (6 bits) rs (5 bits) rt (5 bits) rd (5 bits) shamt (5 bits) funct (6 bits)

Op: the basic operation of the instruction, which becomes the opcode

Rs: the first source Operand register

Rt: second source Operand register

Rd: the destination register for storing the results of the operation

Shamt: displacement amount

Funct: function code

two。 Instruction type

Type R [op is 0]

Op (6 bit) rs (5 bit) rt (5 bit) rd (5 bit) shamt (5 bit) funct (6 bit)

Type I

Op (6 bit) rs (5 bit) rt (5 bit) immediate (16 bit)

J type

Op (6 bits) immediate (26 bits) 3. MIPS addressing mode

Thank you for your reading, the above is the content of "what are the instruction types of assembly language MIPS". After the study of this article, I believe you have a deeper understanding of what the instruction types of assembly language MIPS have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Instructions types registers assembly languages languages storage functions variables points pointers operands methods concepts learning content functions programs computers operating systems systems Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia Microsoft Apple MySQL