This book describes the assembly language supported by the RISCompiler system, its syntax rules, and how to write assembly programs. For information on assembling and linking an assembly language program, see the MIPSpro Compiling, Debugging and Performance Tuning Guide.
The assembler converts assembly language statements into machine code. In most assembly languages, each instruction corresponds to a single machine instruction; however, some assembly language instructions can generate several machine instructions. This feature results in assembly programs that can run without modification on future machines, which might have different machine instructions.
In this release of O/S and compiler software, the assembler supports compilations in both 32-bit and 64-bit mode. Some of the implications of these different data sizes are explained in this book. For more information, please refer to the MIPSpro 64-Bit Porting and Transition Guide.
Many assembly language instructions have direct equivalents to machine instructions. For more information about the operations of a specific arhcitecture, see book that is appropriate for your machine, for instance, the MIPS R4000 Microprocessor User's Manual or the MIPS R8000 Microprocessor User's Manual.
This book assumes that you are an experienced assembly language programmer. The assembler produces object modules from the assembly instructions that the C, and Fortran 77 compilers generate. It therefore lacks many functions normally present in assemblers. You should use the assembler only when you need to:
Maximize the efficiency of a routine, which might not be possible in C, Fortran 77,, or another high-level language; for example, to write low-level I/O drivers.
Access machine functions unavailable in high-level languages or satisfy special constraints such as restricted register usage.
Change the operating system.
Change the compiler system.
Further system information can be obtained from the manuals listed at the end of this section.
This book has these chapters:
Chapter 1: Registers describes the format for the general registers, the special registers, and the floating point registers.
Chapter 2: Addressing describes how addressing works.
Chapter 3: Exceptions describes exceptions you might encounter with assembly programs.
Chapter 4: Lexical Conventions describes the lexical conventions that the assembler follows.
Chapter 5: Instruction Set describes the main processor's instruction set, including notation, load and store instructions, computational instructions, and jump and branch instructions.
Chapter 6: Coprocessor Instruction Set describes the coprocessor instruction sets.
Chapter 7: Linkage Conventions describes linkage conventions for all supported high-level languages. It also discusses memory allocation and register use.
Chapter 8: Pseudo-Op-Codes describes the assembler's pseudo-operations (directives).
Index. Contains index entries for this publication.