This commit is contained in:
parent
7fc0f35319
commit
4eb049c0a6
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: mem.c 167 2008-04-24 13:53:17Z baconevi $
|
* $Id: mem.c 168 2008-04-24 14:25:47Z baconevi $
|
||||||
*
|
*
|
||||||
* {License}
|
* {License}
|
||||||
*/
|
*/
|
||||||
@ -65,9 +65,13 @@ void* ase_memset (void* dst, int val, ase_size_t n)
|
|||||||
|
|
||||||
#elif defined(__SPU__)
|
#elif defined(__SPU__)
|
||||||
|
|
||||||
ase_byte_t* d = (ase_byte_t*)dst;
|
ase_byte_t* d;
|
||||||
ase_size_t rem;
|
ase_size_t rem;
|
||||||
|
|
||||||
|
if (n <= 0) return dst;
|
||||||
|
|
||||||
|
d = (ase_byte_t*)dst;
|
||||||
|
|
||||||
/* spu SIMD instructions require 16-byte alignment */
|
/* spu SIMD instructions require 16-byte alignment */
|
||||||
rem = ((ase_size_t)dst) & (ASE_SIZEOF(vector unsigned char)-1);
|
rem = ((ase_size_t)dst) & (ASE_SIZEOF(vector unsigned char)-1);
|
||||||
if (rem > 0)
|
if (rem > 0)
|
||||||
@ -104,9 +108,13 @@ void* ase_memset (void* dst, int val, ase_size_t n)
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
ase_byte_t* d = (ase_byte_t*)dst;
|
ase_byte_t* d;
|
||||||
ase_size_t rem;
|
ase_size_t rem;
|
||||||
|
|
||||||
|
if (n <= 0) return dst;
|
||||||
|
|
||||||
|
d = (ase_byte_t*)dst;
|
||||||
|
|
||||||
rem = IS_UNALIGNED(dst);
|
rem = IS_UNALIGNED(dst);
|
||||||
if (rem > 0)
|
if (rem > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user