1This README describes a sample invocation of disasm.py whose purpose is to test 2the low level ARM/Thumb disassembly functionality from llvm using the llvm-mc 3command line. We invoke gdb on an executable, try to disassemble a function, 4and then read the memory contents of the disassembled function. 5 6The byte contents are written into a file named disasm-input.txt and then we 7invoke llvm-mc -disassemble plus options (set with the -o/--options) on the 8byte contents. 9 10See the following for a sample session using this command: 11 12[16:26:57] johnny:/Volumes/data/Radar/9131529 $ /Volumes/data/lldb/svn/trunk/utils/test/disasm.py -C 'set shlib-path-substitutions /usr /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr /System /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System /Library /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/Library' -O '-arch armv7' -m /Volumes/data/lldb/llvm/Debug+Asserts/bin/llvm-mc -e /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/libSystem.B.dylib -f printf --options='-triple=thumb-apple-darwin -debug-only=arm-disassembler' 13gdb commands: ['set shlib-path-substitutions /usr /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr /System /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System /Library /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/Library'] 14gdb options: -arch armv7 15executable: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/libSystem.B.dylib 16function: printf 17llvm-mc: /Volumes/data/lldb/llvm/Debug+Asserts/bin/llvm-mc 18llvm-mc options: -triple=thumb-apple-darwin -debug-only=arm-disassembler 19GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:56:02 UTC 2011) 20Copyright 2004 Free Software Foundation, Inc. 21GDB is free software, covered by the GNU General Public License, and you are 22welcome to change it and/or distribute copies of it under certain conditions. 23Type "show copying" to see the conditions. 24There is absolutely no warranty for GDB. Type "show warranty" for details. 25This GDB was configured as "--host=x86_64-apple-darwin --target=arm-apple-darwin". 26<Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/Library 27<eloper/SDKs/iPhoneOS4.3.sdk/usr/lib/libSystem.B.dylib 28Reading symbols for shared libraries ................ done 29Reading symbols from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/libSystem.B.dylib...done. 30(gdb) disassemble printf 31Dump of assembler code for function printf: 320x0704cdd0 <printf+0>: push {r0, r1, r2, r3} 330x0704cdd2 <printf+2>: push {r4, r5, r7, lr} 340x0704cdd4 <printf+4>: add r7, sp, #8 350x0704cdd6 <printf+6>: sub sp, #4 360x0704cdd8 <printf+8>: add r3, sp, #20 370x0704cdda <printf+10>: ldr.w r5, [r3], #4 380x0704cdde <printf+14>: str r3, [sp, #0] 390x0704cde0 <printf+16>: ldr r3, [pc, #52] (0x704ce18 <printf+72>) 400x0704cde2 <printf+18>: add r3, pc 410x0704cde4 <printf+20>: ldr r0, [r3, #0] 420x0704cde6 <printf+22>: ldr r4, [r0, #0] 430x0704cde8 <printf+24>: ldr r0, [pc, #48] (0x704ce1c <printf+76>) 440x0704cdea <printf+26>: add r0, pc 450x0704cdec <printf+28>: ldr r0, [r0, #0] 460x0704cdee <printf+30>: ldr r0, [r0, #0] 470x0704cdf0 <printf+32>: blx 0x707ba30 <pthread_getspecific> 480x0704cdf4 <printf+36>: cbnz r0, 0x704cdfe <printf+46> 490x0704cdf6 <printf+38>: ldr r1, [pc, #40] (0x704ce20 <printf+80>) 500x0704cdf8 <printf+40>: add r1, pc 510x0704cdfa <printf+42>: ldr r1, [r1, #0] 520x0704cdfc <printf+44>: b.n 0x704ce00 <printf+48> 530x0704cdfe <printf+46>: mov r1, r0 540x0704ce00 <printf+48>: mov r0, r4 550x0704ce02 <printf+50>: mov r2, r5 560x0704ce04 <printf+52>: ldr r3, [sp, #0] 570x0704ce06 <printf+54>: bl 0x704ad44 <vfprintf_l> 580x0704ce0a <printf+58>: sub.w sp, r7, #8 ; 0x8 590x0704ce0e <printf+62>: ldmia.w sp!, {r4, r5, r7, lr} 600x0704ce12 <printf+66>: add sp, #16 610x0704ce14 <printf+68>: bx lr 620x0704ce16 <printf+70>: nop 630x0704ce18 <printf+72>: movs r3, #142 640x0704ce1a <printf+74>: lsls r5, r0, #0 650x0704ce1c <printf+76>: adds r1, #122 660x0704ce1e <printf+78>: lsls r5, r0, #0 670x0704ce20 <printf+80>: adds r1, #104 680x0704ce22 <printf+82>: lsls r5, r0, #0 69End of assembler dump. 70(gdb) x /2b 0x0704cdd0 710x704cdd0 <printf>: 0x0f 0xb4 72(gdb) x /2b 0x0704cdd2 730x704cdd2 <printf+2>: 0xb0 0xb5 74(gdb) x /2b 0x0704cdd4 750x704cdd4 <printf+4>: 0x02 0xaf 76(gdb) x /2b 0x0704cdd6 770x704cdd6 <printf+6>: 0x81 0xb0 78(gdb) x /2b 0x0704cdd8 790x704cdd8 <printf+8>: 0x05 0xab 80(gdb) x /4b 0x0704cdda 810x704cdda <printf+10>: 0x53 0xf8 0x04 0x5b 82(gdb) x /2b 0x0704cdde 830x704cdde <printf+14>: 0x00 0x93 84(gdb) x /2b 0x0704cde0 850x704cde0 <printf+16>: 0x0d 0x4b 86(gdb) x /2b 0x0704cde2 870x704cde2 <printf+18>: 0x7b 0x44 88(gdb) x /2b 0x0704cde4 890x704cde4 <printf+20>: 0x18 0x68 90(gdb) x /2b 0x0704cde6 910x704cde6 <printf+22>: 0x04 0x68 92(gdb) x /2b 0x0704cde8 930x704cde8 <printf+24>: 0x0c 0x48 94(gdb) x /2b 0x0704cdea 950x704cdea <printf+26>: 0x78 0x44 96(gdb) x /2b 0x0704cdec 970x704cdec <printf+28>: 0x00 0x68 98(gdb) x /2b 0x0704cdee 990x704cdee <printf+30>: 0x00 0x68 100(gdb) x /4b 0x0704cdf0 1010x704cdf0 <printf+32>: 0x2e 0xf0 0x1e 0xee 102(gdb) x /2b 0x0704cdf4 1030x704cdf4 <printf+36>: 0x18 0xb9 104(gdb) x /2b 0x0704cdf6 1050x704cdf6 <printf+38>: 0x0a 0x49 106(gdb) x /2b 0x0704cdf8 1070x704cdf8 <printf+40>: 0x79 0x44 108(gdb) x /2b 0x0704cdfa 1090x704cdfa <printf+42>: 0x09 0x68 110(gdb) x /2b 0x0704cdfc 1110x704cdfc <printf+44>: 0x00 0xe0 112(gdb) x /2b 0x0704cdfe 1130x704cdfe <printf+46>: 0x01 0x46 114(gdb) x /2b 0x0704ce00 1150x704ce00 <printf+48>: 0x20 0x46 116(gdb) x /2b 0x0704ce02 1170x704ce02 <printf+50>: 0x2a 0x46 118(gdb) x /2b 0x0704ce04 1190x704ce04 <printf+52>: 0x00 0x9b 120(gdb) x /4b 0x0704ce06 1210x704ce06 <printf+54>: 0xfd 0xf7 0x9d 0xff 122(gdb) x /4b 0x0704ce0a 1230x704ce0a <printf+58>: 0xa7 0xf1 0x08 0x0d 124(gdb) x /4b 0x0704ce0e 1250x704ce0e <printf+62>: 0xbd 0xe8 0xb0 0x40 126(gdb) x /2b 0x0704ce12 1270x704ce12 <printf+66>: 0x04 0xb0 128(gdb) x /2b 0x0704ce14 1290x704ce14 <printf+68>: 0x70 0x47 130(gdb) x /2b 0x0704ce16 1310x704ce16 <printf+70>: 0x00 0xbf 132(gdb) x /2b 0x0704ce18 1330x704ce18 <printf+72>: 0x8e 0x23 134(gdb) x /2b 0x0704ce1a 1350x704ce1a <printf+74>: 0x05 0x00 136(gdb) x /2b 0x0704ce1c 1370x704ce1c <printf+76>: 0x7a 0x31 138(gdb) x /2b 0x0704ce1e 1390x704ce1e <printf+78>: 0x05 0x00 140(gdb) x /2b 0x0704ce20 1410x704ce20 <printf+80>: 0x68 0x31 142(gdb) x /2b 0x0704ce22 1430x704ce22 <printf+82>: 0x05 0x00 144(gdb) quit 145 146Executing command: /Volumes/data/lldb/llvm/Debug+Asserts/bin/llvm-mc -disassemble -triple=thumb-apple-darwin -debug-only=arm-disassembler disasm-input.txt 147Opcode=2305 Name=tPUSH Format=ARM_FORMAT_THUMBFRM(25) 148 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 149------------------------------------------------------------------------------------------------- 150| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 0: 1: 0: 0| 0: 0: 0: 0| 1: 1: 1: 1| 151------------------------------------------------------------------------------------------------- 152 153 push {r0, r1, r2, r3} 154Opcode=2305 Name=tPUSH Format=ARM_FORMAT_THUMBFRM(25) 155 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 156------------------------------------------------------------------------------------------------- 157| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 0: 1: 0: 1| 1: 0: 1: 1| 0: 0: 0: 0| 158------------------------------------------------------------------------------------------------- 159 160 push {r4, r5, r7, lr} 161Opcode=2228 Name=tADDrSPi Format=ARM_FORMAT_THUMBFRM(25) 162 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 163------------------------------------------------------------------------------------------------- 164| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 0| 1: 1: 1: 1| 0: 0: 0: 0| 0: 0: 1: 0| 165------------------------------------------------------------------------------------------------- 166 167 add r7, sp, #8 168Opcode=2328 Name=tSUBspi Format=ARM_FORMAT_THUMBFRM(25) 169 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 170------------------------------------------------------------------------------------------------- 171| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 0: 0: 0: 0| 1: 0: 0: 0| 0: 0: 0: 1| 172------------------------------------------------------------------------------------------------- 173 174 sub sp, #4 175Opcode=2228 Name=tADDrSPi Format=ARM_FORMAT_THUMBFRM(25) 176 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 177------------------------------------------------------------------------------------------------- 178| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 0| 1: 0: 1: 1| 0: 0: 0: 0| 0: 1: 0: 1| 179------------------------------------------------------------------------------------------------- 180 181 add r3, sp, #20 182Opcode=1963 Name=t2LDR_POST Format=ARM_FORMAT_THUMBFRM(25) 183 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 184------------------------------------------------------------------------------------------------- 185| 1: 1: 1: 1| 1: 0: 0: 0| 0: 1: 0: 1| 0: 0: 1: 1| 0: 1: 0: 1| 1: 0: 1: 1| 0: 0: 0: 0| 0: 1: 0: 0| 186------------------------------------------------------------------------------------------------- 187 188 ldr r5, [r3], #4 189Opcode=2324 Name=tSTRspi Format=ARM_FORMAT_THUMBFRM(25) 190 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 191------------------------------------------------------------------------------------------------- 192| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 0: 1| 0: 0: 1: 1| 0: 0: 0: 0| 0: 0: 0: 0| 193------------------------------------------------------------------------------------------------- 194 195 str r3, [sp] 196Opcode=2275 Name=tLDRpci Format=ARM_FORMAT_THUMBFRM(25) 197 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 198------------------------------------------------------------------------------------------------- 199| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 1: 0: 1: 1| 0: 0: 0: 0| 1: 1: 0: 1| 200------------------------------------------------------------------------------------------------- 201 202 ldr.n r3, #52 203Opcode=2223 Name=tADDhirr Format=ARM_FORMAT_THUMBFRM(25) 204 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 205------------------------------------------------------------------------------------------------- 206| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 0: 1: 0: 0| 0: 1: 1: 1| 1: 0: 1: 1| 207------------------------------------------------------------------------------------------------- 208 209 add r3, pc 210Opcode=2274 Name=tLDRi Format=ARM_FORMAT_THUMBFRM(25) 211 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 212------------------------------------------------------------------------------------------------- 213| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 1: 0| 1: 0: 0: 0| 0: 0: 0: 1| 1: 0: 0: 0| 214------------------------------------------------------------------------------------------------- 215 216 ldr r0, [r3] 217Opcode=2274 Name=tLDRi Format=ARM_FORMAT_THUMBFRM(25) 218 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 219------------------------------------------------------------------------------------------------- 220| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 1: 0| 1: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 221------------------------------------------------------------------------------------------------- 222 223 ldr r4, [r0] 224Opcode=2275 Name=tLDRpci Format=ARM_FORMAT_THUMBFRM(25) 225 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 226------------------------------------------------------------------------------------------------- 227| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 1: 0: 0: 0| 0: 0: 0: 0| 1: 1: 0: 0| 228------------------------------------------------------------------------------------------------- 229 230 ldr.n r0, #48 231Opcode=2223 Name=tADDhirr Format=ARM_FORMAT_THUMBFRM(25) 232 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 233------------------------------------------------------------------------------------------------- 234| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 0: 1: 0: 0| 0: 1: 1: 1| 1: 0: 0: 0| 235------------------------------------------------------------------------------------------------- 236 237 add r0, pc 238Opcode=2274 Name=tLDRi Format=ARM_FORMAT_THUMBFRM(25) 239 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 240------------------------------------------------------------------------------------------------- 241| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 1: 0| 1: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 242------------------------------------------------------------------------------------------------- 243 244 ldr r0, [r0] 245Opcode=2274 Name=tLDRi Format=ARM_FORMAT_THUMBFRM(25) 246 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 247------------------------------------------------------------------------------------------------- 248| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 1: 0| 1: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 249------------------------------------------------------------------------------------------------- 250 251 ldr r0, [r0] 252Opcode=2243 Name=tBLXi_r9 Format=ARM_FORMAT_THUMBFRM(25) 253 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 254------------------------------------------------------------------------------------------------- 255| 1: 1: 1: 1| 0: 0: 0: 0| 0: 0: 1: 0| 1: 1: 1: 0| 1: 1: 1: 0| 1: 1: 1: 0| 0: 0: 0: 1| 1: 1: 1: 0| 256------------------------------------------------------------------------------------------------- 257 258 blx #191548 259Opcode=2255 Name=tCBNZ Format=ARM_FORMAT_THUMBFRM(25) 260 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 261------------------------------------------------------------------------------------------------- 262| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 1: 0: 0: 1| 0: 0: 0: 1| 1: 0: 0: 0| 263------------------------------------------------------------------------------------------------- 264 265 cbnz r0, #6 266Opcode=2275 Name=tLDRpci Format=ARM_FORMAT_THUMBFRM(25) 267 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 268------------------------------------------------------------------------------------------------- 269| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 1: 0: 0: 1| 0: 0: 0: 0| 1: 0: 1: 0| 270------------------------------------------------------------------------------------------------- 271 272 ldr.n r1, #40 273Opcode=2223 Name=tADDhirr Format=ARM_FORMAT_THUMBFRM(25) 274 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 275------------------------------------------------------------------------------------------------- 276| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 0: 1: 0: 0| 0: 1: 1: 1| 1: 0: 0: 1| 277------------------------------------------------------------------------------------------------- 278 279 add r1, pc 280Opcode=2274 Name=tLDRi Format=ARM_FORMAT_THUMBFRM(25) 281 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 282------------------------------------------------------------------------------------------------- 283| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 1: 0| 1: 0: 0: 0| 0: 0: 0: 0| 1: 0: 0: 1| 284------------------------------------------------------------------------------------------------- 285 286 ldr r1, [r1] 287Opcode=2238 Name=tB Format=ARM_FORMAT_THUMBFRM(25) 288 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 289------------------------------------------------------------------------------------------------- 290| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 1: 1: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 291------------------------------------------------------------------------------------------------- 292 293 b #0 294Opcode=2294 Name=tMOVr Format=ARM_FORMAT_THUMBFRM(25) 295 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 296------------------------------------------------------------------------------------------------- 297| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 0: 1: 1: 0| 0: 0: 0: 0| 0: 0: 0: 1| 298------------------------------------------------------------------------------------------------- 299 300 mov r1, r0 301Opcode=2294 Name=tMOVr Format=ARM_FORMAT_THUMBFRM(25) 302 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 303------------------------------------------------------------------------------------------------- 304| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 0: 1: 1: 0| 0: 0: 1: 0| 0: 0: 0: 0| 305------------------------------------------------------------------------------------------------- 306 307 mov r0, r4 308Opcode=2294 Name=tMOVr Format=ARM_FORMAT_THUMBFRM(25) 309 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 310------------------------------------------------------------------------------------------------- 311| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 0: 1: 1: 0| 0: 0: 1: 0| 1: 0: 1: 0| 312------------------------------------------------------------------------------------------------- 313 314 mov r2, r5 315Opcode=2278 Name=tLDRspi Format=ARM_FORMAT_THUMBFRM(25) 316 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 317------------------------------------------------------------------------------------------------- 318| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 0: 1| 1: 0: 1: 1| 0: 0: 0: 0| 0: 0: 0: 0| 319------------------------------------------------------------------------------------------------- 320 321 ldr r3, [sp] 322Opcode=2246 Name=tBLr9 Format=ARM_FORMAT_THUMBFRM(25) 323 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 324------------------------------------------------------------------------------------------------- 325| 1: 1: 1: 1| 0: 1: 1: 1| 1: 1: 1: 1| 1: 1: 0: 1| 1: 1: 1: 1| 1: 1: 1: 1| 1: 0: 0: 1| 1: 1: 0: 1| 326------------------------------------------------------------------------------------------------- 327 328 bl #-8390 329Opcode=2153 Name=t2SUBri Format=ARM_FORMAT_THUMBFRM(25) 330 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 331------------------------------------------------------------------------------------------------- 332| 1: 1: 1: 1| 0: 0: 0: 1| 1: 0: 1: 0| 0: 1: 1: 1| 0: 0: 0: 0| 1: 1: 0: 1| 0: 0: 0: 0| 1: 0: 0: 0| 333------------------------------------------------------------------------------------------------- 334 335 sub.w sp, r7, #8 336Opcode=1926 Name=t2LDMIA_UPD Format=ARM_FORMAT_THUMBFRM(25) 337 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 338------------------------------------------------------------------------------------------------- 339| 1: 1: 1: 0| 1: 0: 0: 0| 1: 0: 1: 1| 1: 1: 0: 1| 0: 1: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 0: 0: 0: 0| 340------------------------------------------------------------------------------------------------- 341 342 pop.w {r4, r5, r7, lr} 343Opcode=2230 Name=tADDspi Format=ARM_FORMAT_THUMBFRM(25) 344 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 345------------------------------------------------------------------------------------------------- 346| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 347------------------------------------------------------------------------------------------------- 348 349 add sp, #16 350Opcode=2250 Name=tBX_RET Format=ARM_FORMAT_THUMBFRM(25) 351 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 352------------------------------------------------------------------------------------------------- 353| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 0| 0: 1: 1: 1| 0: 1: 1: 1| 0: 0: 0: 0| 354------------------------------------------------------------------------------------------------- 355 356 bx lr 357Opcode=2300 Name=tNOP Format=ARM_FORMAT_THUMBFRM(25) 358 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 359------------------------------------------------------------------------------------------------- 360| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 1: 0: 1: 1| 1: 1: 1: 1| 0: 0: 0: 0| 0: 0: 0: 0| 361------------------------------------------------------------------------------------------------- 362 363 nop 364Opcode=2293 Name=tMOVi8 Format=ARM_FORMAT_THUMBFRM(25) 365 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 366------------------------------------------------------------------------------------------------- 367| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 1: 0| 0: 0: 1: 1| 1: 0: 0: 0| 1: 1: 1: 0| 368------------------------------------------------------------------------------------------------- 369 370 movs r3, #142 371Opcode=2290 Name=tMOVSr Format=ARM_FORMAT_THUMBFRM(25) 372 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 373------------------------------------------------------------------------------------------------- 374| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 1| 375------------------------------------------------------------------------------------------------- 376 377 movs r5, r0 378Opcode=2225 Name=tADDi8 Format=ARM_FORMAT_THUMBFRM(25) 379 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 380------------------------------------------------------------------------------------------------- 381| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 0: 1| 0: 1: 1: 1| 1: 0: 1: 0| 382------------------------------------------------------------------------------------------------- 383 384 adds r1, #122 385Opcode=2290 Name=tMOVSr Format=ARM_FORMAT_THUMBFRM(25) 386 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 387------------------------------------------------------------------------------------------------- 388| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 1| 389------------------------------------------------------------------------------------------------- 390 391 movs r5, r0 392Opcode=2225 Name=tADDi8 Format=ARM_FORMAT_THUMBFRM(25) 393 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 394------------------------------------------------------------------------------------------------- 395| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 1: 1| 0: 0: 0: 1| 0: 1: 1: 0| 1: 0: 0: 0| 396------------------------------------------------------------------------------------------------- 397 398 adds r1, #104 399Opcode=2290 Name=tMOVSr Format=ARM_FORMAT_THUMBFRM(25) 400 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 401------------------------------------------------------------------------------------------------- 402| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 0: 0: 0| 0: 1: 0: 1| 403------------------------------------------------------------------------------------------------- 404 405 movs r5, r0 406[16:28:00] johnny:/Volumes/data/Radar/9131529 $ 407