From ef8dff0531f382bb3a8e1511ebacc941604f8346 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 29 Dec 2010 10:45:33 +0000 Subject: 2010-12-29 Sebastian Huber * mpc55xx/include/mpc55xx.h, mpc55xx/misc/copy.S: Removed zero functions. --- c/src/lib/libcpu/powerpc/ChangeLog | 2 + c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h | 6 - c/src/lib/libcpu/powerpc/mpc55xx/misc/copy.S | 145 +-------------------- 3 files changed, 3 insertions(+), 150 deletions(-) (limited to 'c') diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index efacbc3057..4d44733ab2 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -13,6 +13,8 @@ e200 exception vector defines. Added e500 exception vector defines. Unified IVOR calculation for e200 and e500 (e200z1 has hard wired IVOR values). + * mpc55xx/include/mpc55xx.h, mpc55xx/misc/copy.S: Removed zero + functions. 2010-12-23 Sebastian Huber diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h b/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h index c81e0231e7..80f1ce32b8 100644 --- a/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h +++ b/c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h @@ -46,12 +46,6 @@ /* Defined in copy.S */ int mpc55xx_copy_8( const void *src, void *dest, size_t n); -/* Defined in copy.S */ -int mpc55xx_zero_8( void *dest, size_t n); - -/* Defined in copy.S */ -int mpc55xx_zero_32( void *dest, size_t n); - /* Defined in fmpll.S */ void mpc55xx_fmpll_reset_config(); diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/misc/copy.S b/c/src/lib/libcpu/powerpc/mpc55xx/misc/copy.S index e2f9e1c5ee..44cd9981f2 100644 --- a/c/src/lib/libcpu/powerpc/mpc55xx/misc/copy.S +++ b/c/src/lib/libcpu/powerpc/mpc55xx/misc/copy.S @@ -3,7 +3,7 @@ * * @ingroup mpc55xx_asm * - * @brief Memory copy and zero functions. + * @brief Memory copy functions. */ /* @@ -78,146 +78,3 @@ copy_data: /* Return */ blr #endif /*!((MPC55XX_CHIP_TYPE>=5510) && (MPC55XX_CHIP_TYPE<=5517))*/ - -/** - * @fn int mpc55xx_zero_4( void *dest, size_t n) - * - * @brief Zero all @a n bytes starting at @a dest with 4 byte writes. - * - * The address @a dest has to be aligned on 4 byte boundaries. The size @a n - * must be evenly divisible by 4. No SPE operations are used. - */ -#if ((MPC55XX_CHIP_TYPE>=5510) && (MPC55XX_CHIP_TYPE<=5517)) -GLOBAL_FUNCTION mpc55xx_zero_32 -GLOBAL_FUNCTION mpc55xx_zero_8 -#endif /* ((MPC55XX_CHIP_TYPE>=5510) && (MPC55XX_CHIP_TYPE<=5517)) */ -GLOBAL_FUNCTION mpc55xx_zero_4 - /* Create zero */ - xor r0, r0, r0 - - /* Loop counter for the first bytes up to 16 bytes */ - rlwinm. r9, r4, 29, 30, 31 - beq zero_more4 - mtctr r9 - xor r5,r5,r5 - -zero_data4: - stwx r0, r5, r3 - addi r5, r5, 4 - bdnz zero_data4 - -zero_more4: - /* More than 16 bytes? */ - srwi. r9, r4, 4 - beqlr - mtctr r9 - -zero_big_data4: - stw r0, 0(r3) - stw r0, 4(r3) - stw r0, 8(r3) - stw r0, 12(r3) - addi r3, r3, 16 - bdnz zero_big_data4 - /* Return */ - blr -#if !((MPC55XX_CHIP_TYPE>=5510) && (MPC55XX_CHIP_TYPE<=5517)) -/** - * @fn int mpc55xx_zero_8( void *dest, size_t n) - * - * @brief Zero all @a n bytes starting at @a dest with 8 byte writes. - * - * The address @a dest has to be aligned on 8 byte boundaries. The size @a n - * must be evenly divisible by 8. The SPE operations @b evxor and @b evstddx will be used. - */ -GLOBAL_FUNCTION mpc55xx_zero_8 - /* Create zero */ - evxor r0, r0, r0 - - /* Set offset */ - evxor r5, r5, r5 - - /* Loop counter for the first bytes up to 32 bytes */ - rlwinm. r9, r4, 29, 30, 31 - beq zero_more - mtctr r9 - -zero_data: - evstddx r0, r3, r5 - addi r5, r5, 8 - bdnz zero_data - -zero_more: - /* More than 32 bytes? */ - srwi. r9, r4, 5 - beqlr - mtctr r9 - - /* Set offsets */ - addi r6, r5, 8 - addi r7, r5, 16 - addi r8, r5, 24 - -zero_big_data: - evstddx r0, r3, r5 - addi r5, r5, 32 - evstddx r0, r3, r6 - addi r6, r6, 32 - evstddx r0, r3, r7 - addi r7, r7, 32 - evstddx r0, r3, r8 - addi r8, r8, 32 - bdnz zero_big_data - /* Return */ - blr - -/** - * @fn int mpc55xx_zero_32( void *dest, size_t n) - * - * @brief Zero all @a n bytes starting at @a dest with 32 byte writes. - * - * The address @a dest has to be aligned on 32 byte boundaries. The size @a n - * must be evenly divisible by 32. The function operates with the cache block zero - * operation @b dcbz. - * - * @note The cache has to be enabled for the desired memory area. - */ -GLOBAL_FUNCTION mpc55xx_zero_32 - /* Set offset */ - xor r5, r5, r5 - - /* Loop counter for the first bytes up to 128 bytes */ - rlwinm. r9, r4, 27, 28, 31 - beq zero_more_lines - mtctr r9 - -zero_line: - dcbz r3, r5 - addi r5, r5, 32 - bdnz zero_line - -zero_more_lines: - /* More than 128 bytes? */ - srwi. r9, r4, 7 - beqlr - mtctr r9 - - /* Set offsets */ - addi r6, r5, 32 - addi r7, r5, 64 - addi r8, r5, 96 - -zero_big_line: - dcbz r3, r5 - addi r5, r5, 128 - dcbz r3, r6 - addi r6, r6, 128 - dcbz r3, r7 - addi r7, r7, 128 - dcbz r3, r8 - addi r8, r8, 128 - bdnz zero_big_line - - /* Return */ - blr -#endif /* !((MPC55XX_CHIP_TYPE>=5510) && (MPC55XX_CHIP_TYPE<=5517)) */ -- cgit v1.2.3