public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Correct control register set for Coldfire MCF5249
@ 2004-10-07 10:30 Linus Nielsen Feltzing
  2004-10-07 15:23 ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Nielsen Feltzing @ 2004-10-07 10:30 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

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

[-- Attachment #2: controlreg2.patch --]
[-- Type: text/plain, Size: 2057 bytes --]

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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Correct control register set for Coldfire MCF5249
  2004-10-07 10:30 [PATCH] Correct control register set for Coldfire MCF5249 Linus Nielsen Feltzing
@ 2004-10-07 15:23 ` Nick Clifton
  2004-10-08  5:05   ` Linus Nielsen Feltzing
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2004-10-07 15:23 UTC (permalink / raw)
  To: Linus Nielsen Feltzing; +Cc: binutils

Hi Linus,

> 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.

Thanks - please could you supply a ChangeLog entry to go with this patch ?

Cheers
   Nick


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Correct control register set for Coldfire MCF5249
  2004-10-07 15:23 ` Nick Clifton
@ 2004-10-08  5:05   ` Linus Nielsen Feltzing
  2004-10-08  8:47     ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Nielsen Feltzing @ 2004-10-08  5:05 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 135 bytes --]

Nick Clifton wrote:

> Thanks - please could you supply a ChangeLog entry to go with this patch ?

Sure. Here's the new patch.

Linus


[-- Attachment #2: ctrlreg2.patch --]
[-- Type: text/plain, Size: 2645 bytes --]

Index: gas/ChangeLog
===================================================================
RCS file: /cvs/src/src/gas/ChangeLog,v
retrieving revision 1.2221
diff -u -r1.2221 ChangeLog
--- gas/ChangeLog	5 Oct 2004 13:51:35 -0000	1.2221
+++ gas/ChangeLog	8 Oct 2004 04:58:55 -0000
@@ -1,3 +1,10 @@
+2004-10-07  Linus Nielsen Feltzing  <linus@haxx.se>
+
+	* m68k-parse.h (enum m68k_register): New control register, MBAR2
+	(for MCF5249)
+
+	* tc-m68k.c: Correct control register set for MCF5249
+	
 2004-10-05  Paul Brook  <paul@codesourcery.com>
 
 	* config/tc-arm.c (unwind): New variable.
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	8 Oct 2004 04:58:55 -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	8 Oct 2004 04:58:57 -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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Correct control register set for Coldfire MCF5249
  2004-10-08  5:05   ` Linus Nielsen Feltzing
@ 2004-10-08  8:47     ` Nick Clifton
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Clifton @ 2004-10-08  8:47 UTC (permalink / raw)
  To: Linus Nielsen Feltzing; +Cc: binutils

Hi Linus,

> Sure. Here's the new patch.

Thanks.

> 2004-10-08  Linus Nielsen Feltzing  <linus@haxx.se>
> 
> 	* config/m68k-parse.h (enum m68k_register): New control register,
> 	MBAR2 (for MCF5249)
> 	* config/tc-m68k.c: Correct control register set for MCF5249.
> 

Approved and applied.

Cheers
   Nick



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-08  8:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-07 10:30 [PATCH] Correct control register set for Coldfire MCF5249 Linus Nielsen Feltzing
2004-10-07 15:23 ` Nick Clifton
2004-10-08  5:05   ` Linus Nielsen Feltzing
2004-10-08  8:47     ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).