This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Correct control register set for Coldfire MCF5249
- From: Linus Nielsen Feltzing <linus at haxx dot se>
- To: binutils at sources dot redhat dot com
- Date: Thu, 07 Oct 2004 12:30:23 +0200
- Subject: [PATCH] Correct control register set for Coldfire MCF5249
Hi again!
I have now dug a little deeper in the gas sources and found that my last
patch for the MCF5249 wasn't complete.
The 5249 doesn't have a TC register, and only two ACx registers. It also
has a second MBAR register named MBAR2.
I have attached a patch that adds the MBAR2 to the control register enum
and defines a correct register set for the MCF5249.
Enjoy!
Linus Nielsen Feltzing
Index: gas/config/m68k-parse.h
===================================================================
RCS file: /cvs/src/src/gas/config/m68k-parse.h,v
retrieving revision 1.6
diff -u -r1.6 m68k-parse.h
--- gas/config/m68k-parse.h 22 Apr 2004 10:33:15 -0000 1.6
+++ gas/config/m68k-parse.h 7 Oct 2004 09:54:06 -0000
@@ -124,6 +124,7 @@
MBAR0, MBAR1, /* mcfv4e added these. */
ACR0, ACR1, ACR2, ACR3, /* mcf5200 added these. */
FLASHBAR, RAMBAR, /* mcf528x added these. */
+ MBAR2, /* mcf5249 added this. */
MBAR,
#define last_movec_reg MBAR
/* End of movec ordering constraints. */
Index: gas/config/tc-m68k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68k.c,v
retrieving revision 1.58
diff -u -r1.58 tc-m68k.c
--- gas/config/tc-m68k.c 30 Sep 2004 17:08:50 -0000 1.58
+++ gas/config/tc-m68k.c 7 Oct 2004 09:54:08 -0000
@@ -178,6 +178,10 @@
RAMBAR0, RAMBAR1, MBAR,
0
};
+static const enum m68k_register mcf5249_control_regs[] = {
+ CACR, ACR0, ACR1, VBR, RAMBAR0, RAMBAR1, MBAR, MBAR2,
+ 0
+};
static const enum m68k_register mcf528x_control_regs[] = {
CACR, ACR0, ACR1, VBR, FLASHBAR, RAMBAR,
0
@@ -2990,6 +2994,7 @@
break;
case MBAR0:
case SECMBAR:
+ case MBAR2:
tmpreg = 0xC0E;
break;
case MBAR1:
@@ -3754,7 +3759,9 @@
{ "flashbar", FLASHBAR }, /* mcf528x registers. */
{ "rambar", RAMBAR }, /* mcf528x registers. */
- /* End of control registers. */
+
+ { "mbar2", MBAR2 }, /* mcf5249 registers. */
+/* End of control registers. */
{ "ac", AC },
{ "bc", BC },
@@ -4341,11 +4348,13 @@
break;
case mcf5200:
case mcf5206e:
- case mcf5249:
case mcf5307:
case mcf5407:
control_regs = mcf_control_regs;
break;
+ case mcf5249:
+ control_regs = mcf5249_control_regs;
+ break;
case mcf528x:
case mcf521x:
control_regs = mcf528x_control_regs;