diff options
author | Jeff Law <law@gcc.gnu.org> | 1996-03-07 10:38:08 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1996-03-07 10:38:08 -0700 |
commit | ddaf4c9114124df0305df1eeb8e1452b42c3c771 (patch) | |
tree | ffccde381d812672b7bdf0ef4ab8ef214a6b0013 /gcc/config | |
parent | 9e9b00600ba508de8a86b1676a7e7be51828c566 (diff) | |
download | gcc-ddaf4c9114124df0305df1eeb8e1452b42c3c771.zip gcc-ddaf4c9114124df0305df1eeb8e1452b42c3c771.tar.gz gcc-ddaf4c9114124df0305df1eeb8e1452b42c3c771.tar.bz2 |
lib2funcs.asm: Remove entry/exit routines.
* lib2funcs.asm: Remove entry/exit routines. Move them into...
* ee.asm: New file. Entry/exit code.
* ee_fp.asm: New file. Entry/exit code with frame pointer.
* t-pa: Corresponding changes.
* t-pro: Corresponding changes.
From-SVN: r11491
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/pa/lib2funcs.asm | 465 | ||||
-rw-r--r-- | gcc/config/pa/t-pa | 14 | ||||
-rw-r--r-- | gcc/config/pa/t-pro | 10 |
3 files changed, 20 insertions, 469 deletions
diff --git a/gcc/config/pa/lib2funcs.asm b/gcc/config/pa/lib2funcs.asm index 7ea7fbf..854aa9c 100644 --- a/gcc/config/pa/lib2funcs.asm +++ b/gcc/config/pa/lib2funcs.asm @@ -64,468 +64,3 @@ L$foo be,n 0(%sr0,%rp) .EXIT .PROCEND - - .SPACE $TEXT$ - .SUBSPA $MILLICODE$ - -; This is an out-of-line prologue. -; -; It performs the following operations: -; -; * Saves the return pointer at sp - 20 -; -; * Creates a new stack frame (sp'), size of the frame is passed in %r21 -; -; * The old stack pointer is saved at sp (frame pointer version only). -; -; * Saves grs (passed in low 16 bits of %r22 into the stack frame -; at sp' + local_fsize (passed in %r19). -; -; * Saves frs (passed in high 16 bits of %r22) into the stack -; frame at sp' + local_fsize (passed in %r19). -; -; * Sets up a frame pointer (in %r3) (frame pointer version only). -; -; * Returns to the instruction _immediately_ after the call to -; this function. - - .align 32 - .NSUBSPA $MILLICODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY - .EXPORT __outline_prologue,MILLICODE -__outline_prologue - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - copy %r30,%r20 - - ; Subtract 4 from our return pointer so that we return to - ; the right location. - ldo -4(%r31),%r31 - - ; Save off %r2 - stw %r2,-20(0,%r30) - - ; Make our new frame. - add %r21,%r30,%r30 - - ; Add in local_fsize to our frame pointer so we do register - ; saves into the right place - add %r20,%r19,%r20 - - ; %r22 tells us what registers we need to save. The upper half - ; is for fp registers, the lower half for integer registers. - ; We put the lower half in %r1 and the upper half into %r22 - ; for later use. - extru %r22,31,16,%r1 - extrs %r22,15,16,%r22 - - ; %r1 now olds a value 0-18 which corresponds to the number - ; of grs we need to save. We need to reverse that value so - ; we can just into the table and straight-line execute to the - ; end of the gr saves. - comb,= %r0,%r1,L$0000 - subi 18,%r1,%r1 - blr,n %r1,%r0 - b,n L$0000 - stws,ma %r18,4(0,%r20) - nop - stws,ma %r17,4(0,%r20) - nop - stws,ma %r16,4(0,%r20) - nop - stws,ma %r15,4(0,%r20) - nop - stws,ma %r14,4(0,%r20) - nop - stws,ma %r13,4(0,%r20) - nop - stws,ma %r12,4(0,%r20) - nop - stws,ma %r11,4(0,%r20) - nop - stws,ma %r10,4(0,%r20) - nop - stws,ma %r9,4(0,%r20) - nop - stws,ma %r8,4(0,%r20) - nop - stws,ma %r7,4(0,%r20) - nop - stws,ma %r6,4(0,%r20) - nop - stws,ma %r5,4(0,%r20) - nop - stws,ma %r4,4(0,%r20) - nop - stws,ma %r3,4(0,%r20) - nop -L$0000 - ; All gr saves are done. Align the temporary frame pointer and - ; do the fr saves. - ldo 7(%r20),%r20 - depi 0,31,3,%r20 - - comb,= %r0,%r22,L$0001 - subi 21,%r22,%r22 - blr,n %r22,%r0 - b,n L$0001 - fstws,ma %fr21,8(0,%r20) - nop - fstws,ma %fr20,8(0,%r20) - nop - fstws,ma %fr19,8(0,%r20) - nop - fstws,ma %fr18,8(0,%r20) - nop - fstws,ma %fr17,8(0,%r20) - nop - fstws,ma %fr16,8(0,%r20) - nop - fstws,ma %fr15,8(0,%r20) - nop - fstws,ma %fr14,8(0,%r20) - nop - fstws,ma %fr13,8(0,%r20) - nop - fstws,ma %fr12,8(0,%r20) - nop -L$0001 - ; Return - bv,n 0(%r31) - .EXIT - .PROCEND - - - - .align 32 - .NSUBSPA $MILLICODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY - .EXPORT __outline_prologue_fp,MILLICODE -__outline_prologue_fp - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - copy %r30,%r20 - - ; Subtract 4 from our return pointer so that we return to - ; the right location. - ldo -4(%r31),%r31 - - ; Save off %r2 - stw %r2,-20(0,%r30) - - ; Make our new frame. - add %r21,%r30,%r30 - - ; Save our old stack pointer. - stw %r20,0(0,%r20) - - ; Add in local_fsize to our frame pointer so we do register - ; saves into the right place - add %r20,%r19,%r20 - - ; %r22 tells us what registers we need to save. The upper half - ; is for fp registers, the lower half for integer registers. - ; We put the lower half in %r1 and the upper half into %r22 - ; for later use. - extru %r22,31,16,%r1 - extrs %r22,15,16,%r22 - - ; %r1 now olds a value 0-18 which corresponds to the number - ; of grs we need to save. We need to reverse that value so - ; we can just into the table and straight-line execute to the - ; end of the gr saves. - comb,= %r0,%r1,L$0002 - subi 18,%r1,%r1 - blr,n %r1,%r0 - b,n L$0002 - stws,ma %r18,4(0,%r20) - nop - stws,ma %r17,4(0,%r20) - nop - stws,ma %r16,4(0,%r20) - nop - stws,ma %r15,4(0,%r20) - nop - stws,ma %r14,4(0,%r20) - nop - stws,ma %r13,4(0,%r20) - nop - stws,ma %r12,4(0,%r20) - nop - stws,ma %r11,4(0,%r20) - nop - stws,ma %r10,4(0,%r20) - nop - stws,ma %r9,4(0,%r20) - nop - stws,ma %r8,4(0,%r20) - nop - stws,ma %r7,4(0,%r20) - nop - stws,ma %r6,4(0,%r20) - nop - stws,ma %r5,4(0,%r20) - nop - stws,ma %r4,4(0,%r20) - nop - stws,ma %r3,4(0,%r20) - nop -L$0002 - ; All gr saves are done. Align the temporary frame pointer and - ; do the fr saves. - ldo 7(%r20),%r20 - depi 0,31,3,%r20 - - comb,= %r0,%r22,L$0003 - subi 21,%r22,%r22 - blr,n %r22,%r0 - b,n L$0003 - fstws,ma %fr21,8(0,%r20) - nop - fstws,ma %fr20,8(0,%r20) - nop - fstws,ma %fr19,8(0,%r20) - nop - fstws,ma %fr18,8(0,%r20) - nop - fstws,ma %fr17,8(0,%r20) - nop - fstws,ma %fr16,8(0,%r20) - nop - fstws,ma %fr15,8(0,%r20) - nop - fstws,ma %fr14,8(0,%r20) - nop - fstws,ma %fr13,8(0,%r20) - nop - fstws,ma %fr12,8(0,%r20) - nop -L$0003 - ; Return, setting up a frame pointer in the delay slot - bv 0(%r31) - sub %r30,%r21,%r3 - .EXIT - .PROCEND - - -; This is an out-of-line epilogue. It's operation is basically the reverse -; of the out-of-line prologue. - - .align 32 - .NSUBSPA $MILLICODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY - .EXPORT __outline_epilogue,MILLICODE -__outline_epilogue - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - ; Get our original stack pointer and put it in %r20 - sub %r30,%r21,%r20 - - ; Subtract 4 from our return pointer so that we return to - ; the right location. - ldo -4(%r31),%r31 - - ; Reload %r2 - ldw -20(0,%r20),%r2 - - ; Add in local_fsize (%r19) to the frame pointer to find - ; the saved registers. - add %r20,%r19,%r20 - - ; %r22 tells us what registers we need to restore. The upper half - ; is for fp registers, the lower half for integer registers. - ; We put the lower half in %r1 and the upper half into %r22 - ; for later use. - extru %r22,31,16,%r1 - extrs %r22,15,16,%r22 - - ; %r1 now olds a value 0-18 which corresponds to the number - ; of grs we need to restore. We need to reverse that value so - ; we can just into the table and straight-line execute to the - ; end of the gr restore. - comb,= %r0,%r1,L$0004 - subi 18,%r1,%r1 - blr,n %r1,%r0 - b,n L$0004 - ldws,ma 4(0,%r20),%r18 - nop - ldws,ma 4(0,%r20),%r17 - nop - ldws,ma 4(0,%r20),%r16 - nop - ldws,ma 4(0,%r20),%r15 - nop - ldws,ma 4(0,%r20),%r14 - nop - ldws,ma 4(0,%r20),%r13 - nop - ldws,ma 4(0,%r20),%r12 - nop - ldws,ma 4(0,%r20),%r11 - nop - ldws,ma 4(0,%r20),%r10 - nop - ldws,ma 4(0,%r20),%r9 - nop - ldws,ma 4(0,%r20),%r8 - nop - ldws,ma 4(0,%r20),%r7 - nop - ldws,ma 4(0,%r20),%r6 - nop - ldws,ma 4(0,%r20),%r5 - nop - ldws,ma 4(0,%r20),%r4 - nop - ldws,ma 4(0,%r20),%r3 - nop -L$0004 - ; All gr restore are done. Align the temporary frame pointer and - ; do the fr restore. - ldo 7(%r20),%r20 - depi 0,31,3,%r20 - - comb,= %r0,%r22,L$0005 - subi 21,%r22,%r22 - blr,n %r22,%r0 - b,n L$0005 - fldws,ma 8(0,%r20),%fr21 - nop - fldws,ma 8(0,%r20),%fr20 - nop - fldws,ma 8(0,%r20),%fr19 - nop - fldws,ma 8(0,%r20),%fr18 - nop - fldws,ma 8(0,%r20),%fr17 - nop - fldws,ma 8(0,%r20),%fr16 - nop - fldws,ma 8(0,%r20),%fr15 - nop - fldws,ma 8(0,%r20),%fr14 - nop - fldws,ma 8(0,%r20),%fr13 - nop - fldws,ma 8(0,%r20),%fr12 - nop -L$0005 - ; Return and deallocate our frame. - bv 0(%r31) - sub %r30,%r21,%r30 - .EXIT - .PROCEND - -; This is an out-of-line epilogue. It's operation is basically the reverse -; of the out-of-line prologue. - - .align 32 - .NSUBSPA $MILLICODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY - .EXPORT __outline_epilogue_fp,MILLICODE -__outline_epilogue_fp - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - ; Make a copy of our frame pointer into %r20 - copy %r3,%r20 - - ; Subtract 4 from our return pointer so that we return to - ; the right location. - ldo -4(%r31),%r31 - - ; Reload %r2 - ; First save off %r2 - ldw -20(0,%r20),%r2 - - ; Load our old stack pointer, save it in %r21. - ldw 0(0,%r20),%r21 - - ; Add in local_fsize (%r19) to the frame pointer to find - ; the saved registers. - add %r20,%r19,%r20 - - ; %r22 tells us what registers we need to restore. The upper half - ; is for fp registers, the lower half for integer registers. - ; We put the lower half in %r1 and the upper half into %r22 - ; for later use. - extru %r22,31,16,%r1 - extrs %r22,15,16,%r22 - - ; %r1 now olds a value 0-18 which corresponds to the number - ; of grs we need to restore. We need to reverse that value so - ; we can just into the table and straight-line execute to the - ; end of the gr restore. - comb,= %r0,%r1,L$0006 - subi 18,%r1,%r1 - blr,n %r1,%r0 - b,n L$0006 - ldws,ma 4(0,%r20),%r18 - nop - ldws,ma 4(0,%r20),%r17 - nop - ldws,ma 4(0,%r20),%r16 - nop - ldws,ma 4(0,%r20),%r15 - nop - ldws,ma 4(0,%r20),%r14 - nop - ldws,ma 4(0,%r20),%r13 - nop - ldws,ma 4(0,%r20),%r12 - nop - ldws,ma 4(0,%r20),%r11 - nop - ldws,ma 4(0,%r20),%r10 - nop - ldws,ma 4(0,%r20),%r9 - nop - ldws,ma 4(0,%r20),%r8 - nop - ldws,ma 4(0,%r20),%r7 - nop - ldws,ma 4(0,%r20),%r6 - nop - ldws,ma 4(0,%r20),%r5 - nop - ldws,ma 4(0,%r20),%r4 - nop - ldws,ma 4(0,%r20),%r3 - nop -L$0006 - ; All gr restore are done. Align the temporary frame pointer and - ; do the fr restore. - ldo 7(%r20),%r20 - depi 0,31,3,%r20 - - comb,= %r0,%r22,L$0007 - subi 21,%r22,%r22 - blr,n %r22,%r0 - b,n L$0007 - fldws,ma 8(0,%r20),%fr21 - nop - fldws,ma 8(0,%r20),%fr20 - nop - fldws,ma 8(0,%r20),%fr19 - nop - fldws,ma 8(0,%r20),%fr18 - nop - fldws,ma 8(0,%r20),%fr17 - nop - fldws,ma 8(0,%r20),%fr16 - nop - fldws,ma 8(0,%r20),%fr15 - nop - fldws,ma 8(0,%r20),%fr14 - nop - fldws,ma 8(0,%r20),%fr13 - nop - fldws,ma 8(0,%r20),%fr12 - nop -L$0007 - ; Return and deallocate our frame. - bv 0(%r31) - copy %r21,%r30 - .EXIT - .PROCEND - - diff --git a/gcc/config/pa/t-pa b/gcc/config/pa/t-pa index 1740b5a..a359918 100644 --- a/gcc/config/pa/t-pa +++ b/gcc/config/pa/t-pa @@ -1,10 +1,18 @@ LIBGCC1=libgcc1.null CROSS_LIBGCC1=libgcc1.null ADA_CFLAGS=-mdisable-indexing -LIB2FUNCS_EXTRA=lib2funcs.asm +LIB2FUNCS_EXTRA=lib2funcs.asm ee.asm ee_fp.asm -lib2funcs.asm: $(srcdir)/config/pa/$(LIB2FUNCS_EXTRA) +lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm rm -f lib2funcs.asm - cp $(srcdir)/config/pa/$(LIB2FUNCS_EXTRA) . + cp $(srcdir)/config/pa/lib2funcs.asm . + +ee.asm: $(srcdir)/config/pa/ee.asm + rm -f ee.asm + cp $(srcdir)/config/pa/ee.asm . + +ee_fp.asm: $(srcdir)/config/pa/ee_fp.asm + rm -f ee_fp.asm + cp $(srcdir)/config/pa/ee_fp.asm . TARGET_LIBGCC2_CFLAGS = -fPIC diff --git a/gcc/config/pa/t-pro b/gcc/config/pa/t-pro index f45fca5..f40b2e4 100644 --- a/gcc/config/pa/t-pro +++ b/gcc/config/pa/t-pro @@ -7,7 +7,7 @@ LIBGCC1_TEST = ADA_CFLAGS=-mdisable-indexing -LIB2FUNCS_EXTRA=fp-bit.c dp-bit.c lib2funcs.asm +LIB2FUNCS_EXTRA=fp-bit.c dp-bit.c lib2funcs.asm ee.asm ee_fp.asm dp-bit.c: $(srcdir)/config/fp-bit.c cat $(srcdir)/config/fp-bit.c > dp-bit.c @@ -20,6 +20,14 @@ lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm rm -f lib2funcs.asm cp $(srcdir)/config/pa/lib2funcs.asm . +ee.asm: $(srcdir)/config/pa/ee.asm + rm -f ee.asm + cp $(srcdir)/config/pa/ee.asm . + +ee_fp.asm: $(srcdir)/config/pa/ee_fp.asm + rm -f ee_fp.asm + cp $(srcdir)/config/pa/ee_fp.asm . + # Build the libraries for both speed and space optimizations MULTILIB_OPTIONS=mspace |