This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Missing sprintf for SH1 ?
- From: "山田 淳" <jun at cew dot co dot jp>
- To: <newlib at sources dot redhat dot com>
- Date: Fri, 11 Apr 2003 13:44:33 +0900
- Subject: Missing sprintf for SH1 ?
- Reply-to: <jun at cew dot co dot jp>
Hello.
Although I am evaluating on CPU board of SH1 SH7034 of Hitachi, sprintf function does not operate correctly.
buf after execution is still NULL.
If an assembler is seen, the address is copied to buf, without the second parameter (fmt) going into a register 5 (r5) correctly.
Why does it operate in this way?
What should be changed into making it operate correctly?
Please let me know someone.
I ask of you.
cygwin dll 1.3.15-2
binutils 2.13.1
gcc-core 2.95.3
newlib 1.11.0
void function( void ){
char buf[30];
char *title = "test\r\n";
char *fmt = "%s";
int ret;
memclr(buf,sizeof(buf));
ret = sprintf(buf, fmt, title);
}
jun yamada