2007-01-19 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/spu/c99ppe.h: Replace vector with __vector. * libc/machine/spu/vec_literal.h: Ditto. * libc/machine/spu/strncmp.c: Ditto.
This commit is contained in:
parent
bdc75f5bf1
commit
f89533c1ff
|
@ -1,3 +1,9 @@
|
|||
2007-01-19 Kazunori Asayama <asayama@sm.sony.co.jp>
|
||||
|
||||
* libc/machine/spu/c99ppe.h: Replace vector with __vector.
|
||||
* libc/machine/spu/vec_literal.h: Ditto.
|
||||
* libc/machine/spu/strncmp.c: Ditto.
|
||||
|
||||
2007-01-15 Joseph Myers <joseph@codesourcery.com>
|
||||
Kazu Hirata <kazu@codesourcery.com>
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ Author: Joel Schopp <jschopp@austin.ibm.com>
|
|||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <spu_intrinsics.h>
|
||||
|
||||
#define SPE_C99_SIGNALCODE 0x2100
|
||||
|
||||
|
@ -102,7 +101,7 @@ send_to_ppe(int signalcode, int opcode, void *data)
|
|||
unsigned int combined = ( ( opcode<<24 )&0xff000000 ) | ( ( unsigned int )data & 0x00ffffff );
|
||||
struct spe_reg128* ret = data;
|
||||
|
||||
vector unsigned int stopfunc = {
|
||||
__vector unsigned int stopfunc = {
|
||||
signalcode, /* stop 0x210x*/
|
||||
(unsigned int) combined,
|
||||
0x4020007f, /* nop */
|
||||
|
|
|
@ -106,7 +106,7 @@ int strncmp(const char *s1, const char *s2, size_t n)
|
|||
|
||||
mask_v = spu_splats((unsigned int)0xFFFF);
|
||||
|
||||
shift_n_v = spu_andc((vector unsigned int)spu_sub(0, n_v), spu_cmpgt(n_v, -1));
|
||||
shift_n_v = spu_andc((__vector unsigned int)spu_sub(0, n_v), spu_cmpgt(n_v, -1));
|
||||
shift_eos_v = spu_sub(32, max_cnt_v);
|
||||
|
||||
max_shift_v = spu_sel(shift_n_v, shift_eos_v, spu_cmpgt(shift_eos_v, shift_n_v));
|
||||
|
|
|
@ -49,27 +49,22 @@
|
|||
* construction when all the elements of the vector contain the same value.
|
||||
*/
|
||||
|
||||
#ifdef __SPU__
|
||||
#include <spu_intrinsics.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* Use curly brace style.
|
||||
*/
|
||||
#define VEC_LITERAL(_type, ...) ((_type){__VA_ARGS__})
|
||||
|
||||
#define VEC_SPLAT_U8(_val) ((vector unsigned char){_val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val})
|
||||
#define VEC_SPLAT_S8(_val) ((vector signed char){_val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val})
|
||||
#define VEC_SPLAT_U8(_val) ((__vector unsigned char){_val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val})
|
||||
#define VEC_SPLAT_S8(_val) ((__vector signed char){_val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val})
|
||||
|
||||
#define VEC_SPLAT_U16(_val) ((vector unsigned short){_val, _val, _val, _val, _val, _val, _val, _val})
|
||||
#define VEC_SPLAT_S16(_val) ((vector signed short){_val, _val, _val, _val, _val, _val, _val, _val})
|
||||
#define VEC_SPLAT_U16(_val) ((__vector unsigned short){_val, _val, _val, _val, _val, _val, _val, _val})
|
||||
#define VEC_SPLAT_S16(_val) ((__vector signed short){_val, _val, _val, _val, _val, _val, _val, _val})
|
||||
|
||||
#define VEC_SPLAT_U32(_val) ((vector unsigned int){_val, _val, _val, _val})
|
||||
#define VEC_SPLAT_S32(_val) ((vector signed int){_val, _val, _val, _val})
|
||||
#define VEC_SPLAT_F32(_val) ((vector float){_val, _val, _val, _val})
|
||||
#define VEC_SPLAT_U32(_val) ((__vector unsigned int){_val, _val, _val, _val})
|
||||
#define VEC_SPLAT_S32(_val) ((__vector signed int){_val, _val, _val, _val})
|
||||
#define VEC_SPLAT_F32(_val) ((__vector float){_val, _val, _val, _val})
|
||||
|
||||
#define VEC_SPLAT_U64(_val) ((vector unsigned long long){_val, _val})
|
||||
#define VEC_SPLAT_S64(_val) ((vector signed long long){_val, _val})
|
||||
#define VEC_SPLAT_F64(_val) ((vector double){_val, _val})
|
||||
#define VEC_SPLAT_U64(_val) ((__vector unsigned long long){_val, _val})
|
||||
#define VEC_SPLAT_S64(_val) ((__vector signed long long){_val, _val})
|
||||
#define VEC_SPLAT_F64(_val) ((__vector double){_val, _val})
|
||||
|
||||
#endif /* _VEC_LITERAL_H_ */
|
||||
|
|
Loading…
Reference in New Issue