root/platform/ixus80_sd1100/sub/100c/debug.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. sub_FF82786C_my
  2. open_crash
  3. write_crash
  4. close_crash
  5. assert_hook
  6. abort_hook
  7. panic_hook
  8. panic_hook_dump
  9. abort_hook_dump
  10. sub_FF82A1FC_my
  11. taskcreate_WdtReset_my
  12. WdtPrint_my
  13. sub_FF81351C_my
  14. sub_FF810904_my
  15. sub_FF814970_my

   1 #include "lolevel.h"
   2 #include "stdlib.h"
   3 #include "script.h"
   4 #include "console.h"
   5 // exception handler hooks
   6 // Extracted method: (ff82786c-ff827894)
   7 void __attribute__((naked,noinline)) sub_FF82786C_my() {
   8         asm volatile (
   9                 "stmdb  sp!, {r4, lr} \n"
  10                 "mov    r0, #12 \n" // ; 0xc
  11                 "BL     sub_FF8627FC \n" // create taks errlog (?)
  12 
  13 //      "ldr    r0,  =0xff862858 \n" // assert hook
  14         "ldr    r0,  =assert_hook \n" //
  15                 "mov    r1, #0  \n" // ; 0x0
  16                 "BL     sub_FF81BDD8 \n" // register
  17 
  18 //      "ldr    r0,  =0xff862c50 \n" // cpu abort
  19         "ldr    r0,  =abort_hook \n" //
  20                 "BL     sub_FF862240 \n" // register
  21 
  22 //      "ldr    r0,  =0xff862fcc \n" // os panic
  23         "ldr    r0,  =panic_hook \n" //
  24                 "BL     sub_FF86224C \n" // register
  25                 "ldmia  sp!, {r4, pc} \n"
  26         );
  27 }
  28 
  29 // #define O_APPEND 0x8
  30 static int crash_fd = 0;
  31 void open_crash() {
  32         crash_fd = open("A/crash.log", O_WRONLY|O_CREAT|O_APPEND, 0777);
  33 }
  34 void write_crash(char* buf, int len) {
  35         write(crash_fd, buf, len);
  36 }
  37 void close_crash() {
  38         close(crash_fd);
  39 }
  40 
  41 // all original hooks write crashlog to ROM
  42 // see
  43 // OpLog.Get = OpLog.ReadFromROM, OpLog.WriteToSD
  44 //
  45 extern void _OpLog_WriteToSD(int);
  46 
  47 void assert_hook() {
  48         asm volatile(
  49                 "stmdb sp!, {r0, r1} \n"
  50         );
  51         console_add_line("assert failed: game over :(");
  52         _OpLog_WriteToSD(0);
  53         msleep(1000);
  54         asm volatile(
  55                 "ldmia sp!, {r0, r1} \n"
  56                 "BL sub_FF862858 \n" // original assert handler, no return
  57         );
  58         console_add_line("assert done");
  59 }
  60 
  61 void abort_hook() {
  62         asm volatile(
  63                 "stmdb sp!, {r0} \n"
  64         );
  65 
  66         console_add_line("abort error: game over :(");
  67         _OpLog_WriteToSD(0);
  68         msleep(1000);
  69         asm volatile(
  70                 "ldmia sp!, {r0} \n"
  71                 "BL sub_FF862C50 \n" // abort default, no return: default shutdown
  72         );
  73 
  74         console_add_line("abort done");
  75 }
  76 // GetLogToFile
  77 void panic_hook_dump();
  78 void panic_hook() {
  79         asm volatile(
  80                 "stmdb sp!, {r0, r1} \n"
  81         );
  82         console_add_line("dryos panic: game over :(");
  83         _OpLog_WriteToSD(0);
  84         msleep(1000);
  85         asm volatile(
  86                 "ldmia sp!, {r0, r1} \n"
  87                 "BL sub_FF862FCC \n" // panic_hook_dump();
  88         );
  89         console_add_line("panic done");
  90 }
  91 #if 0
  92 ///////////////////////////////////////
  93 // panic hook
  94 // Extracted method: (ff862fcc-ff86304c)
  95 void __attribute__((naked,noinline)) panic_hook_dump() {
  96         asm volatile (
  97                 "stmdb  sp!, {r2, r3, r4, r5, r6, r7, r8, lr} \n"
  98                 "ldr    r5,  =0x00005574 \n"
  99                 "mov    r7, r0 \n"
 100                 "ldr    r0, [r5] \n"
 101                 "mov    r8, r1 \n"
 102                 "cmp    r0, #1  \n" // ; 0x1
 103                 "BEQ    sub_FF863114 \n" // <_binary_dump_bin_start+0x53114 +304>
 104                 "mov    r0, #1  \n" // ; 0x1
 105                 "str    r0, [r5] \n"
 106                 "ldr    r0, =0xff8632e0 \n" // ; (7379530a)
 107                 "mov    r2, r8 \n"
 108                 "mov    r1, r7 \n"
 109 //      "BL     sub_FF81351C \n" // ; STDERR
 110         "BL     sub_FF81351C_my \n" //
 111                 "ldr    r0, [r5, #8] \n"
 112                 "BL     sub_FF82789C \n" // <_binary_dump_bin_start+0x1789c -243560>
 113                 "ldr    r0,  =0xff862798 \n"
 114                 "ldr    r1, [r5, #8] \n"
 115 //      "BL     sub_FF81351C \n" // ; STDERR
 116         "BL     sub_FF81351C_my \n" //
 117                 "mov    r1, sp \n"
 118                 "add    r2, r1, #128    \n" // ; 0x80
 119                 "ldr    r0, =0xff86330c \n" // ; (63617453)  *"StackDump(0x%X - 0x%X):"
 120                 "str    r1, [sp, #4] \n"
 121 //      "BL     sub_FF81351C \n" // ; STDERR
 122         "BL     sub_FF81351C_my \n" //
 123                 "ldr    r4, [sp, #4] \n"
 124                 "B      loc_FF863040 \n" // <_binary_dump_bin_start+0x53040 +20>
 125         "loc_FF863030:\n"
 126                 "ldr    r0,  =0xff862c0c \n"
 127                 "ldr    r1, [r4] \n"
 128 //      "BL     sub_FF81351C \n" // ; STDERR
 129         "BL     sub_FF81351C_my \n" //
 130                 "add    r4, r4, #4      \n" // ; 0x4
 131         "loc_FF863040:\n"
 132                 "ldr    r0, [sp, #4] \n"
 133                 "add    r0, r0, #128    \n" // ; 0x80
 134                 "cmp    r4, r0 \n"
 135                 "BCC    loc_FF863030 \n" // <_binary_dump_bin_start+0x53030 -28>
 136         // continue ROM
 137         "B sub_FF863050 \n"
 138         );
 139 }
 140 
 141 ///////////////////////////////////////
 142 // cpu abort handler
 143 // Extracted method: (ff862c50-ff862db4)
 144 void __attribute__((naked,noinline)) abort_hook_dump() {
 145         asm volatile (
 146                 "stmdb  sp!, {r4, r5, r6, r7, r8, r9, sl, lr} \n"
 147                 "ldr    r8,  =0x00005574 \n"
 148                 "mov    r4, r0 \n"
 149                 "ldr    r0, [r8] \n"
 150                 "sub    sp, sp, #128    \n" // ; 0x80
 151                 "cmp    r0, #1  \n" // ; 0x1
 152                 "BEQ    sub_FF862FC4 \n" // <_binary_dump_bin_start+0x52fc4 +860>
 153                 "mov    r0, #1  \n" // ; 0x1
 154                 "str    r0, [r8] \n"
 155                 "ldr    r0, [r4] \n"
 156                 "cmp    r0, #4  \n" // ; 0x4
 157                 "ldreq  r5, =0xff862f44 \n" // ; (65646e75)  *"undefined instruction"
 158                 "BEQ    loc_FF862C90 \n" // <_binary_dump_bin_start+0x52c90 +16>
 159                 "cmp    r0, #12 \n" // ; 0xc
 160                 "ldreq  r5, =0xff862f5c \n" // ; (66657270)  *"prefetch abort"
 161                 "ldrne  r5, =0xff862f6c \n" // ; (61746164)  *"data abort"
 162         "loc_FF862C90:\n"
 163                 "ldr    r0, [r4, #4] \n"
 164                 "cmp    r0, #0  \n" // ; 0x0
 165                 "movne  r7, #2326528    \n" // ; 0x238000
 166                 "BNE    loc_FF862CBC \n" // <_binary_dump_bin_start+0x52cbc +32>
 167                 "BL     sub_FF812128 \n" // <_binary_dump_bin_start+0x2128 -330616>
 168                 "ldr    r0, [r4, #8] \n"
 169                 "add    r1, sp, #80     \n" // ; 0x50
 170                 "BL     sub_FF81339C \n" // <_binary_dump_bin_start+0x339c -325904>
 171                 "ldr    r0, [sp, #108] \n"
 172                 "ldr    r1, [sp, #112] \n"
 173                 "add    r7, r0, r1 \n"
 174         "loc_FF862CBC:\n"
 175                 "mov    r1, r5 \n"
 176                 "ldr    r0, =0xff862f78 \n" // ; (6378450a)
 177 //      "BL     sub_FF81351C \n" // ; STDERR
 178         "BL     sub_FF81351C_my \n" //
 179                 "ldr    r0, [r8, #8] \n"
 180                 "BL     sub_FF82789C \n" // <_binary_dump_bin_start+0x1789c -242736>
 181                 "ldr    r0, =0xff862798 \n" // ; (7563634f)  *"Occured Time  %s"
 182                 "ldr    r1, [r8, #8] \n"
 183 //      "BL     sub_FF81351C \n" // ; STDERR
 184         "BL     sub_FF81351C_my \n" //
 185                 "ldr    r0, [r4, #4] \n"
 186                 "ldr    r9,  =0xff810218 \n"
 187                 "cmp    r0, #0  \n" // ; 0x0
 188                 "ldrne  r0, [r9] \n"
 189                 "ldrne  r0, [r0] \n"
 190                 "movne  r1, r0, lsr #2 \n"
 191                 "ldrne  r0,  =0xff8627b0 \n"
 192                 "BNE    loc_FF862D10 \n" // <_binary_dump_bin_start+0x52d10 +24>
 193                 "ldr    r1, [r4, #8] \n"
 194                 "ldr    r0, =0xff862be8 \n" // ; (6b736154)  *"Task ID: %d"
 195 //      "BL     sub_FF81351C \n" // ; STDERR
 196         "BL     sub_FF81351C_my \n" //
 197                 "ldr    r1, [sp, #124] \n"
 198                 "ldr    r0, =0xff862bf8 \n" // ; (6b736154)  *"Task name: %s"
 199         "loc_FF862D10:\n"
 200 //      "BL     sub_FF81351C \n" // ; STDERR
 201         "BL     sub_FF81351C_my \n" //
 202                 "ldr    r0, =0xff862f90 \n" // ; (20637845)  *"Exc Registers:"
 203 //      "BL     sub_FF81351C \n" // ; STDERR
 204         "BL     sub_FF81351C_my \n" //
 205                 "mov    r5, #0  \n" // ; 0x0
 206         "loc_FF862D20:\n"
 207                 "ldr    r0, [r4, #12] \n"
 208                 "ldr    r1, [r0, r5, lsl #2] \n"
 209                 "ldr    r0, =0xff862c0c \n" // ; (30257830)
 210 //      "BL     sub_FF81351C \n" // ; STDERR
 211         "BL     sub_FF81351C_my \n" //
 212                 "add    r5, r5, #1      \n" // ; 0x1
 213                 "cmp    r5, #15 \n" // ; 0xf
 214                 "BLT    loc_FF862D20 \n" // <_binary_dump_bin_start+0x52d20 -24>
 215                 "ldr    r0, [r4, #12] \n"
 216                 "ldr    r1, [r0, #60] \n"
 217                 "ldr    r0, =0xff862c0c \n" // ; (30257830)
 218 //      "BL     sub_FF81351C \n" // ; STDERR
 219         "BL     sub_FF81351C_my \n" //
 220                 "ldr    r0, [r4, #12] \n"
 221                 "ldr    r1, [r0, #64] \n"
 222                 "ldr    r0, =0xff862c0c \n" // ; (30257830)
 223 //      "BL     sub_FF81351C \n" // ; STDERR
 224         "BL     sub_FF81351C_my \n" //
 225                 "ldr    r0, [r4, #12] \n"
 226                 "ldr    r5, [r0, #52] \n"
 227                 "ldr    r0, =0xff862c14 \n" // ; (63617453)  *"StackDump:"
 228                 "mov    sl, r5 \n"
 229 //      "BL     sub_FF81351C \n" // ; STDERR
 230         "BL     sub_FF81351C_my \n" //
 231                 "mov    r6, #0  \n" // ; 0x0
 232         "loc_FF862D74:\n"
 233                 "cmp    r5, r7 \n"
 234                 "BHI    loc_FF862D98 \n" // <_binary_dump_bin_start+0x52d98 +32>
 235                 "ldr    r1, [r5] \n"
 236                 "ldr    r0, =0xff862c0c \n" // ; (30257830)
 237 //      "BL     sub_FF81351C \n" // ; STDERR
 238         "BL     sub_FF81351C_my \n" //
 239                 "add    r6, r6, #1      \n" // ; 0x1
 240                 "cmp    r6, #32 \n" // ; 0x20
 241                 "add    r5, r5, #4      \n" // ; 0x4
 242                 "BLT    loc_FF862D74 \n" // <_binary_dump_bin_start+0x52d74 -32>
 243         "loc_FF862D98:\n"
 244                 "ldr    r0, [r4, #4] \n"
 245                 "cmp    r0, #0  \n" // ; 0x0
 246                 "BNE    sub_FF862DBC \n" // <_binary_dump_bin_start+0x52dbc +28>
 247                 "ldr    r0, [r8, #16] \n"
 248                 "cmp    r0, #12 \n" // ; 0xc
 249                 "BEQ    sub_FF862DC8 \n" // <_binary_dump_bin_start+0x52dc8 +28>
 250                 "ldr    r0,  =0xff862268 \n"
 251                 "mov    r1, #0  \n" // ; 0x0
 252         "B sub_FF862DB8 \n" // continue rom
 253         );
 254 }
 255 #endif
 256 
 257 ////////////////////////////////////////
 258 // Watchdog
 259 // Extracted method: (ff82a1fc-ff82a298)
 260 void __attribute__((naked,noinline)) sub_FF82A1FC_my() {
 261         asm volatile (
 262                 "stmdb  sp!, {r4, lr} \n"
 263                 "mov    r1, #4  \n" // ; 0x4
 264                 "mov    r0, #2  \n" // ; 0x2
 265 //      "BL     sub_FF86B9F4 \n" // <taskcreate_WdtReset +268268>
 266         "BL taskcreate_WdtReset_my \n" // --------------->
 267                 "BL     sub_FF86BA8C \n" // <StartWDT +268416>
 268                 "BL     sub_FF86900C \n" // <EventProcedure +257532>
 269                 "BL     sub_FF864D60 \n" //
 270                 "BL     sub_FF83F1FC \n" //
 271                 "BL     sub_FF86BC74 \n" //
 272                 "ldr    r2,  =0x12cea600 \n"
 273                 "ldr    r1,  =0x7fe8177f \n"
 274                 "BL     sub_FF828348 \n" //
 275                 "BL     sub_FF8411E0 \n" //
 276                 "BL     sub_FF846238 \n" //
 277                 "BL     sub_FF821748 \n" //
 278                 "BL     sub_FF845CC0 \n" //
 279                 "mov    r0, #1  \n" // ; 0x1
 280                 "BL     sub_FF842BBC \n" // <taskcreate_AudioTsk +100732>
 281                 "BL     sub_FF83D9E8 \n" //
 282                 "BL     sub_FF8362B4 \n" //
 283                 "BL     sub_FF840988 \n" //
 284                 "BL     sub_FF84074C \n" //
 285                 "BL     sub_FF840A40 \n" //
 286                 "BL     sub_FF8450B0 \n" // <taskcreate_Thermometer +110168>
 287                 "BL     sub_FF855E80 \n" //
 288                 "BL     sub_FF841FC4 \n" // <taskcreate_LEDCon +97636>
 289                 "BL     sub_FF86CA3C \n" //
 290                 "ldmia  sp!, {r4, lr} \n"
 291                 "B      sub_FF82A1E0 \n" //
 292         );
 293 }
 294 
 295 
 296 // Extracted method: (ff86b9f4-ff86ba88)
 297 void __attribute__((naked,noinline)) taskcreate_WdtReset_my() {
 298         asm volatile (
 299                 "mov    r1, r1, lsl #8 \n"
 300                 "stmdb  sp!, {r3, r4, r5, lr} \n"
 301                 "orr    r0, r1, r0, lsl #4 \n"
 302                 "ldr    r4,  =0x00005770 \n"
 303                 "ldr    r1,  =0xc0410000 \n"
 304                 "orr    r0, r0, #-1073741824    \n" // ; 0xc0000000
 305                 "str    r0, [r4, #8] \n"
 306                 "str    r0, [r1] \n"
 307                 "mov    r0, #0  \n" // ; 0x0
 308                 "BL     sub_FF8280C8 \n" // <_binary_dump_bin_start+0x180c8 -276816>
 309                 "str    r0, [r4, #16] \n"
 310                 "mov    r0, #0  \n" // ; 0x0
 311                 "str    r0, [r4, #12] \n"
 312                 "ldr    r0, =0xff86bba0 \n" // ; (49746457)  *"WdtInt"
 313                 "mov    r3, #0  \n" // ; 0x0
 314                 "ldr    r2, =0xff86b9a0 \n" // ; (e59f11f0)
 315                 "mov    r1, #3  \n" // ; 0x3
 316                 "BL     sub_FF81B5A0 \n" // <_binary_dump_bin_start+0xb5a0 -328856>
 317                 "mov    r3, #0  \n" // ; 0x0
 318                 "str    r3, [sp] \n"
 319                 "ldr    r3, =0xff86b9cc \n" // ; (e92d4070)
 320                 "mov    r2, #512        \n" // ; 0x200
 321                 "mov    r1, #24 \n" // ; 0x18
 322                 "ldr    r0, =0xff86bba8 \n" // ; (52746457)  *"WdtReset"
 323                 "BL     sub_FF81BBB8 \n" // <KernelCreateTask -327324>
 324                 "mov    r1, #0  \n" // ; 0x0
 325                 "mov    r0, #0  \n" // ; 0x0
 326                 "BL     sub_FF81BC34 \n" // <_binary_dump_bin_start+0xbc34 -327212>
 327                 "str    r0, [r4, #20] \n"
 328                 "mov    r3, #0  \n" // ; 0x0
 329                 "str    r3, [sp] \n"
 330 //      "ldr    r3, =0xff86b918 \n" // ; (e92d40f8)
 331         "ldr    r3, =WdtPrint_my \n" // ---------->
 332                 "ldr    r0, =0xff86bbb4 \n" // ; (50746457)  *"WdtPrint"
 333                 "mov    r2, #512        \n" // ; 0x200
 334                 "mov    r1, #1  \n" // ; 0x1
 335                 "BL     sub_FF81BBB8 \n" // <KernelCreateTask -327368>
 336                 "mov    r0, #0  \n" // ; 0x0
 337                 "ldmia  sp!, {r3, r4, r5, pc} \n"
 338         );
 339 }
 340 
 341 //WdtPrint
 342 // Extracted method: (ff86b918-ff86b9c8)
 343 void __attribute__((naked,noinline)) WdtPrint_my() {
 344         asm volatile (
 345                 "stmdb  sp!, {r3, r4, r5, r6, r7, lr} \n"
 346                 "ldr    r5,  =0x0001a0c0 \n"
 347                 "mov    r6, #0  \n" // ; 0x0
 348         "loc_FF86B924:\n"
 349                 "mov    r0, #0  \n" // ; 0x0
 350         "loc_FF86B928:\n"
 351                 "str    r6, [r5, r0, lsl #4] \n"
 352                 "add    r0, r0, #1      \n" // ; 0x1
 353                 "cmp    r0, #10 \n" // ; 0xa
 354                 "BLT    loc_FF86B928 \n" // <_binary_dump_bin_start+0x5b928 -12>
 355                 "ldr    r4,  =0x00005770 \n"
 356                 "mov    r1, #0  \n" // ; 0x0
 357                 "ldr    r0, [r4, #20] \n"
 358                 "BL     sub_FF81B774 \n" // <TakeSemaphore -328144>
 359                 "mov    r0, #800        \n" // ; 0x320
 360                 "BL     sub_FF8284B4 \n" // <SleepTask -275608>
 361                 "mov    r0, #10 \n" // ; 0xa
 362                 "str    r0, [r4, #4] \n"
 363 
 364         "ldr    r0, =0xff86bb4c \n" // ; (21200a0a) "!!!WatchDog expired!!!"
 365         "BL console_add_line \n"
 366                 "ldr    r0, =0xff86bb4c \n" // ; (21200a0a) "!!!WatchDog expired!!!"
 367         "BL     sub_FF81351C_my \n" // ; STDERR
 368         "mov r0, #0 \n"
 369         "BL _OpLog_WriteToSD \n"
 370 
 371                 "mov    r4, #0  \n" // ; 0x0
 372                 "B      loc_FF86B98C \n" // <_binary_dump_bin_start+0x5b98c +40>
 373         "loc_FF86B968:\n"
 374                 "str    r3, [sp] \n"
 375                 "ldr    r2, [r0, #8] \n"
 376                 "ldr    r3, [r0, #12] \n"
 377                 "ldr    r1, [r5, r4, lsl #4] \n"
 378                 "ldr    r0, =0xff86bb6c \n" // ; (73255b20)  *" [%s (LR:0x%08lx , PC:0x%08lx)] -> [%s] "
 379         "BL     sub_FF81351C_my\n" // ; STDERR
 380                 "add    r4, r4, #1      \n" // ; 0x1
 381                 "cmp    r4, #10 \n" // ; 0xa
 382                 "BGE    loc_FF86B924 \n" // <_binary_dump_bin_start+0x5b924 -100>
 383         "loc_FF86B98C:\n"
 384                 "add    r0, r5, r4, lsl #4 \n"
 385                 "ldr    r3, [r0, #4] \n"
 386                 "cmp    r3, #0  \n" // ; 0x0
 387                 "BNE    loc_FF86B968 \n" // <_binary_dump_bin_start+0x5b968 -48>
 388                 "B      loc_FF86B924 \n" // <_binary_dump_bin_start+0x5b924 -120>
 389         );
 390 }
 391 
 392 //
 393 // printf STDERR ... whatever ...
 394 
 395 // Extracted method: (ff81351c-ff81355c)
 396 void __attribute__((naked,noinline)) sub_FF81351C_my() {
 397         asm volatile (
 398                 "stmdb  sp!, {r0, r1, r2, r3} \n"
 399                 "stmdb  sp!, {r4, lr} \n"
 400         );
 401         open_crash();
 402         asm volatile (
 403                 "sub    sp, sp, #24     \n" // ; 0x18
 404                 "mov    r0, #2  \n" // ; 0x2
 405                 "strh   r0, [sp, #16] \n"
 406                 "mrs    r4, CPSR \n"
 407                 "orr    r0, r4, #128    \n" // ; 0x80
 408                 "msr    CPSR_c, r0 \n"
 409                 "ldr    r2, [sp, #32] \n"
 410 //      "ldr    r0,  =0xff810904 \n"
 411         "ldr    r0,  =sub_FF810904_my \n"
 412                 "add    r3, sp, #36     \n" // ; 0x24
 413                 "mov    r1, sp \n"
 414                 "BL     sub_FF818B80 \n" // <_binary_dump_bin_start+0x8b80 +22068>
 415                 "msr    CPSR_c, r4 \n"
 416                 "add    sp, sp, #24     \n" // ; 0x18
 417         );
 418         close_crash();
 419         asm volatile (
 420                 "ldr    r4, [sp], #4 \n"
 421                 "ldr    pc, [sp], #20 \n"
 422         );
 423 }
 424 
 425 // Extracted method: (ff810904-ff810920)
 426 // r0=?
 427 // r1=text
 428 // r2=len
 429 void __attribute__((naked,noinline)) sub_FF810904_my() {
 430         asm volatile (
 431                 "mov    r0, r1 \n"
 432                 "mov    r1, r2 \n"
 433                 "ldr    r2,  =0x00001900 \n"
 434                 "ldr    r2, [r2] \n"
 435 //              "cmp    r2, #0  \n" // ; 0x0
 436 //              "moveq  r0, r1 \n"
 437 //      "BNE    sub_FF814970 \n" //
 438         "B      sub_FF814970_my \n" //
 439 //      "bx     lr \n"
 440         );
 441 }
 442 
 443 // Extracted method: (ff814970-ff814994)
 444 // r0=text
 445 // r1=len
 446 void __attribute__((naked,noinline)) sub_FF814970_my() {
 447         asm volatile (
 448                 "mov    r2, r1 \n"
 449                 "mov    r1, r0 \n"
 450                 "stmdb  sp!, {r3, lr} \n"
 451                 "mov    r3, sp \n"
 452 //      "mov    r0, #0  \n" // ; 0x0
 453 //      "BL     sub_FF81ABFC <<<<<<< writef errlog, *r1=text, r2=len \n"
 454         "mov r0, r1 \n"
 455         "mov r1, r2 \n"
 456         "BL write_crash \n"
 457                 "cmp    r0, #0  \n" // ; 0x0
 458                 "ldrge  r0, [sp] \n"
 459                 "mvnlt  r0, #0  \n" // ; 0x0
 460                 "ldmia  sp!, {ip, pc} \n"
 461         );
 462 }

/* [<][>][^][v][top][bottom][index][help] */