From c9cbdf3393a8f9235de5444207185017d1b12e7e Mon Sep 17 00:00:00 2001 From: Peter Grehan Date: Tue, 5 Aug 2003 11:30:18 +0000 Subject: [PATCH] Fix asm string newlines to keep gcc3.3 happy. Use register prefixes to make the asm a bit more readable. --- sys/boot/powerpc/loader/start.c | 108 ++++++++++++++++---------------- sys/boot/powerpc/ofw/start.c | 108 ++++++++++++++++---------------- 2 files changed, 108 insertions(+), 108 deletions(-) diff --git a/sys/boot/powerpc/loader/start.c b/sys/boot/powerpc/loader/start.c index 9f37ce0027c6..dced920cecc7 100644 --- a/sys/boot/powerpc/loader/start.c +++ b/sys/boot/powerpc/loader/start.c @@ -38,63 +38,63 @@ void startup(void *, int, int (*)(void *), char *, int); #ifdef XCOFF_GLUE -asm(" - .text - .globl _entry -_entry: - .long _start,0,0 +asm(" \n\ + .text \n\ + .globl _entry \n\ +_entry: \n\ + .long _start,0,0 \n\ "); #endif -__asm(" - .data -stack: - .space 16388 - - .text - .globl _start -_start: - li 8,0 - li 9,0x100 - mtctr 9 -1: - dcbf 0,8 - icbi 0,8 - addi 8,8,0x20 - bdnz 1b - sync - isync - - lis 1,stack@ha - addi 1,1,stack@l - addi 1,1,8192 - - mfmsr 8 - li 0,0 - mtmsr 0 - isync - - mtibatu 0,0 - mtibatu 1,0 - mtibatu 2,0 - mtibatu 3,0 - mtdbatu 0,0 - mtdbatu 1,0 - mtdbatu 2,0 - mtdbatu 3,0 - - li 9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */ - mtibatl 0,9 - mtdbatl 0,9 - li 9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */ - mtibatu 0,9 - mtdbatu 0,9 - isync - - mtmsr 8 - isync - - b startup +__asm(" \n\ + .data \n\ +stack: \n\ + .space 16388 \n\ + \n\ + .text \n\ + .globl _start \n\ +_start: \n\ + li %r8,0 \n\ + li %r9,0x100 \n\ + mtctr %r9 \n\ +1: \n\ + dcbf %r0,%r8 \n\ + icbi %r0,%r8 \n\ + addi %r8,%r8,0x20 \n\ + bdnz 1b \n\ + sync \n\ + isync \n\ + \n\ + lis %r1,stack@ha \n\ + addi %r1,%r1,stack@l \n\ + addi %r1,%r1,8192 \n\ + \n\ + mfmsr %r8 \n\ + li %r0,0 \n\ + mtmsr %r0 \n\ + isync \n\ + \n\ + mtibatu 0,%r0 \n\ + mtibatu 1,%r0 \n\ + mtibatu 2,%r0 \n\ + mtibatu 3,%r0 \n\ + mtdbatu 0,%r0 \n\ + mtdbatu 1,%r0 \n\ + mtdbatu 2,%r0 \n\ + mtdbatu 3,%r0 \n\ + \n\ + li %r9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */ \n\ + mtibatl 0,%r9 \n\ + mtdbatl 0,%r9 \n\ + li %r9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */ \n\ + mtibatu 0,%r9 \n\ + mtdbatu 0,%r9 \n\ + isync \n\ + \n\ + mtmsr %r8 \n\ + isync \n\ + \n\ + b startup \n\ "); void diff --git a/sys/boot/powerpc/ofw/start.c b/sys/boot/powerpc/ofw/start.c index 9f37ce0027c6..dced920cecc7 100644 --- a/sys/boot/powerpc/ofw/start.c +++ b/sys/boot/powerpc/ofw/start.c @@ -38,63 +38,63 @@ void startup(void *, int, int (*)(void *), char *, int); #ifdef XCOFF_GLUE -asm(" - .text - .globl _entry -_entry: - .long _start,0,0 +asm(" \n\ + .text \n\ + .globl _entry \n\ +_entry: \n\ + .long _start,0,0 \n\ "); #endif -__asm(" - .data -stack: - .space 16388 - - .text - .globl _start -_start: - li 8,0 - li 9,0x100 - mtctr 9 -1: - dcbf 0,8 - icbi 0,8 - addi 8,8,0x20 - bdnz 1b - sync - isync - - lis 1,stack@ha - addi 1,1,stack@l - addi 1,1,8192 - - mfmsr 8 - li 0,0 - mtmsr 0 - isync - - mtibatu 0,0 - mtibatu 1,0 - mtibatu 2,0 - mtibatu 3,0 - mtdbatu 0,0 - mtdbatu 1,0 - mtdbatu 2,0 - mtdbatu 3,0 - - li 9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */ - mtibatl 0,9 - mtdbatl 0,9 - li 9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */ - mtibatu 0,9 - mtdbatu 0,9 - isync - - mtmsr 8 - isync - - b startup +__asm(" \n\ + .data \n\ +stack: \n\ + .space 16388 \n\ + \n\ + .text \n\ + .globl _start \n\ +_start: \n\ + li %r8,0 \n\ + li %r9,0x100 \n\ + mtctr %r9 \n\ +1: \n\ + dcbf %r0,%r8 \n\ + icbi %r0,%r8 \n\ + addi %r8,%r8,0x20 \n\ + bdnz 1b \n\ + sync \n\ + isync \n\ + \n\ + lis %r1,stack@ha \n\ + addi %r1,%r1,stack@l \n\ + addi %r1,%r1,8192 \n\ + \n\ + mfmsr %r8 \n\ + li %r0,0 \n\ + mtmsr %r0 \n\ + isync \n\ + \n\ + mtibatu 0,%r0 \n\ + mtibatu 1,%r0 \n\ + mtibatu 2,%r0 \n\ + mtibatu 3,%r0 \n\ + mtdbatu 0,%r0 \n\ + mtdbatu 1,%r0 \n\ + mtdbatu 2,%r0 \n\ + mtdbatu 3,%r0 \n\ + \n\ + li %r9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */ \n\ + mtibatl 0,%r9 \n\ + mtdbatl 0,%r9 \n\ + li %r9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */ \n\ + mtibatu 0,%r9 \n\ + mtdbatu 0,%r9 \n\ + isync \n\ + \n\ + mtmsr %r8 \n\ + isync \n\ + \n\ + b startup \n\ "); void