在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → 汇编 MIPS Programming Guide

汇编 MIPS Programming Guide

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:0.81M
  • 下载次数:4
  • 浏览次数:21
  • 发布时间:2022-02-21
  • 实例类别:一般编程问题
  • 发 布 人:15214302396
  • 文件格式:.pdf
  • 所需积分:2
 相关标签: 汇编

实例介绍

【实例简介】汇编 MIPS Programming Guide

【实例截图】

【核心代码】

Contents
Preface: About This Book
Audience...................................................................................................iii
Topics Covered.........................................................................................iv
Special Text Notations ..............................................................................v
For More Information................................................................................v
1
Registers
Register Format .................................................................................1-1
Special Registers ...................................................................................1-5
2
Addressing
Address Formats.....................................................................................2-2
Address Descriptions..............................................................................2-3
3
Exceptions
Main Processor Exceptions ....................................................................3-1
Floating-Point Exceptions .....................................................................3-2
4
Lexical Conventions
Tokens....................................................................................................4-1
Comments...............................................................................................4-2
Identifiers................................................................................................4-2
Constants ................................................................................................4-2
Scalar Constants...............................................................................4-3
Floating Point Constants..................................................................4-3
String Constants...............................................................................4-4
viii Assembly Language Programmer’s Guide
Multiple Lines Per Physical Line...........................................................4-5
Statements...............................................................................................4-6
Label Definitions .............................................................................4-6
Null Statements................................................................................4-7
Keyword Statements........................................................................4-7
Expressions.............................................................................................4-7
Precedence .......................................................................................4-7
Expression Operators.......................................................................4-8
Data Types.......................................................................................4-8
Type Propagation in Expressions...................................................4-10
5
Instruction Set
Instruction Classes..................................................................................5-1
Reorganization Constraints and Rules....................................................5-2
Instruction Notation ...............................................................................5-2
Load and Store Instructions ...................................................................5-3
Load and Store Formats...................................................................5-3
Load Instruction Descriptions..........................................................5-4
Store Instruction Descriptions..........................................................5-7
Computational Instructions ..................................................................5-10
Computational Formats..................................................................5-10
Computational Instruction Descriptions........................................5-13
Jump and Branch Instructions..............................................................5-21
Jump and Branch Formats .............................................................5-21
Jump and Branch Instruction Descriptions....................................5-23
Special Instructions .............................................................................5-25
Special Formats..............................................................................5-25
Special Instruction Descriptions....................................................5-26
Coprocessor Interface Instructions.......................................................5-27
Coprocessor Interface Formats......................................................5-27
Coprocessor Interface Instruction Descriptions ............................5-28
6
Coprocessor Instruction Set
Instruction Notation................................................................................6-1
Floating-Point Instructions.....................................................................6-2
Floating-Point Formats ....................................................................6-3
Floating-Point Load and Store Formats...........................................6-3
Assembly Language Programmer’s Guide ix
Floating-Point Load and Store Descriptions....................................6-4
Floating-Point Computational Formats............................................6-4
Floating-Point Computational Instruction Descriptions..................6-7
Floating-Point Relational Operations.....................................................6-8
Floating-Point Relational Instruction Formats...............................6-10
Floating-Point Relational Instruction Descriptions .......................6-11
Floating-Point Move Formats........................................................6-13
Floating-Point Move Instruction Descriptions...............................6-13
System Control Coprocessor Instructions............................................6-13
System Control Coprocessor Instruction Formats.........................6-13
System Control Coprocessor Instruction Descriptions..................6-14
Control and Status Register ..........................................................6-15
Floating-Point Rounding................................................................6-20
7
Linkage Conventions
Introduction ............................................................................................7-1
Program Design......................................................................................7-2
Register Use and Linkage................................................................7-2
The Stack Frame..............................................................................7-3
The Shape of Data............................................................................7-7
Examples ................................................................................................7-7
Learning by Doing................................................................................7-11
Calling a High-Level Language Routine.......................................7-11
Calling an Assembly Language Routine..............................................7-13
Memory Allocation ..............................................................................7-15
8
Pseudo Op-Codes
9
MIPS Object File Format
Overview ................................................................................................9-2
The File Header......................................................................................9-4
File Header Magic Field (f_magic)..................................................9-5
Flags (f_flags)..................................................................................9-5
Optional Header......................................................................................9-7
Optional Header Magic Field (magic).............................................9-8
Section Headers......................................................................................9-8
x Assembly Language Programmer’s Guide
Section Name (s_name)...................................................................9-9
Flags (s_flags)................................................................................9-10
Global Pointer Tables ....................................................................9-11
Shared Library Information ...........................................................9-12
Section Data..........................................................................................9-12
Section Relocation Information............................................................9-15
Relocation Table Entry..................................................................9-15
Assembler and Link Editor Processing .........................................9-16
Object Files...........................................................................................9-22
Impure Format (OMAGIC) Files...................................................9-23
Shared Text (NMAGIC) Files .......................................................9-24
Demand Paged (ZMAGIC) Files...................................................9-25
Target Shared Library (LIBMAGIC) Files....................................9-28
Objects Using Shared Libraries.....................................................9-28
Ucode objects.................................................................................9-29
Loading Object Files......................................................................9-29
Archive files.........................................................................................9-30
Link Editor Defined Symbols...............................................................9-31
Runtime Procedure Table Symbols ...............................................9-32
10
Symbol Table
Overview ..............................................................................................10-2
Format of Symbol Table Entries ..........................................................10-8
Symbolic Header............................................................................10-8
Line Numbers.................................................................................10-9
Procedure Descriptor Table .........................................................10-13
Local Symbols .............................................................................10-13
Optimization Symbols .................................................................10-17
Auxiliary Symbols.......................................................................10-17
File Descriptor Table ...................................................................10-20
External Symbols.........................................................................10-21
11
Execution and Linking Format
Object File Format................................................................................11-2
ELF Header ..........................................................................................11-3
Sections.................................................................................................11-7
Section Header Table.....................................................................11-7
Assembly Language Programmer’s Guide xi
Section Header...............................................................................11-8
Special Sections...........................................................................11-14
String Tables................................................................................11-18
ELF Symbol Table .............................................................................11-18
Symbol Type ......................................................................................11-21
Symbol Values.............................................................................11-22
Global Data Area................................................................................11-23
Register Information...........................................................................11-25
Relocation...........................................................................................11-26
12
Program Loading and Dynamic Linking
Program Header....................................................................................12-2
Base Address..................................................................................12-4
Segment Permissions.....................................................................12-4
Segment Contents ..........................................................................12-5
Program Loading..................................................................................12-6
Dynamic Linking..................................................................................12-9
Program Interpreter........................................................................12-9
Dynamic Linker.............................................................................12-9
Dynamic Section..........................................................................12-11
Shared Object Dependencies..............................................................12-18
Global Offset Table (GOT)................................................................12-19
Calling Position Independent Functions......................................12-20
Symbols........................................................................................12-22
Relocations...................................................................................12-22
Hash table...........................................................................................12-23
Initialization and Termination Functions ...........................................12-23
Quickstart ...........................................................................................12-24
Shared Object List........................................................................12-24
Conflict Section ...........................................................................12-26
Ordering.......................................................................................12-26
A
Instruction Summary
xii Assembly Language Programmer’s Guide
B
Basic Machine Definition
Load and Store Instructions...................................................................B-1
Computational Instructions ...................................................................B-2
Branch Instructions................................................................................B-3
Coprocessor Instructions.......................................................................B-3
Special Instructions ...............................................................................B-3
Index
Assembly Language Programmer’s Guide xiii
Figures
Figure 1-1: Big-endian Byte Ordering .....................................................1-2
Figure 1-2: Little-endian Byte Ordering ..................................................1-2
Figure 4-1: Section and location counters................................................4-5
Figure 6-1: Floating-point Formats..........................................................6-3
Figure 6-2: Floating Control and Status Register 31..............................6-15
Figure 7-1: Stack Organization ................................................................7-4
Figure 7-2: Stack Example.......................................................................7-5
Figure 7-3: Non-Leaf Procedure ..............................................................7-8
Figure 7-4: Leaf Procedure Without Stack Space for
Local Variables......................................................................7-9
Figure 7-5: Leaf Procedure With Stack Space for
Local Variables....................................................................7-10
Figure 7-6: Layout of memory (User Program View) ...........................7-16
Figure 9-1: Object File Format.................................................................9-3
Figure 9-2: Organization of Section Data ..............................................9-13
Figure 9-3: Relocation Table Entry for Undefined
External Symbols.................................................................9-17
Figure 9-4: Relocation Table Entry for a Local
Relocation Entry..................................................................9-18
Figure 9-5: Layout of OMAGIC Files in Virtual Memory....................9-23
Figure 9-6: Layout of NMAGIC Files in Virtual Memory....................9-24
Figure 9-7: Layout of ZMAGIC Files in Virtual Memory.....................9-26
Figure 9-8: Layout of a ZMAGIC File on Disk.....................................9-27
Figure 10-1: The Symbol Table - Overview ............................................10-2
Figure 10-2: Functional Overview of the Symbolic Header....................10-4
Figure 10-3: Logical Relationship between the File
Descriptor Table and Local Symbols..................................10-5
Figure 10-4: Physical Relationship of a File Descriptor
Entry to Other Tables ..........................................................10-6
Figure 10-5: Logical Relationship between the File
Descriptor Table and Other Tables......................................10-7
Figure 10-6: Source Listing for Line Number Example ........................10-11
Figure 10-7: Source Listing for Line Number Example ........................10-12
Figure 12-1: Example Executable File.....................................................12-7

标签: 汇编

实例下载地址

汇编 MIPS Programming Guide

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
;
报警