mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-20 09:52:33 +00:00
(PS3/Altivec) Fix some altivec_mem compiler warnings
This commit is contained in:
parent
9964856cce
commit
a9d4af4f70
@ -213,6 +213,14 @@ void *vec_memset(void *s, int p, size_t len)
|
||||
ptr = (uint8_t *)ptr_w;
|
||||
}
|
||||
// Handle the remaining bytes
|
||||
memset_rest_bytes(ptr, P, len);
|
||||
switch(len)
|
||||
{
|
||||
case 3:
|
||||
*ptr++ = P;
|
||||
case 2:
|
||||
*ptr++ = P;
|
||||
case 1:
|
||||
*ptr++ = P;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
@ -225,24 +225,7 @@ static inline void memset_fwd_until_simd_aligned(word_t *ptr_w, word_t w, size_t
|
||||
}
|
||||
}
|
||||
|
||||
static inline void memset_rest_words(word_t *ptr_w, word_t w, size_t l)
|
||||
{
|
||||
while (l--)
|
||||
*ptr_w++ = w;
|
||||
}
|
||||
|
||||
static inline int memset_rest_bytes(uint8_t *ptr, uint8_t c, size_t len)
|
||||
{
|
||||
switch(len)
|
||||
{
|
||||
case 3:
|
||||
*ptr++ = c;
|
||||
case 2:
|
||||
*ptr++ = c;
|
||||
case 1:
|
||||
*ptr++ = c;
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
#define word_t uint32_t
|
||||
@ -357,29 +340,14 @@ static inline void memset_fwd_until_simd_aligned(word_t *ptr_w, word_t w, size_t
|
||||
*ptr_w++ = w;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void memset_rest_words(word_t *ptr_w, word_t w, size_t l)
|
||||
{
|
||||
while (l--)
|
||||
{
|
||||
while (l--)
|
||||
*ptr_w++ = w;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int memset_rest_bytes(uint8_t *ptr, uint8_t c, size_t len)
|
||||
{
|
||||
switch(len)
|
||||
{
|
||||
case 3:
|
||||
*ptr++ = c;
|
||||
case 2:
|
||||
*ptr++ = c;
|
||||
case 1:
|
||||
*ptr++ = c;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void copy_fwd_rest_blocks_aligned(word_t *d, const uint8_t *s, size_t blocks)
|
||||
{
|
||||
__vector unsigned char v1, v2, v3, v4;
|
||||
|
Loading…
x
Reference in New Issue
Block a user