[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] [PATCH] acia.S wrong ColdFire instruction
Hello.
I found a bug in gas which incorrectly allows a complicated addressing mode
which is not actually supported on ColdFire:
http://sourceware.org/bugzilla/show_bug.cgi?id=13050
That addressing mode was incorrectly used in acia.S. Here is a patch.
Alan, please commit!
acia.patch
Fixed ColdFire version using unsupported instruction due to gas bug #13050.
Contributed by Vincent Riviere.
--
Vincent Rivière
diff -x CVS -aurN freemint.orig/sys/arch/acia.S freemint.work/sys/arch/acia.S
--- freemint.orig/sys/arch/acia.S 2011-03-21 21:33:54.000000000 +0100
+++ freemint.work/sys/arch/acia.S 2011-08-01 23:30:05.140625000 +0200
@@ -96,7 +96,11 @@
move.b (0xfc00).w,d1 // ACIA control
move.l _keyrec,a0
btst #0x07,d1 // interrupt request
+#ifdef __mcoldfire__
+ beq return
+#else
beq.s return
+#endif
btst #0x00,d1 // Receiver full
beq.s skip
move.l d1,-(sp)
@@ -142,13 +146,15 @@
lea type,a1
#ifdef __mcoldfire__
- move.b (a1,d0.l),IKBDSTATE(a3)
+ move.b (a1,d0.l),d1
+ move.b d1,IKBDSTATE(a3)
#else
move.b (a1,d0.w),IKBDSTATE(a3)
#endif
lea todo,a1
#ifdef __mcoldfire__
- move.b (a1,d0.l),IKBDTODO(a3)
+ move.b (a1,d0.l),d1
+ move.b d1,IKBDTODO(a3)
add.l #0xf6,d0
#else
move.b (a1,d0.w),IKBDTODO(a3)