Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the instruction types of assembly language MIPS

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report