Subject: broken bus_space_{read,write}
To: None <port-arm32@netbsd.org>
From: IWAMOTO Toshihiro <iwamoto@sat.t.u-tokyo.ac.jp>
List: port-arm32
Date: 03/10/2001 11:57:09
I've noticed arm/mainbus/mainbus_io_asm.S is broken, and would like to
commit a fix something like below.
Are there any problem commiting this?
I greped mainbus_bs in arm32, and arm32 doesn't seem to use these
functions.
Half word load and store are ARMv4 only, but I think it's ok.
They cannot be implemented for v3 and older anyway.
--- /dev/fd/62 Tue Nov 18 20:24:17 1997
+++ /tmp/mainbus_io_asm.S Sat Mar 10 11:44:42 2001
@@ -44,17 +44,15 @@
*/
ENTRY(mainbus_bs_r_1)
- ldrb r0, [r1, r2, lsl #2]
+ ldrb r0, [r1, r2]
mov pc, lr
ENTRY(mainbus_bs_r_2)
- ldr r0, [r1, r2, lsl #2]
- bic r0, r0, #0xff000000
- bic r0, r0, #0x00ff0000
+ ldrh r0, [r1, r2]
mov pc, lr
ENTRY(mainbus_bs_r_4)
- ldr r0, [r1, r2, lsl #2]
+ ldr r0, [r1, r2]
mov pc, lr
/*
@@ -62,17 +60,15 @@
*/
ENTRY(mainbus_bs_w_1)
- strb r3, [r1, r2, lsl #2]
+ strb r3, [r1, r2]
mov pc, lr
ENTRY(mainbus_bs_w_2)
- mov r3, r3, lsl #16
- orr r3, r3, r3, lsr #16
- str r3, [r1, r2, lsl #2]
+ strh r3, [r1, r2]
mov pc, lr
ENTRY(mainbus_bs_w_4)
- str r3, [r1, r2, lsl #2]
+ str r3, [r1, r2]
mov pc, lr
/*
--
IWAMOTO Toshihiro