From b1e374737bca6da4311e2be8b0cc9133599dfad1 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 13 Feb 2007 07:47:22 +0000 Subject: [PATCH] * emultempl/spu_ovl.S (__ovly_return, __ovly_load): Set sym size. (__ovly_load_event): Define. (size): Rename to osize. * emultempl/spu_ovl.o: Regenerate. --- ld/ChangeLog | 7 +++++++ ld/emultempl/spu_ovl.S | 22 ++++++++++++++++------ ld/emultempl/spu_ovl.o | Bin 1440 -> 1476 bytes 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index eab2dc99a0e..6e857bec6fd 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2007-02-13 Alan Modra + + * emultempl/spu_ovl.S (__ovly_return, __ovly_load): Set sym size. + (__ovly_load_event): Define. + (size): Rename to osize. + * emultempl/spu_ovl.o: Regenerate. + 2007-02-13 Alan Modra * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Add ".branch_lt". diff --git a/ld/emultempl/spu_ovl.S b/ld/emultempl/spu_ovl.S index 75d0470db50..3af4fd897c1 100644 --- a/ld/emultempl/spu_ovl.S +++ b/ld/emultempl/spu_ovl.S @@ -62,7 +62,7 @@ #define vma $6 #define map $7 -#define size $7 +#define osize $7 #define cmp2 $7 #define ea64 $8 @@ -101,6 +101,7 @@ __ovly_return: shlqbyi $78, $lr, 4 shlqbyi $79, $lr, 8 biz $78, $79 + .size __ovly_return, . - __ovly_return /** * __ovly_load - copy an overlay partion to local store. @@ -194,6 +195,13 @@ __ovly_backchain_loop: ceq cmp, $78, cur brnz cmp, __ovly_load_restore +/* Marker for profiling code. If we get here, we are about to load + * a new overlay. + */ + .global __ovly_load_event + .type __ovly_load_event, @function +__ovly_load_event: + /* Set _ovly_buf_table[buf].mapped = $78. */ cwx genwi, tab, off shufb map, $78, map, genwi @@ -204,7 +212,7 @@ __ovly_backchain_loop: * loader, and indicating the value for SPU executable image start. */ lqd cgshuf, (__cg_pattern-__ovly_return+4)(retval) - rotqbyi size, vma, 4 + rotqbyi osize, vma, 4 rotqbyi sz, vma, 8 lqa ea64, _EAR_ @@ -219,8 +227,8 @@ __ovly_xfer_loop: /* Setup DMA parameters, then issue DMA request. */ rotqbyi ealo, add64, 4 ila maxsize, MFC_MAX_DMA_SIZE - cgt cmp, size, maxsize - selb sz, size, maxsize, cmp + cgt cmp, osize, maxsize + selb sz, osize, maxsize, cmp ila tagid, MFC_TAG_ID wrch $MFC_LSA, vma wrch $MFC_EAH, ea64 @@ -232,8 +240,8 @@ __ovly_xfer_loop: /* Increment vma, decrement size, branch back as needed. */ a vma, vma, sz - sf size, sz, size - brnz size, __ovly_xfer_loop + sf osize, sz, osize + brnz osize, __ovly_xfer_loop /* Save app's tagmask, wait for DMA complete, restore mask. */ rdch oldmask, $MFC_RdTagMask @@ -273,3 +281,5 @@ __ovly_irq_restore: __ovly_load_ret: /* Branch to target address. */ bi $79 + + .size __ovly_load, . - __ovly_load diff --git a/ld/emultempl/spu_ovl.o b/ld/emultempl/spu_ovl.o index 1d48c00fafac621a5ab7eba99a2f83e2bb3deee9..656e4d3486440049a325152fd0642521e4606487 100644 GIT binary patch delta 149 zcmZ3$eS~|1I}>BgWDlmrj1H6EFewYBFfcHRF(3frm(X){@XMO$_cNI6vIABYVC0$`GnWwHm$Pl5RSvYg8JoczR;_|&r0ypqZGtTK}$ WSxtq6n83;y7y}p>m{@@(MgRa!6&lk3 delta 116 zcmX@Yy?}dzI}>BXWDlmrj0Th6FewX$FfcH(FdzWql`(PRM@ZC((AK>$oLe3~4=@^f-BtJLIrR%0PSCWt6w00RRPD^PC)0QH#?-~a#s -- 2.30.2