OR1K Architecture Documentation
DISCLAIMER: This documentation is derived from the cgen cpu description
of this architecture, and does not represent official documentation
of the chip maker.
In cgen-parlance, an architecture consists of machines and models.
A `machine' is the specification of a variant of the architecture,
and a `model' is the implementation of that specification.
Typically there is a one-to-one correspondance between machine and model.
The distinction allows for separation of what application programs see
(the machine), and how to tune for the chip (what the compiler sees).
A "cpu family" is a cgen concoction to help organize the generated code.
Chip variants that are quite dissimilar can be treated separately by the
generated code even though they're both members of the same architecture.
OR1K Architecture
This section describes various things about the cgen description of
the OR1K architecture. Familiarity with cgen cpu descriptions
is assumed.
Bit number orientation (arch.lsb0?): lsb = 0
ISA description
-
openrisc -
- default-insn-word-bitsize: 32
- default-insn-bitsize: 32
- base-insn-bitsize: 32
- decode-assist:
- decode-splits:
CPU Families
-
or1k32bf - OpenRISC 1000 32-bit CPU family
Machines:
-
or32 - Generic OpenRISC 1000 32-bit CPU
Models:
-
or1200 - OpenRISC 1200 model
-
or32nd - Generic OpenRISC 1000 32-bit CPU with no branch delay slot
Models:
-
or1200nd - OpenRISC 1200 model with no branch delay slot
-
or1k64bf - OpenRISC 1000 64-bit CPU family with no branch delay slot
Machines:
-
or64 - Generic OpenRISC 1000 64-bit CPU
Models:
-
or64nd - Generic OpenRISC 1000 ND 64-bit CPU with no branch delay slot
Models:
Machine variants
or32 - Generic OpenRISC 1000 32-bit CPU
-
bfd-name: or1k
-
isas: openrisc
or32nd - Generic OpenRISC 1000 32-bit CPU with no branch delay slot
-
bfd-name: or1knd
-
isas: openrisc
or64 - Generic OpenRISC 1000 64-bit CPU
-
bfd-name: or1k64
-
isas: openrisc
or64nd - Generic OpenRISC 1000 ND 64-bit CPU with no branch delay slot
-
bfd-name: or1k64nd
-
isas: openrisc
Model variants
or1200 - OpenRISC 1200 model
or1200nd - OpenRISC 1200 model with no branch delay slot
Registers
h-atomic-address - atomic reserve address
-
machines: base
-
bitsize: 32
h-atomic-reserve - atomic reserve flag
-
machines: base
-
bitsize: 1
h-fd32r - or32 floating point registers (double, virtual)
-
machines: or32 or32nd
-
bitsize: 64
-
array: [32]
h-fdr - or64 floating point registers (double, virtual)
-
machines: or64 or64nd
-
bitsize: 64
-
array: [32]
names:
r0 |
0 |
r1 |
1 |
r2 |
2 |
r3 |
3 |
r4 |
4 |
r5 |
5 |
r6 |
6 |
r7 |
7 |
r8 |
8 |
r9 |
9 |
r10 |
10 |
r11 |
11 |
r12 |
12 |
r13 |
13 |
r14 |
14 |
r15 |
15 |
r16 |
16 |
r17 |
17 |
r18 |
18 |
r19 |
19 |
r20 |
20 |
r21 |
21 |
r22 |
22 |
r23 |
23 |
r24 |
24 |
r25 |
25 |
r26 |
26 |
r27 |
27 |
r28 |
28 |
r29 |
29 |
r30 |
30 |
r31 |
31 |
lr |
9 |
sp |
1 |
fp |
2 |
h-fsr - floating point registers (single, virtual)
-
machines: or32 or32nd or64 or64nd
-
bitsize: 32
-
array: [32]
names:
r0 |
0 |
r1 |
1 |
r2 |
2 |
r3 |
3 |
r4 |
4 |
r5 |
5 |
r6 |
6 |
r7 |
7 |
r8 |
8 |
r9 |
9 |
r10 |
10 |
r11 |
11 |
r12 |
12 |
r13 |
13 |
r14 |
14 |
r15 |
15 |
r16 |
16 |
r17 |
17 |
r18 |
18 |
r19 |
19 |
r20 |
20 |
r21 |
21 |
r22 |
22 |
r23 |
23 |
r24 |
24 |
r25 |
25 |
r26 |
26 |
r27 |
27 |
r28 |
28 |
r29 |
29 |
r30 |
30 |
r31 |
31 |
lr |
9 |
sp |
1 |
fp |
2 |
h-gpr - general registers
-
machines: or32 or32nd or64 or64nd
-
bitsize: 64
-
array: [32]
names: