From 01629105c2817a59a4f1f05039593f211cf5ddaa Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 14 Dec 1998 23:15:38 +0000 Subject: Patch from Ralf Corsepius to rename all .s files to .S in conformance with GNU conventions. This is a minor step along the way to supporting automake. --- c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.in | 6 +- c/src/lib/libbsp/hppa1.1/simhppa/start/start.S | 169 +++++++++++++++++++++ c/src/lib/libbsp/hppa1.1/simhppa/start/start.s | 169 --------------------- 3 files changed, 172 insertions(+), 172 deletions(-) create mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/start/start.S delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/start/start.s (limited to 'c/src/lib/libbsp/hppa1.1/simhppa/start') diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.in b/c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.in index bafd65a3ff..d982cdec4c 100644 --- a/c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.in +++ b/c/src/lib/libbsp/hppa1.1/simhppa/start/Makefile.in @@ -17,10 +17,10 @@ C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) H_FILES= -# Assembly source names, if any, go here -- minus the .s +# Assembly source names, if any, go here -- minus the .S S_PIECES=start -S_FILES=$(S_PIECES:%=%.s) -S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o) +S_FILES=$(S_PIECES:%=%.S) +S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o) SRCS=$(C_FILES) $(H_FILES) $(S_FILES) OBJS=$(C_O_FILES) $(S_O_FILES) diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/start/start.S b/c/src/lib/libbsp/hppa1.1/simhppa/start/start.S new file mode 100644 index 0000000000..86298f0304 --- /dev/null +++ b/c/src/lib/libbsp/hppa1.1/simhppa/start/start.S @@ -0,0 +1,169 @@ +/* + * crt0.S -- startup file for hppa on RTEMS + * + * $Id$ + */ + + .COPYRIGHT "crt0.S for hppa" + + .DATA + +_progname .STRINGZ "simhppa" +_crt0_argv .WORD _progname, 0 + +/* + * Set up the standard spaces (sections) These definitions come + * from /lib/pcc_prefix.s. + */ + .TEXT + +/* + * stuff we need that is defined elsewhere. + */ + .IMPORT boot_card, CODE + .IMPORT _bss_start, DATA + .IMPORT _bss_end, DATA + .IMPORT environ, DATA + +/* + * start -- set things up so the application will run. + * + */ + .PROC + .CALLINFO SAVE_SP, FRAME=48 + .EXPORT $START$,ENTRY + .EXPORT start,ENTRY +$START$ +start: + +/* + * Get a stack + */ + + ldil L%crt_stack+48,%r30 + ldo R%crt_stack+48(%r30),%r30 + +/* + * we need to set %r27 (global data pointer) here + */ + + ldil L%$global$,%r27 + ldo R%$global$(%r27),%r27 + +/* + * zerobss -- zero out the bss section + * XXX We don't do this since simulator and boot rom will do this for us. + */ +#if 0 + ; load the start of bss + ldil L%_bss_start,%r4 + ldo R%_bss_start(%r4),%r4 + + ; load the end of bss + ldil L%_bss_end,%r5 + ldo R%_bss_end(%r5),%r5 + + +bssloop + addi -1,%r5,%r5 ; decrement _bss_end + stb %r0,0(0,%r5) ; we do this by bytes for now even + ; though it is slower, it is safer + combf,= %r4,%r5, bssloop + nop +#endif + + ldi 1,%ret0 + +/* + * Call the "boot_card" routine from the application to get it going. + * We call it as boot_card(1, argv, 0) + */ + + copy %r0, %r24 + + ldil L%_crt0_argv,%r25 + ldo R%_crt0_argv(%r25),%r25 + + bl boot_card,%r2 + ldo 1(%r0), %r26 + + .PROCEND +/* + * _exit -- Exit from the application. Normally we cause a user trap + * to return to the ROM monitor for another run, but with + * this monitor we can not. Still, "C" wants this symbol, it + * should be here. Jumping to 0xF0000004 jumps back into the + * firmware, while writing a 5 to 0xFFFE0030 causes a reset. + */ +_exit_fallthru + .PROC + .CALLINFO + .ENTRY + + ;; This just causes a breakpoint exception + break 0x0,0x0 + bv,n (%rp) + nop + .EXIT + .PROCEND + +/* + * _sr4export -- support for called functions. (mostly for GDB) + */ + .EXPORT _sr4export, ENTRY +_sr4export: + .PROC + .CALLINFO + .ENTRY + + ble 0(%sr4,%r22) + copy %r31,%rp + ldw -18(%sr0,%sp),%rp + ldsid (%sr0,%rp),%r1 + mtsp %r1,%sr0 + be,n 0(%sr0,%rp) + nop + .EXIT + .PROCEND + + + .subspa $UNWIND_START$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=56 + .export $UNWIND_START +$UNWIND_START + .subspa $UNWIND$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=64 + .subspa $UNWIND_END$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=72 + .export $UNWIND_END +$UNWIND_END + .subspa $RECOVER_START$,QUAD=0,ALIGN=4,ACCESS=0x2c,SORT=73 + .export $RECOVER_START +$RECOVER_START + .subspa $RECOVER$,QUAD=0,ALIGN=4,ACCESS=0x2c,SORT=80 + .subspa $RECOVER_END$,QUAD=0,ALIGN=4,ACCESS=0x2c,SORT=88 + .export $RECOVER_END +$RECOVER_END + +/* + * Here we set up the standard date sub spaces. + * + * Set up some room for a stack. We just grab a chunk of memory. + * We also setup some space for the global variable space, which + * must be done using the reserved name "$global$" so "C" code + * can find it. The stack grows towards the higher addresses. + */ + + .subspa $DATA$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=16 + .subspa $SHORTDATA$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=24 + .subspa $GLOBAL$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40 + .export $global$ +$global$ + .subspa $SHORTBSS$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=80,ZERO + .subspa $BSS$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=82,ZERO + + .subspa $STACK$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=88,ZERO + + .export crt_stack +crt_stack + .comm 0x1000 + + .end + diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/start/start.s b/c/src/lib/libbsp/hppa1.1/simhppa/start/start.s deleted file mode 100644 index 86298f0304..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/start/start.s +++ /dev/null @@ -1,169 +0,0 @@ -/* - * crt0.S -- startup file for hppa on RTEMS - * - * $Id$ - */ - - .COPYRIGHT "crt0.S for hppa" - - .DATA - -_progname .STRINGZ "simhppa" -_crt0_argv .WORD _progname, 0 - -/* - * Set up the standard spaces (sections) These definitions come - * from /lib/pcc_prefix.s. - */ - .TEXT - -/* - * stuff we need that is defined elsewhere. - */ - .IMPORT boot_card, CODE - .IMPORT _bss_start, DATA - .IMPORT _bss_end, DATA - .IMPORT environ, DATA - -/* - * start -- set things up so the application will run. - * - */ - .PROC - .CALLINFO SAVE_SP, FRAME=48 - .EXPORT $START$,ENTRY - .EXPORT start,ENTRY -$START$ -start: - -/* - * Get a stack - */ - - ldil L%crt_stack+48,%r30 - ldo R%crt_stack+48(%r30),%r30 - -/* - * we need to set %r27 (global data pointer) here - */ - - ldil L%$global$,%r27 - ldo R%$global$(%r27),%r27 - -/* - * zerobss -- zero out the bss section - * XXX We don't do this since simulator and boot rom will do this for us. - */ -#if 0 - ; load the start of bss - ldil L%_bss_start,%r4 - ldo R%_bss_start(%r4),%r4 - - ; load the end of bss - ldil L%_bss_end,%r5 - ldo R%_bss_end(%r5),%r5 - - -bssloop - addi -1,%r5,%r5 ; decrement _bss_end - stb %r0,0(0,%r5) ; we do this by bytes for now even - ; though it is slower, it is safer - combf,= %r4,%r5, bssloop - nop -#endif - - ldi 1,%ret0 - -/* - * Call the "boot_card" routine from the application to get it going. - * We call it as boot_card(1, argv, 0) - */ - - copy %r0, %r24 - - ldil L%_crt0_argv,%r25 - ldo R%_crt0_argv(%r25),%r25 - - bl boot_card,%r2 - ldo 1(%r0), %r26 - - .PROCEND -/* - * _exit -- Exit from the application. Normally we cause a user trap - * to return to the ROM monitor for another run, but with - * this monitor we can not. Still, "C" wants this symbol, it - * should be here. Jumping to 0xF0000004 jumps back into the - * firmware, while writing a 5 to 0xFFFE0030 causes a reset. - */ -_exit_fallthru - .PROC - .CALLINFO - .ENTRY - - ;; This just causes a breakpoint exception - break 0x0,0x0 - bv,n (%rp) - nop - .EXIT - .PROCEND - -/* - * _sr4export -- support for called functions. (mostly for GDB) - */ - .EXPORT _sr4export, ENTRY -_sr4export: - .PROC - .CALLINFO - .ENTRY - - ble 0(%sr4,%r22) - copy %r31,%rp - ldw -18(%sr0,%sp),%rp - ldsid (%sr0,%rp),%r1 - mtsp %r1,%sr0 - be,n 0(%sr0,%rp) - nop - .EXIT - .PROCEND - - - .subspa $UNWIND_START$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=56 - .export $UNWIND_START -$UNWIND_START - .subspa $UNWIND$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=64 - .subspa $UNWIND_END$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=72 - .export $UNWIND_END -$UNWIND_END - .subspa $RECOVER_START$,QUAD=0,ALIGN=4,ACCESS=0x2c,SORT=73 - .export $RECOVER_START -$RECOVER_START - .subspa $RECOVER$,QUAD=0,ALIGN=4,ACCESS=0x2c,SORT=80 - .subspa $RECOVER_END$,QUAD=0,ALIGN=4,ACCESS=0x2c,SORT=88 - .export $RECOVER_END -$RECOVER_END - -/* - * Here we set up the standard date sub spaces. - * - * Set up some room for a stack. We just grab a chunk of memory. - * We also setup some space for the global variable space, which - * must be done using the reserved name "$global$" so "C" code - * can find it. The stack grows towards the higher addresses. - */ - - .subspa $DATA$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=16 - .subspa $SHORTDATA$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=24 - .subspa $GLOBAL$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40 - .export $global$ -$global$ - .subspa $SHORTBSS$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=80,ZERO - .subspa $BSS$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=82,ZERO - - .subspa $STACK$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=88,ZERO - - .export crt_stack -crt_stack - .comm 0x1000 - - .end - -- cgit v1.2.3