Процессор реализует набор инструкций ARMv7-M Thumb.
Таблица демонстрирует количество тактов (счётчиков циклов) на инструкцию. Счётчики циклов основаны на системе с нулевым времем ожидания.
Во всех приведённых примерах ассемблерного синтаксиса, в зависимости от конкретной операции, поля могут быть заменены одной из следующих опций:
Rm
Rm, LSL #4
Rm, LSL Rs
#0xE000E000
.
Для краткости показаны не все режимы загрузки и сохранения. Полное описание можно найти в ARMv7-M Architecture Reference Manual.
Таблица использует следующие сокращения в колонке Циклы:
PC
и LR
.
Operation | Description | Assembler | Cycles |
---|---|---|---|
Move | Register | MOV Rd, <op2> | %% 1 %% |
Move | 16-bit immediate | MOVW Rd, #<imm> | %% 1 %% |
Move | Immediate into top | MOVT Rd, #<imm> | %% 1 %% |
Move | to PC | MOV PC, Rm | %% 1+P %% |
Add | Add | Add Rd, Rn, <op2> | %% 1 %% |
Add | Add to PC | Add PC, PC, Rm | %% 1+P %% |
Add | Add with carry | Add Rd, Rn, <op2> | %% 1 %% |
Add | Form address | Add Rd, <label> | %% 1 %% |
Subtract | Subtract | SUB Rd, Rn, <op2> | %% 1 %% |
Subtract | Subtract with borrow | SBC Rd, Rn, <op2> | %% 1 %% |
Subtract | Reverse | RSB Rd, Rn, <op2> | %% 1 %% |
Multiply | Multiply | MUL Rd, Rn, Rm | %% 1 %% |
Multiply | Mupliply accumulate | MLA Rd, Rn, Rm | %% 2 %% |
Multiply | Multiply subtract | MLS Rd, Rn, Rm | %% 2 %% |
Multiply | Long signed | SMULL RdLo, RdHi, Rn, Rm | %%3\leq c \leq 5^a%% |
Multiply | Long unsigned | UMULL RdLo, RdHi, Rn, Rm | %%3\leq c \leq 5^a%% |
Multiply | Long signed accumulate | SMLAL RdLo, RdHi, Rn, Rm | %%4\leq c \leq 7^a%% |
Multiply | Long unsigned accumulate | UMLAL RdLo, RdHi, Rn, Rm | %%4\leq c \leq 7^a%% |
Divide | Signed | SDIV Rd, Rn, Rm | %% 2\leq c \leq 12^b %% |
Divide | Unsigned | UDIV Rd, Rn, Rm | %% 2\leq c \leq 12^b %% |
Saturate | Signed | SSAT Rd, #<imm>, <op2> | %% 1 %% |
Saturate | Unsigned | USAT Rd, #<imm>, <op2> | %% 1 %% |
Compare | Signed | CMP Rn, <op2> | %% 1 %% |
Compare | Negative | CMN Rn, <op2> | %% 1 %% |
Logical | AND | AND Rd, Rn, <op2> | %% 1 %% |
Logical | Exclusive OR | EOR Rd, Rn, <op2> | %% 1 %% |
Logical | OR | ORR Rd, Rn, <op2> | %% 1 %% |
Logical | OR NOT | ORN Rd, Rn, <op2> | %% 1 %% |
Logical | Bit clear | BIC Rd, Rn, <op2> | %% 1 %% |
Logical | Move NOT | MVN Rd, <op2> | %% 1 %% |
Logical | AND test | TST Rn, <op2> | %% 1 %% |
Logical | Exclusive OR test | TEQ Rn, <op1> | %% 1 %% |
Shift | Logical shift left | LSL Rd, Rn, #<imm> | %% 1 %% |
Shift | Logical shift left | LSL Rd, Rn, Rs | %% 1 %% |
Shift | Logical shift right | LSR Rd, Rn, #<imm> | %% 1 %% |
Shift | Logical shift right | LSR Rd, Rn, Rs | %% 1 %% |
Shift | Arithmetic shift right | ASR Rd, Rn, #<imm> | %% 1 %% |
Shift | Arithmetic shift right | ASR Rd, Rn, Rs | %% 1 %% |
Rotate | Rotate right | ROR Rd, Rn, #<imm> | %% 1 %% |
Rotate | Rotate right | ROR Rd, Rn, Rs | %% 1 %% |
Rotate | With extension | RRX Rd, Rn | %% 1 %% |
Count | Leading zeroes | CLZ Rd, Rn | %% 1 %% |
Load | Word | LDR Rd, [Rn, <op2>] | %% 2^c %% |
Load | To PC | LDR PC, [Rn, <op2>] | %% 2^c + P %% |
Load | Halfword | LDRH Rd, [Rn, <op2>] | %% 2^c %% |
Load | Byte | LDRB Rd, [Rn, <op2>] | %% 2^c %% |
Load | Signed Halfword | LDRSH Rd, [Rn, <op2>] | %% 2^c %% |
Load | Signed byte | LDRSB Rd, [Rn, <op2>] | %% 2^c %% |
Load | User word | LDRT Rd, [Rn, #<imm>] | %% 2^c %% |
Load | User halfword | LDRHT Rd, [Rn, #<imm>] | %% 2^c %% |
Load | User byte | LDRBT Rd, [Rn, #<imm>] | %% 2^c %% |
Load | User signed halfword | LDRSHT Rd, [Rn, #<imm>] | %% 2^c %% |
Load | User signed byte | LDRSBT Rd, [Rn, #<imm>] | %% 2^c %% |
Load | PC relative | LDR Rd, [PC, #<imm>] | %% 2^c %% |
Load | Doubleword | LDRD Rd, Rd, [Rn, #<imm>] | %% 1 + N %% |
Load | Multiple | LDM Rn, {<reglist>} | %% 1 + N %% |
Load | Multiple including PC | LDM Rn, {<reglist>, PC} | %% 1 + N + P %% |
Store | Word | STR Rd, [Rn, <op2>] | %% 2^c %% |
Store | Halfword | STRH Rd, [Rn, <op2>] | %% 2^c %% |
Store | Byte | STRB Rd, [Rn, <op2>] | %% 2^c %% |
Store | Signed Halfword | STRSH Rd, [Rn, <op2>] | %% 2^c %% |
Store | Signed byte | STRSB Rd, [Rn, <op2>] | %% 2^c %% |
Store | User word | STRT Rd, [Rn, #<imm>] | %% 2^c %% |
Store | User halfword | STRHT Rd, [Rn, #<imm>] | %% 2^c %% |
Store | User byte | STRBT Rd, [Rn, #<imm>] | %% 2^c %% |
Store | User signed halfword | STRSHT Rd, [Rn, #<imm>] | %% 2^c %% |
Store | User signed byte | STRSBT Rd, [Rn, #<imm>] | %% 2^c %% |
Store | Doubleword | STRD Rd, Rd, [Rn, #<imm>] | %% 1 + N %% |
Store | Multiple | STM Rn, {<reglist>} | %% 1 + N %% |
Push | Push | PUSH {<reglist>} | %% 1 + N %% |
Push | Push with link register | PUSH {<reglist>, LR} | %% 1 + N %% |
Pop | Pop | POP {<reglist>} | %% 1 + N %% |
Pop | Pop and return | POP {<reglist>, PC} | %% 1 + N + P %% |
Semaphore | Load exclusive | LDREX Rd, [Rn, #<imm>] | %% 2 %% |
Semaphore | Load exclusive half | LDREXH Rd, [Rn] | %% 2 %% |
Semaphore | Load exclusive byte | LDREXB Rd, [Rn] | %% 2 %% |
Semaphore | Store exclusive | STREX Rd, Rt, [Rn, #<imm>] | %% 2 %% |
Semaphore | Store exclusive half | STREXH Rd, Rt, [Rn] | %% 2 %% |
Semaphore | Store exclusive byte | STREX Rd, Rt, [Rn] | %% 2 %% |
Semaphore | Clear exclusive monitor | CLREX | %% 1 %% |
Branch | Conditional | B<cc> <label> | %% 1 %% или %% 1 + P^d %% |
Branch | Uniconditional | B <label> | %% 1 + P %% |
Branch | With link | BL <label> | %% 1 + P %% |
Branch | With exchange | BX Rm | %% 1 + P %% |
Branch | With link and exchange | BLX Rm | %% 1 + P %% |
Branch | Branch if zero | CBZ Rn, <label> | %% 1 %% или %% 1 + P^d %% |
Branch | Branch if non-zero | CBNZ Rn, <label> | %% 1 %% или %% 1 + P^d %% |
Branch | Byte table branch | TBB [Rn, Rm] | %% 2 + P %% |
Branch | Halfword table branch | TBH [Rn, Rm, LSL#1] | %% 2 + P %% |
State change | Supervisor call | SVC #<imm> | - |
State change | If-then-else | IT... <cond> | %% 1^e %% |
State change | Disable interrupts | CPSID <flags> | %% 1 %% или %% 2 %% |
State change | Enable interrupts | CPSIE <flags> | %% 1 %% или %% 2 %% |
State change | Read Special register | MRS Rd, <specreg> | %% 1 %% или %% 2 %% |
State change | Write Special register | MSR <specreg>, Rn | %% 1 %% или %% 2 %% |
State change | Breakpoint | BKPT #<imm> | - |
Extend | Signed halfword to word | SXTH Rd, <op2> | %% 1 %% |
Extend | Signed byte to word | SXTB Rd, <op2> | %% 1 %% |
Extend | Unsigned halfword | UXTH Rd, <op2> | %% 1 %% |
Extend | Unsigned byte | UXTB Rd, <op2> | %% 1 %% |
Bit field | Extract unsigned | UBFX Rd, Rn, #<imm>, #<imm> | %% 1 %% |
Bit field | Extract signed | SBFX Rd, Rn, #<imm>, #<imm> | %% 1 %% |
Bit field | Clear | BFC Rd, Rn, #<imm>, #<imm> | %% 1 %% |
Bit field | Insert | BFI Rd, Rn, #<imm>, #<imm> | %% 1 %% |
Reverse | Bytes in word | REV Rd, Rm | %% 1 %% |
Reverse | Bytes in both halfwords | REV16 Rd, Rm | %% 1 %% |
Reverse | Signed bottom halfword | REVSH Rd, Rm | %% 1 %% |
Reverse | Bits in word | RBIT Rd, Rm | %% 1 %% |
Hint | Send event | SEV | %% 1 %% |
Hint | Wait for event | WFE | %% 1 +W %% |
Hint | Wait for interrupt | WFI | %% 1 +W %% |
Hint | No operation | NOP | %% 1 %% |
Barriers | Instruction synchronization | ISB | %% 1 + B %% |
Barriers | Data memory | DMB | %% 1 + B %% |
Barriers | Data synchronization | DSB | %% 1 + B %% |
UMULL
, SMULL
, UMLAL
, SMLAL
используют технолоогию досрочного завершения в зависимости от размера исходного значения. Это прерываемые инструкции, которые в случае сброса и перезапуска в худшем случае имеют задержку в один цикл.
IT
инструкция может быть конвейеризирована на этапе исполнения предыдущей 16-битной Thumb инструкции, что позволяет выполниться за ноль циклов синхронизации.
Интерфейсы | Временные параметры Load/Store |