2002-05-01 Eric Norum <eric.norum@usask.ca>

* 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.
This commit is contained in:
Joel Sherrill
2002-05-01 23:09:09 +00:00
parent 1c07f5821e
commit 4f38ab058e
5 changed files with 47 additions and 41 deletions

View File

@@ -1,3 +1,9 @@
2002-05-01 Eric Norum <eric.norum@usask.ca>
* 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 <corsepiu@faw.uni-ulm.de>
* configure.ac:

View File

@@ -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 */

View File

@@ -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) );
}

View File

@@ -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;

View File

@@ -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) );
}