Processor mapping of registers

[prev] [prev-tail] [tail] [up]

#### 6.1.8 Processor mapping of registers

This indicates what registers are used for what purposes on each of the processors supported by Free Pascal. It also indicates which registers can be used as scratch registers.

##### Intel 80x86 version

Table 6.1: Intel 80x86 Register table

Generic register name | CPU Register name
accumulator | EAX
accumulator (64-bit) high / low | EDX:EAX
float result | FP(0)
self | ESI
frame pointer | EBP
stack pointer | ESP
scratch regs. | N/A
OS_128 type (128 bit integer) | RDX:RAX

##### Motorola 680x0 version

Table 6.2: Motorola 680x0 Register table

Generic register name | CPU Register name
accumulator | D02
accumulator (64-bit) high / low | D0:D1
float result | FP03
self | A5
frame pointer | A6
stack pointer | A7
scratch regs. | D0, D1, A0, A1, FP0, FP1

2 For compatibility with some C compilers, when the function result is a pointer and is declared with the cdecl convention, the result is also stored in the A0 register

3 On simulated FPU’s the result is returned in D0

[prev] [prev-tail] [front] [up]