This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Missing sprintf for SH1 ?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]