Download File

Back

Currently reading LISTS/ArmInstructions_by_ChrisNonyminus.pkg.doc.txt

Go look at https://www.scss.tcd.ie/~waldroj/3d1/arm_arm.pdf for explanations on what the instructions do.
Just Ctrl+F any instruction you’re curious about.

The list names with a lowercase suffix “IE: al, ne, etc” are lists with set conditions.
That pdf linked also explains what conditions do.

ARM is very complicated.

On the Giga lists (non-thumb): The Giga lists contain CDP, NOP, MOV, B, and BL, as well as the WildcardFloatsLite or WildcardFixedPoints list depending on the list. Fixed points are for NDS, floats are for 3DS.

Conditions are suffixes to an instruction that specify under what condition the instruction should be performed.
The first 4 bits (or the first halfbyte) of an instruction written in big endian are usually the condition field.
The conditions in order are: EQ (equal), NE (not equal), CS (unsigned higher or same), CC (unsigned lower),
MI (negative), PL (positive or zero), VS (overflow), VC (no overflow), HI (unsigned higher), LS (unsigned lower or same),
GE (greater or equal), LT (less than), GT (greater than), LE (less than or equal),
and AL (always, which has the same effect as writing an instruction with no condition)

Here’s an explanation of what each of the most useful instructions do:
Branches (B, BX, BL, BLX) - Branch instructions. They basically tell the CPU to jump to a certain offset.
Use branch lists as a limiter with either NOP or ChangeCondition as the value for good results.
Advanced explanation: “All ARM processors support a branch instruction that allows a
conditional branch forwards or backwards up to 32MB. As the PC is one of the general-purpose registers (R15),
a branch or jump can also be generated by writing a value to R15. A subroutine call can be performed by a
variant of the standard branch instruction. As well as allowing a branch forward or backward up to 32MB,
the Branch with Link (BL) instruction preserves the address of the instruction after
the branch (the return address) in the LR (R14).”

MOV - Does similar things to branches, but “moves” (hence the name) a value from one offset to another,
if I recall correctly. I could be wrong. Use it as a limiter with either NOP or
ChangeCondition as the value for good results.

Advanced explanation: “MOV (Move) writes a value to the destination register.
The value can be either an immediate value or a value from a register, and can be shifted before the write.”

NOP - Tells the CPU to pretty much do nothing. Instructions with their registers or offsets set to
0 have the same effect. Here are the lists that do NOP:
_[ARM]_NOP, _[ARM]_NOPal, _[ARM]_B_#0x0, and _[ARM]_MOVal_r0_r0_r0

CDP - Tells a coprocessor (depending on the coprocessor number chosen, from 0-15 (basically 1-16) to do
a certain data operation depending on the value. I have forms of the list that use: all coprocessors,
all except coproc 15, just coproc 15, or just the VFP coproc (which is only in systems that have a Floating
Point Unit). CDP gets better results when you make a profiled vmd from the list. The preferred way of
using CDP is as a limiter list with NOP or a passthrough (ReplaceRm) as the value, while profiling the
limiter list. Cluster Engine is also useful.