# arm instruction description version 0.01. # https://golang.org/x/arch/arm # # This file contains a block of comment lines, each beginning with #, # followed by entries in CSV format. All the # comments are at the top # of the file, so a reader can skip past the comments and hand the # rest of the file to a standard CSV reader. # # Each line in the CSV section contains 5 fields: # # mask value mnemonic encoding tags # # The mnemonic and encoding correspond to the notation used in the # ARM Architecture Reference Manual. # # A particular instruction word w matches a line if w&mask == value. # The mask and value are computed from a combination of the encodings # and the additional pseudocode restrictions given in the manual # for each instruction. # # Multiple lines may match a particular instruction word. # The tags specify which line takes priority in these cases, # as a partial order. Eventually the plan is that a tag of the form # 'name:x' marks a line with the name x, and a tag of the form # 'except:x' says that the line on which the tag appears is of lower # priority than the ones marked with name x. # For now, however, a tag of the form 'SEE XXX' is taken from the # manual and is like 'except:x' but without a rigorous resolution for # the x. So far we've been able to just sort instructions into two classes: # those with SEE and those without. # # The tag 'pseudo' indicates that this instruction is an alternate name # for another encoding and should be ignored during disassembly. # # This file was generated by a program reading the PDF version of # the manual, but it was then hand edited to make corrections. # The eventual plan is for the generator to write the # file directly, using the PDF and a list of modifications, but # no hand editing. Then, when a new version of the manual comes out, # updating the list should be as easy as downloading the new PDF # and invoking the generator. However, we are not there yet. # "0x0fe00000","0x02a00000","ADC{S} ,,#","cond:4|0|0|1|0|1|0|1|S|Rn:4|Rd:4|imm12:12","SEE SUBS PC, LR and related instructions" "0x0fe00090","0x00a00010","ADC{S} ,,, ","cond:4|0|0|0|0|1|0|1|S|Rn:4|Rd:4|Rs:4|0|type:2|1|Rm:4","" "0x0fe00010","0x00a00000","ADC{S} ,,{,}","cond:4|0|0|0|0|1|0|1|S|Rn:4|Rd:4|imm5:5|type:2|0|Rm:4","SEE SUBS PC, LR and related instructions" "0x0fe00000","0x02800000","ADD{S} ,,#","cond:4|0|0|1|0|1|0|0|S|Rn:4|Rd:4|imm12:12","SEE ADR SEE ADD (SP plus immediate) SEE SUBS PC, LR and related instructions" "0x0fe00090","0x00800010","ADD{S} ,,, ","cond:4|0|0|0|0|1|0|0|S|Rn:4|Rd:4|Rs:4|0|type:2|1|Rm:4","" "0x0fe00010","0x00800000","ADD{S} ,,{,}","cond:4|0|0|0|0|1|0|0|S|Rn:4|Rd:4|imm5:5|type:2|0|Rm:4","SEE SUBS PC, LR and related instructions SEE ADD (SP plus register)" "0x0fef0000","0x028d0000","ADD{S} ,SP,#","cond:4|0|0|1|0|1|0|0|S|1|1|0|1|Rd:4|imm12:12","SEE SUBS PC, LR and related instructions" "0x0fef0010","0x008d0000","ADD{S} ,SP,{,}","cond:4|0|0|0|0|1|0|0|S|1|1|0|1|Rd:4|imm5:5|type:2|0|Rm:4","SEE SUBS PC, LR and related instructions" "0x0fff0000","0x028f0000","ADR ,","cond:4|0|0|1|0|1|0|0|0|1|1|1|1|Rd:4|imm12:12","pseudo" "0x0fff0000","0x024f0000","ADR ,","cond:4|0|0|1|0|0|1|0|0|1|1|1|1|Rd:4|imm12:12","pseudo" "0x0fe00000","0x02000000","AND{S} ,,#","cond:4|0|0|1|0|0|0|0|S|Rn:4|Rd:4|imm12:12","SEE SUBS PC, LR and related instructions" "0x0fe00090","0x00000010","AND{S} ,,, ","cond:4|0|0|0|0|0|0|0|S|Rn:4|Rd:4|Rs:4|0|type:2|1|Rm:4","" "0x0fe00010","0x00000000","AND{S} ,,{,}","cond:4|0|0|0|0|0|0|0|S|Rn:4|Rd:4|imm5:5|type:2|0|Rm:4","SEE SUBS PC, LR and related instructions" "0x0fef0070","0x01a00040","ASR{S} ,,#","cond:4|0|0|0|1|1|0|1|S|0|0|0|0|Rd:4|imm5:5|1|0|0|Rm:4","" "0x0fef00f0","0x01a00050","ASR{S} ,,","cond:4|0|0|0|1|1|0|1|S|0|0|0|0|Rd:4|Rm:4|0|1|0|1|Rn:4","" "0x0f000000","0x0a000000","B ","cond:4|1|0|1|0|imm24:24","" "0x0fe0007f","0x07c0001f","BFC ,#,#","cond:4|0|1|1|1|1|1|0|msb:5|Rd:4|lsb:5|0|0|1|1|1|1|1","" "0x0fe00070","0x07c00010","BFI ,,#,#","cond:4|0|1|1|1|1|1|0|msb:5|Rd:4|lsb:5|0|0|1|Rn:4","SEE BFC" "0x0fe00000","0x03c00000","BIC{S} ,,#","cond:4|0|0|1|1|1|1|0|S|Rn:4|Rd:4|imm12:12","SEE SUBS PC, LR and related instructions" "0x0fe00090","0x01c00010","BIC{S} ,,, ","cond:4|0|0|0|1|1|1|0|S|Rn:4|Rd:4|Rs:4|0|type:2|1|Rm:4","" "0x0fe00010","0x01c00000","BIC{S} ,,{,}","cond:4|0|0|0|1|1|1|0|S|Rn:4|Rd:4|imm5:5|type:2|0|Rm:4","SEE SUBS PC, LR and related instructions" "0x0ff000f0","0x01200070","BKPT #","cond:4|0|0|0|1|0|0|1|0|imm12:12|0|1|1|1|imm4:4","" "0x0f000000","0x0b000000","BL ","cond:4|1|0|1|1|imm24:24","" "0xfe000000","0xfa000000","BLX ","1|1|1|1|1|0|1|H|imm24:24","" "0x0ffffff0","0x012fff30","BLX ","cond:4|0|0|0|1|0|0|1|0|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|0|0|1|1|Rm:4","" "0x0ffffff0","0x012fff10","BX ","cond:4|0|0|0|1|0|0|1|0|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|0|0|0|1|Rm:4","" "0x0ffffff0","0x012fff20","BXJ ","cond:4|0|0|0|1|0|0|1|0|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|0|0|1|0|Rm:4","" "0xffffffff","0xf57ff01f","CLREX","1|1|1|1|0|1|0|1|0|1|1|1|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(0)|(0)|(0)|(0)|0|0|0|1|(1)|(1)|(1)|(1)","" "0x0fff0ff0","0x016f0f10","CLZ ,","cond:4|0|0|0|1|0|1|1|0|(1)|(1)|(1)|(1)|Rd:4|(1)|(1)|(1)|(1)|0|0|0|1|Rm:4","" "0x0ff0f000","0x03700000","CMN ,#","cond:4|0|0|1|1|0|1|1|1|Rn:4|(0)|(0)|(0)|(0)|imm12:12","" "0x0ff0f090","0x01700010","CMN ,, ","cond:4|0|0|0|1|0|1|1|1|Rn:4|(0)|(0)|(0)|(0)|Rs:4|0|type:2|1|Rm:4","" "0x0ff0f010","0x01700000","CMN ,{,}","cond:4|0|0|0|1|0|1|1|1|Rn:4|(0)|(0)|(0)|(0)|imm5:5|type:2|0|Rm:4","" "0x0ff0f000","0x03500000","CMP ,#","cond:4|0|0|1|1|0|1|0|1|Rn:4|(0)|(0)|(0)|(0)|imm12:12","" "0x0ff0f090","0x01500010","CMP ,, ","cond:4|0|0|0|1|0|1|0|1|Rn:4|(0)|(0)|(0)|(0)|Rs:4|0|type:2|1|Rm:4","" "0x0ff0f010","0x01500000","CMP ,{,}","cond:4|0|0|0|1|0|1|0|1|Rn:4|(0)|(0)|(0)|(0)|imm5:5|type:2|0|Rm:4","" "0x0ffffff0","0x0320f0f0","DBG #