ARM Instruction Set: Summary

ARM 아키텍처는 다양한 명령어를 제공하여 다양한 응용 분야에서 사용된다. 이 글에서는 주요 ARM 명령어를 요약해 본다.

ARM Instruction Format

Arm Instruction set 포맷은 아래와 같다.

ARM Instruction Summary

Branch 명령어

MnemonicInstructionAction
BBranchR15(PC) := address
BLBranch w/ LinkR14(LR) := R15, R15(PC) := address
BXBranch and ExchangeR15 := Rn, T bit := Rn[0]

Data Processing 명령어

MnemonicInstructionAction
ANDANDRd := Rn AND Op2
EORExclusive ORRd := (Rn AND NOT Op2) OR (Op2 AND NOT Rn)
SUBSubtractRd := Rn – Op2
ADDAddRd := Rn + Op2
ADCAdd w/ carryRd := Rn + Op2 + Carry
SBCSubtract w/ CarryRd := Rn – Op2 – 1 + Carry
RSCReverse Subtract with CarryRd := Op2 – Rn – 1 + Carry
TSTTest bitsCPSR flags := Rn AND Op2
TEQTest bitwise equalityCPSR flags := Rn EOR Op2
CMPCompareCPSR flags := Rn – Op2
CMNCompare NegativeCPSR flags := Rn + Op2
ORRORRd := Rn OR Op2
MOVMove register or constantRd : = Op2
BICBit ClearRd := Rn AND NOT Op2
MVNMove negative registerRd := 0xFFFFFFFF EOR Op2

PSR Transfer 명령어

MnemonicInstructionAction
MRSMove PSR status/flags to registerRn := PSR
MSRMove register to PSR status/flagsPSR := Rm

Multiply 명령어

MnemonicInstructionAction
MULMultiplyRd := Rm * Rs
MLAMultiply AccumulateRd := (Rm * Rs) + Rn

Single Data Transfer 명령어

MnemonicInstructionAction
LDRLoad register from memoryRd := (address)
STRStore register to memory<address> := Rd

Block Data Transfer (LDM, STM)

MnemonicInstructionAction
LDMLoad multiple registersStack manipulation (Pop)
STMStore MultipleStack manipulation (Push)

Single Data Swap 명령어

MnemonicInstructionAction
SWPSwap register with memoryRd := [Rn], [Rn] := Rm

Software Interrupt 명령어

MnemonicInstructionAction
SWISoftware InterruptOS call

Coprocessor Register Transfers 명령어

MnemonicInstructionAction
MRCMove from coprocessor register to CPU registerRn := cRn {cRm}
MCRMove CPU register to coprocessor registercRn := rRn {cRm}

참고

답글 남기기