From 4f38ab058ed5f75aff11c3e3c9e974ebb0dfa17a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 1 May 2002 23:09:09 +0000 Subject: 2002-05-01 Eric Norum * console/console.c, fatal/bspfatal.c, startup/bspclean.c, startup/page_table.c: Per PR200 fix multi-line inline assembly to satisfy gcc 3.1 and newer. --- c/src/lib/libbsp/m68k/mvme167/ChangeLog | 6 ++++ c/src/lib/libbsp/m68k/mvme167/console/console.c | 34 +++++++++++----------- c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c | 14 ++++----- c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c | 4 +-- c/src/lib/libbsp/m68k/mvme167/startup/page_table.c | 30 +++++++++---------- 5 files changed, 47 insertions(+), 41 deletions(-) (limited to 'c') diff --git a/c/src/lib/libbsp/m68k/mvme167/ChangeLog b/c/src/lib/libbsp/m68k/mvme167/ChangeLog index 4f4ae246ad..f3070d596e 100644 --- a/c/src/lib/libbsp/m68k/mvme167/ChangeLog +++ b/c/src/lib/libbsp/m68k/mvme167/ChangeLog @@ -1,3 +1,9 @@ +2002-05-01 Eric Norum + + * console/console.c, fatal/bspfatal.c, startup/bspclean.c, + startup/page_table.c: Per PR200 fix multi-line inline assembly + to satisfy gcc 3.1 and newer. + 2002-03-27 Ralf Corsepius * configure.ac: diff --git a/c/src/lib/libbsp/m68k/mvme167/console/console.c b/c/src/lib/libbsp/m68k/mvme167/console/console.c index f7a7935667..90da9ebed5 100644 --- a/c/src/lib/libbsp/m68k/mvme167/console/console.c +++ b/c/src/lib/libbsp/m68k/mvme167/console/console.c @@ -1297,13 +1297,13 @@ int _167Bug_pollRead( */ rtems_interrupt_disable( previous_level ); - asm volatile( "movew %1, -(%%sp) /* Channel */ - trap #15 /* Trap to 167Bug */ - .short 0x61 /* Code for .REDIR_I */ - trap #15 /* Trap to 167Bug */ - .short 0x01 /* Code for .INSTAT */ - move %%cc, %0 /* Get condition codes */ - andil #4, %0" /* Keep the Zero bit */ + asm volatile( "movew %1, -(%%sp)\n\t"/* Channel */ + "trap #15\n\t" /* Trap to 167Bug */ + ".short 0x61\n\t" /* Code for .REDIR_I */ + "trap #15\n\t" /* Trap to 167Bug */ + ".short 0x01\n\t" /* Code for .INSTAT */ + "move %%cc, %0\n\t" /* Get condition codes */ + "andil #4, %0" /* Keep the Zero bit */ : "=d" (char_not_available) : "d" (minor): "%%cc" ); if (char_not_available) { @@ -1312,10 +1312,10 @@ int _167Bug_pollRead( } /* Read the char and return it */ - asm volatile( "subq.l #2,%%a7 /* Space for result */ - trap #15 /* Trap to 167 Bug */ - .short 0x00 /* Code for .INCHR */ - moveb (%%a7)+, %0" /* Pop char into c */ + asm volatile( "subq.l #2,%%a7\n\t" /* Space for result */ + "trap #15\n\t" /* Trap to 167 Bug */ + ".short 0x00\n\t" /* Code for .INCHR */ + "moveb (%%a7)+, %0" /* Pop char into c */ : "=d" (c) : ); rtems_interrupt_enable( previous_level ); @@ -1349,12 +1349,12 @@ int _167Bug_pollWrite( { const char *endbuf = buf + len; - asm volatile( "pea (%0) /* endbuf */ - pea (%1) /* buf */ - movew #0x21, -(%%sp) /* Code for .OUTSTR */ - movew %2, -(%%sp) /* Channel */ - trap #15 /* Trap to 167Bug */ - .short 0x60" /* Code for .REDIR */ + asm volatile( "pea (%0)\n\t" /* endbuf */ + "pea (%1)\n\t" /* buf */ + "movew #0x21, -(%%sp)\n\t" /* Code for .OUTSTR */ + "movew %2, -(%%sp)\n\t" /* Channel */ + "trap #15\n\t" /* Trap to 167Bug */ + ".short 0x60" /* Code for .REDIR */ :: "a" (endbuf), "a" (buf), "d" (minor) ); /* Return something */ diff --git a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c index 8f1f69f999..808a25c81b 100644 --- a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c +++ b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c @@ -116,12 +116,12 @@ User_extensions_routine bsp_fatal_error_occurred( lcsr->intr_ena = 0; /* disable interrupts */ m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */ - asm volatile( "movel %0, -(%%a7) - pea (%%a7) - pea (%1) - trap #15 /* trap to 167Bug (.WRITDLN) */ - .short 0x25 - trap #15 - .short 0x63" + asm volatile( "movel %0, -(%%a7)\n\t" + "pea (%%a7)\n\t" + "pea (%1)\n\t" + "trap #15\n\t" /* trap to 167Bug (.WRITDLN) */ + ".short 0x25\n\t" + "trap #15\n\t" + ".short 0x63" :: "d" (the_error), "a" (&my_p_str) ); } diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c index f6819431a4..37d3c4de27 100644 --- a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c +++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c @@ -42,8 +42,8 @@ static void bsp_return_to_monitor_trap( void ) lcsr->intr_ena = 0; /* disable interrupts */ m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */ - asm volatile( "trap #15 /* trap to 167Bug */ - .short 0x63" ); /* return to 167Bug (.RETURN) */ + asm volatile( "trap #15\n\t" /* trap to 167Bug */ + ".short 0x63" ); /* return to 167Bug (.RETURN) */ /* restart program */ start_addr = start; diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c index 9a32e5800e..34f6683aa7 100644 --- a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c +++ b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c @@ -120,14 +120,14 @@ void page_table_init( } /* do it ! */ - asm volatile("movec %0, %%tc /* turn off paged address translation */ - movec %0, %%cacr /* disable both caches */ - cinva %%bc /* clear both caches */ - movec %1,%%dtt0 /* block address translation on */ - movec %1,%%itt0 - movec %2,%%dtt1 - movec %2,%%itt1 - movec %3,%%cacr" /* data cache on */ + asm volatile("movec %0, %%tc\n\t" /* turn off paged address translation */ + "movec %0, %%cacr\n\t" /* disable both caches */ + "cinva %%bc\n\t" /* clear both caches */ + "movec %1,%%dtt0\n\t" /* block address translation on */ + "movec %1,%%itt0\n\t" + "movec %2,%%dtt1\n\t" + "movec %2,%%itt1\n\t" + "movec %3,%%cacr" /* data cache on */ :: "d" (0), "d" (dtt0), "d" (0xFF00C040), "d" (cacr)); } @@ -146,12 +146,12 @@ void page_table_init( */ void page_table_teardown( void ) { - asm volatile ("movec %0,%%tc - movec %0,%%cacr - cpusha %%bc - movec %0,%%dtt0 - movec %0,%%itt0 - movec %0,%%dtt1 - movec %0,%%itt1" + asm volatile ("movec %0,%%tc\n\t" + "movec %0,%%cacr\n\t" + "cpusha %%bc\n\t" + "movec %0,%%dtt0\n\t" + "movec %0,%%itt0\n\t" + "movec %0,%%dtt1\n\t" + "movec %0,%%itt1" :: "d" (0) ); } -- cgit v1.2.3