1
2
3
4
5
6
7
8
9
10
11
12
13
14#include <linux/linkage.h>
15#include <asm/assembler.h>
16
17 .text
18
19
20
21
22
23
24#include "debug-macro.S"
25
26
27
28
29ENTRY(printhex8)
30 mov r1,
31 b printhex
32ENDPROC(printhex8)
33
34ENTRY(printhex4)
35 mov r1,
36 b printhex
37ENDPROC(printhex4)
38
39ENTRY(printhex2)
40 mov r1,
41printhex: adr r2, hexbuf
42 add r3, r2, r1
43 mov r1,
44 stb r1, [r3]
451: and r1, r0,
46 mov r0, r0 >>
47 csub.a r1,
48 beg 2f
49 add r1, r1,
502: add r1, r1,
51 stb.w r1, [r3+],
52 cxor.a r3, r2
53 bne 1b
54 mov r0, r2
55 b printascii
56ENDPROC(printhex2)
57
58 .ltorg
59
60ENTRY(printascii)
61 addruart r3
62 b 2f
631: waituart r2, r3
64 senduart r1, r3
65 busyuart r2, r3
66 cxor.a r1,
67 cmoveq r1,
68 beq 1b
692: cxor.a r0,
70 beq 3f
71 ldb.w r1, [r0]+,
72 cxor.a r1,
73 bne 1b
743: mov pc, lr
75ENDPROC(printascii)
76
77ENTRY(printch)
78 addruart r3
79 mov r1, r0
80 mov r0,
81 b 1b
82ENDPROC(printch)
83
84hexbuf: .space 16
85
86