diff options
-rw-r--r-- | framework/aarch32/asm_debug.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/aarch32/asm_debug.S b/framework/aarch32/asm_debug.S index ca9f9cb..4a373c5 100644 --- a/framework/aarch32/asm_debug.S +++ b/framework/aarch32/asm_debug.S @@ -89,6 +89,8 @@ func asm_assert /* Print line number in decimal */ mov r6, #10 /* Divide by 10 after every loop iteration */ ldr r5, =MAX_DEC_DIVISOR + /* TODO: test whether udiv is supported, instead of using ARCH_MAJOR */ +#if ARM_ARCH_MAJOR == 8 dec_print_loop: udiv r0, r4, r5 /* Quotient */ mls r4, r0, r5, r4 /* Remainder */ @@ -97,6 +99,14 @@ dec_print_loop: udiv r5, r5, r6 /* Reduce divisor */ cmp r5, #0 bne dec_print_loop +#else + mov r0, #'0' + bl plat_crash_console_putc + mov r0, #'x' + bl plat_crash_console_putc + mov r4, r5 + bl asm_print_hex +#endif bl plat_crash_console_flush |