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

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