2 * linux/arch/arm/lib/ll_char_wr.S
4 * Copyright (C) 1995, 1996 Russell King.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Speedups & 1bpp code (C) 1996 Philip Blundell & Russell King.
12 * 10-04-96 RMK Various cleanups & reduced register usage.
13 * 08-04-98 RMK Shifts re-ordered
16 @ Regs: [] = corruptible
20 #include <linux/linkage.h>
21 #include <asm/assembler.h>
25 .word bytes_per_char_h
28 .word con_charconvtable
36 stmfd sp!, {r4 - r7, lr}
38 @ Smashable regs: {r0 - r3}, [r4 - r7], (r8 - fp), [ip], (sp), [lr], (pc)
41 * calculate offset into character table
45 * calculate offset required for each row.
48 ldmia ip, {r3, r4, r5, r6, lr}
55 * Go to resolution-dependent routine...
59 add r0, r0, r5, lsl #3 @ Move to bottom of character
65 @ Smashable regs: {r0 - r3}, [r4], {r5 - r7}, (r8 - fp), [ip], (sp), {lr}, (pc)
68 ldr r7, [lr, r7, lsl #2]
70 sub r1, r1, #1 @ avoid using r7 directly after
73 ldr r7, [lr, r7, lsl #2]
75 tst r1, #7 @ avoid using r7 directly after
80 ldmfd sp!, {r4 - r7, pc}
83 @ Smashable regs: {r0 - r3}, [r4], {r5 - r7}, (r8 - fp), [ip], (sp), {lr}, (pc)
87 ldr ip, [lr, ip, lsl #2]
89 and ip, r7, #15 @ avoid r4
90 ldr ip, [lr, ip, lsl #2] @ avoid r4
91 mul ip, r2, ip @ avoid r4
92 sub r1, r1, #1 @ avoid ip
93 sub r0, r0, r5 @ avoid ip
97 ldr ip, [lr, ip, lsl #2]
99 and ip, r7, #15 @ avoid r4
100 ldr ip, [lr, ip, lsl #2] @ avoid r4
101 mul ip, r2, ip @ avoid r4
102 tst r1, #7 @ avoid ip
103 sub r0, r0, r5 @ avoid ip
108 ldmfd sp!, {r4 - r7, pc}
111 @ Smashable regs: {r0 - r3}, [r4], {r5, r6}, [r7], (r8 - fp), [ip], (sp), [lr], (pc)
130 ldmfd sp!, {r4 - r7, pc}
133 ENTRY(con_charconvtable)