Index

32-bit ABI
Limitations of the 32-bit ABI

32-bit mode
limitations
Limitations of the 32-bit ABI

64-bit ABI
Limitations of the 64-bit ABI

64-bit mode
limitations
Limitations of the 64-bit ABI

ABI
attribute summary
ABI Attribute Summary
supported
Why We Need a New ABI

addressing scheme
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

argument registers
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

arguments
passing
Argument Passing

assembly language programs
Assembly Language Programming Guidelines
N32 Migration Requirements
global pointer
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)
issues
Assembly Language Issues
leaf routine
An Example Application
porting
Source Code Changes
Assembly Language Issues
predefined variables
Predefined Variables

attribute summary
ABI Attribute Summary

build
multiple versions
Building Multiple Versions of the Application
n32 application
Building and Running the N32 Application
o32 program
Building and Running the o32 Application

build procedure
Build Procedure

C functions
floating point
Source Code Changes

calling convention
Calling Convention Implementations

char
Implementation Differences

code
PIC
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

compiling
for n32 and o32
Putting it together
n32 program
Building and Running the N32 Application
o32 program
Building and Running the o32 Application

composite types
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

.cpload
gp register

.cpload register
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)

.cprestore
gp register

.cprestore register
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)

.cpsetup register
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)

data types
Implementation Differences
char
Implementation Differences
double
Implementation Differences
float
Implementation Differences
int
Implementation Differences
pointer
Implementation Differences
short int
Implementation Differences

differences
hardware
Runtime Issues

double
Implementation Differences

doublewords
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

executing
n32 program
Building and Running the N32 Application

float
Implementation Differences

floating points
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
arguments
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
C functions
Source Code Changes
quad-precision
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
registers
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
Using More Floating Point Registers

FPU
Using More Floating Point Registers

FR bit
Using More Floating Point Registers

function
C
Source Code Changes
get_regs()
Argument Passing
regs.s
An Example Application

get_regs() function
Argument Passing

GOT
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)

$gp register
An Example Application
gp register
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)

implementation differences
Implementation Differences

include files
Build Procedure

int
Implementation Differences

integer parameters
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

integer registers
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

internal subprogram interface
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

ints
sign-extended
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

leaf routine
An Example Application

libraries
N32 Migration Requirements
Compatibility
porting
Porting Environment

linking
Using a Different Subroutine Linkage

macros
sys/asm.h
gp register

main() function
An Example Application

makefiles
porting
Porting Environment

memory
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

migrating to n32
N32 Migration Requirements

multiple versions
Building Multiple Versions of the Application

n32
addresses
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
and assembly language
N32 Migration Requirements
argument passing
Argument Passing
argument registers
What is N32?
build procedure
Build Procedure
calling convention
Calling Convention Implementations
What is N32?
compiling varargs
Varargs Routines
data types
Implementation Differences
debug format
What is N32?
doublewords
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
examples
N32 Examples and Case Studies
floating point registers
What is N32?
floating points
parameters
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
FR bit
Using More Floating Point Registers
implementation differences
Implementation Differences
integer model
What is N32?
integer parameters
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
ISA
What is N32?
libraries
Compatibility
N32 Migration Requirements
migration
N32 Migration Requirements
native calling sequence
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
native subprogram interface
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
optimizer
Runtime Issues
parameter passing
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
pointers
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
porting
N32 Porting Guidelines
recompile programs
N32 Migration Requirements
register conventions
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
register sizes
Register Size
Different Register Sizes
requirements
N32 Migration Requirements
runtime issues
Runtime Issues
source code
Source Code Changes
stack parameter
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
subroutine linkage
Using a Different Subroutine Linkage

n64
data types
Implementation Differences
implementation differences
Implementation Differences
libraries
Compatibility
native calling sequence
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
native subprogram interface
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

NARGSAVE
Using a Different Subroutine Linkage

native calling sequence
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

native subprogram interface
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

o32
build
Building and Running the o32 Application
FR bit
Using More Floating Point Registers
libraries
Compatibility

optimizer
Runtime Issues

parameter passing
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

passing arguments
Argument Passing

PIC
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

pointers
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
Implementation Differences

porting
assembly language code
Assembly Language Issues
Assembly Language Programming Guidelines
Source Code Changes
example
An Example Application
for n32 and o32
Putting it together
libraries
Porting Environment
macros
gp register
makefiles
Porting Environment

porting environment
Porting Environment

porting guidelines
N32 Porting Guidelines

porting to n32
N32 Migration Requirements

position-independent code
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

predefined variables
Predefined Variables

prototypes
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

quad-precision floating point
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

reg.s function
An Example Application

registers
argument
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
conventions
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
.cpload
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)
.cprestore
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)
.cpsetup
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)
floating point
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
Using More Floating Point Registers
$gp
gp register
Caller $gp (o32) vs. Callee Saved $gp (n32 and n64)
An Example Application
integer
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
reserving memory
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
size
Different Register Sizes
Register Size

routines
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
leaf
An Example Application
varargs
Varargs Routines

run
o32 program
Building and Running the o32 Application

runtime issues
Runtime Issues

scalar parameters
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

short int
Implementation Differences

source code
changes
Source Code Changes

stack parameter slots
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

stack pointer
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

stack regions
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

structs
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

subroutine linkage
Using a Different Subroutine Linkage

sys/asm.h file
gp register

types
composite
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
data
Implementation Differences
structs
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
unions
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

unions
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

varargs
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures
function
An Example Application
routine
Varargs Routines

variable argument routines
N32 and Native 64-Bit (N64) Subprogram Interface for MIPS Architectures

variables
predefined
Predefined Variables

versions
multiple
Building Multiple Versions of the Application