This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
strchr broken on SPU with non 16byte aligned argument
- From: Andrew_Pinski at PlayStation dot Sony dot Com
- To: newlib at sourceware dot org
- Cc: jschopp <jschopp at austin dot ibm dot com>, Kazunori_Asayama%SCEI at playstation dot sony dot com
- Date: Thu, 30 Nov 2006 20:46:51 -0800
- Subject: strchr broken on SPU with non 16byte aligned argument
Hi,
I noticed that the GCC testcase gcc.c-torture/execute/string-opt-5.c
is failing on the spu and was debugging it and it looks like strchr does
not handle correctly a non 16byte aligned agrument.
Here is the reduced testcase which is failing:
extern void abort (void);
extern char *strchr (const char *, int);
int main()
{
const char *const foo = "hello world";
char dst [64];
char *a = strchr (foo+4, 'l');
if (a != foo + 9)
abort ();
return 0;
}
Thanks,
Andrew Pinski