Moved some "b" instruction variants under the "bx" instruction
All checks were successful
Central(Architecture) Docs Build / Build Documentation (push) Successful in 19s

This commit is contained in:
Elyan 2024-11-02 14:58:12 +01:00
parent 06835611f9
commit 752baca024
3 changed files with 110 additions and 145 deletions

View File

@ -37,6 +37,8 @@ include::instructions/mov.adoc[]
<<<
==== Branching Instructions
include::instructions/b.adoc[]
<<<
include::instructions/bx.adoc[]
<<<
==== Subsystems Instructions

View File

@ -17,38 +17,6 @@
], config: {label: {right: 'BAIO'}}}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 7, name: 0x11, type: 8, attr: '0x11'},
{bits: 4, name: 'cond', type: 6},
{bits: 5, name: 'off[4:0]', type: 5},
{bits: 5, name: 'base', type: 4},
{bits: 11, name: 'off[15:5]', type: 5}
], config: {label: {right: 'BRIA'}}}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 7, name: 0x12, type: 8, attr: '0x12'},
{bits: 4, name: 'cond', type: 6},
{bits: 5, name: 'unused'},
{bits: 5, name: 'base', type: 4},
{bits: 5, name: 'off', type: 4},
{bits: 6, name: 'unused'}
], config: {label: {right: 'BRRA'}}}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 7, name: 0x13, type: 8, attr: '0x13'},
{bits: 1, name: 0},
{bits: 24, name: 'addr', type: 5}
], config: {label: {right: 'BAIA'}}}
....
[frame=ends,grid=rows,cols="1,1"]
|===
|Instruction variant | Description
@ -58,18 +26,8 @@
|BAIO
|<<BAIO>>
|BRIA
|<<BRIA>>
|BRRA
|<<BRRA>>
|BAIA
|<<BAIA>>
|===
<<<
[id=BIO]
====== BIO: Branch Immediate Offset
@ -136,106 +94,3 @@ Updates program state flags:: No.
Exceptions::
MemFault.
<<<
[id=BRIA]
====== BRIA: Branch Register+Immediate Absolute
Description::
Branch to the instruction the address of which is at `base + off`.
Permits to use a varying base address with a fixed offset.
Encoding:: B2-Type
Assembler syntax::
+
[source]
----
b<cond?> [<base>, <off?>]
----
+
Where:
[horizontal]
cond::: Optional condition.
base::: Base register.
off:::
Optional offset immediate.
Must be a multiple of 4 and in the range 0-262140.
If omitted, then 0 is used.
Examples::
+
[source]
----
b [r0, 12] <1>
b.eq [r3] <2>
----
<1> Branches to the instruction at address `r0 + 12`.
<2> If the last comparison resulted in an 'eq' condition status, branches to the instruction at the address in r3. Else, does nothing.
Privileged instruction:: No.
Updates program state flags:: No.
Exceptions::
MemFault.
<<<
[id=BRRA]
====== BRRA: Branch Register+Register Absolute
Description::
Branch to the instruction the address of which is at `base + off`.
Permits to use a varying base address with a varying offset.
Encoding:: A2-Type
Assembler syntax::
+
[source]
----
b<cond?> [<base>, <off>]
----
+
Where:
[horizontal]
cond::: Optional condition.
base::: Base register.
off::: Offset register.
Examples::
+
[source]
----
b [r0, r1] <1>
b.eq [r2, r3] <2>
----
<1> Branches to the instruction at address `r0 + r1`.
<2> If the last comparison resulted in an 'eq' condition status, branches to the instruction at address `r2 + r3`. Else, does nothing.
Privileged instruction:: No.
Updates program state flags:: No.
Exceptions::
MemFault.
<<<
[id=BAIA]
====== BAIA: Branch Always Immediate Address
Description::
Branch to the instruction at the address `addr`.
Encoding:: D2-Type
Assembler syntax::
+
[source]
----
b <addr>
----
+
Where:
[horizontal]
addr::: Immediate address.
Examples::
+
[source]
----
b 0x100000 <1>
----
<1> Branches to the address 0x100000.
Privileged instruction:: No.
Updates program state flags:: No.
Exceptions::
MemFault.

View File

@ -0,0 +1,108 @@
===== BX: Branch Extended
[wavedrom, ,svg]
....
{reg: [
{bits: 7, name: 0x11, type: 8, attr: '0x11'},
{bits: 4, name: 'cond', type: 6},
{bits: 5, name: 'off[4:0]', type: 5},
{bits: 5, name: 'base', type: 4},
{bits: 11, name: 'off[15:5]', type: 5}
], config: {label: {right: 'BXI'}}}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 7, name: 0x12, type: 8, attr: '0x12'},
{bits: 4, name: 'cond', type: 6},
{bits: 5, name: 'unused'},
{bits: 5, name: 'base', type: 4},
{bits: 5, name: 'off', type: 4},
{bits: 6, name: 'unused'}
], config: {label: {right: 'BXR'}}}
....
[frame=ends,grid=rows,cols="1,1"]
|===
|Instruction variant | Description
|BXI
|<<BXI>>
|BXR
|<<BXR>>
|===
<<<
[id=BXI]
====== BXI: Branch Extended Immediate
Description::
Branch to the instruction the address of which is at `base + off`.
Permits to use a varying base address with a fixed offset.
Encoding:: B2-Type
Assembler syntax::
+
[source]
----
bx<cond?> [<base>, <off?>]
----
+
Where:
[horizontal]
cond::: Optional condition.
base::: Base register.
off:::
Optional offset immediate.
Must be a multiple of 4 and in the range 0-262140.
If omitted, then 0 is used.
Examples::
+
[source]
----
bx [r0, 12] <1>
bx.eq [r3] <2>
----
<1> Branches to the instruction at address `r0 + 12`.
<2> If the last comparison resulted in an 'eq' condition status, branches to the instruction at the address in r3. Else, does nothing.
Privileged instruction:: No.
Updates program state flags:: No.
Exceptions::
MemFault.
<<<
[id=BXR]
====== BXR: Branch Extended Register
Description::
Branch to the instruction the address of which is at `base + off`.
Permits to use a varying base address with a varying offset.
Encoding:: A2-Type
Assembler syntax::
+
[source]
----
bx<cond?> [<base>, <off>]
----
+
Where:
[horizontal]
cond::: Optional condition.
base::: Base register.
off::: Offset register.
Examples::
+
[source]
----
bx [r0, r1] <1>
bx.eq [r2, r3] <2>
----
<1> Branches to the instruction at address `r0 + r1`.
<2> If the last comparison resulted in an 'eq' condition status, branches to the instruction at address `r2 + r3`. Else, does nothing.
Privileged instruction:: No.
Updates program state flags:: No.
Exceptions::
MemFault.