[uClibc]isprint

Arne Jonsson arne.jonsson at i3micro.com
Mon Mar 24 12:25:14 UTC 2003


Hello!

I'm having problem with isprint (I have not tested the other
is-functions).
I am using the rather old uClibc 0.9.15.
This is for target ARM.
In my Config: HAS_LOCALE = false

Below is two disassembly listings, one with "#include <ctype.h>", one
without.
I made the comments.
With "include <ctype.h>:
****         if ( isprint(*msg) ) {
	.LM6:
 		ldrb	r2, [r6, #0]	@ *msg moved to r2
 		ldr	r3, .L167+12    @ __ctype_b moved to r3
 		mov	r2, r2, asl #1
 		ldr	r3, [sl, r3]    @ 0 moved to r3
 		ldrh	r3, [r2, r3]	@ movhi
 		tst	r3, #64
 		beq	.L161
	.L167:
 434 00ac 00000000 		.word	stderr
 435 00b0 66666667 		.word	1717986919
 436 00b4 00000000 		.word	.LC0
 437 00b8 00000000 		.word	__ctype_b
I don't know what ctype_b is, but there is no table or anything starting
at the address sl+r3. At the position sl+r3 it just happens to be 0 (or
is this more than a coincidence?)
My guess is that sl+r3 should point to some table but this is not
happening, why?



Without "include <ctype.h>:
Just a branch to the function is made, like:
              bl      isprint

What am I doing wrong here? Did I build uClibc wrong? Compiler error?
....? 

Best regards,
/Arne Jonsson

-- 
Arne Jonsson
i3 micro technology AB
Phone:+46-8-506 388 00
Fax:  +46-8-506 388 75



More information about the uClibc mailing list