From f89533c1ffb2ff780ad8e678a1cd9c7e6035725f Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 19 Jan 2007 23:53:07 +0000 Subject: [PATCH] 2007-01-19 Kazunori Asayama * libc/machine/spu/c99ppe.h: Replace vector with __vector. * libc/machine/spu/vec_literal.h: Ditto. * libc/machine/spu/strncmp.c: Ditto. --- newlib/ChangeLog | 6 ++++++ newlib/libc/machine/spu/c99ppe.h | 3 +-- newlib/libc/machine/spu/strncmp.c | 2 +- newlib/libc/machine/spu/vec_literal.h | 25 ++++++++++--------------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index a0b166aaa..5a7e3e8b4 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2007-01-19 Kazunori Asayama + + * 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 Kazu Hirata diff --git a/newlib/libc/machine/spu/c99ppe.h b/newlib/libc/machine/spu/c99ppe.h index a4199bcbf..8ae9893c9 100644 --- a/newlib/libc/machine/spu/c99ppe.h +++ b/newlib/libc/machine/spu/c99ppe.h @@ -31,7 +31,6 @@ Author: Joel Schopp */ #include -#include #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 */ diff --git a/newlib/libc/machine/spu/strncmp.c b/newlib/libc/machine/spu/strncmp.c index 1893e80a4..54d1fb9f4 100644 --- a/newlib/libc/machine/spu/strncmp.c +++ b/newlib/libc/machine/spu/strncmp.c @@ -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)); diff --git a/newlib/libc/machine/spu/vec_literal.h b/newlib/libc/machine/spu/vec_literal.h index 87589393b..d376a1bec 100644 --- a/newlib/libc/machine/spu/vec_literal.h +++ b/newlib/libc/machine/spu/vec_literal.h @@ -49,27 +49,22 @@ * construction when all the elements of the vector contain the same value. */ -#ifdef __SPU__ -#include -#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_ */