Using newlib (was: [Efi332] Building newlib/libgloss for MPC555)

David Eicher sailors3
Wed Aug 17 14:28:22 UTC 2005


Here is what the disassembly of printf looks like, does anyone see code for
the macro expansion of CHECK_INIT()?

Thanks,

Dave

00000090 <printf>:

#ifndef _REENT_ONLY

#ifdef _HAVE_STDC
int
printf(_CONST char *fmt, ...)
#else
int
printf(fmt, va_alist)
       char *fmt;
       va_dcl
#endif
{
  90:	94 21 ff 70 	stwu    r1,-144(r1)
  94:	7c 08 02 a6 	mflr    r0
  98:	42 9f 00 05 	bcl-    20,4*cr7+so,9c <printf+0xc>
  9c:	93 c1 00 88 	stw     r30,136(r1)
  a0:	7f c8 02 a6 	mflr    r30
  a4:	90 81 00 0c 	stw     r4,12(r1)
  a8:	90 01 00 94 	stw     r0,148(r1)
  int ret;
  va_list ap;

  _REENT_SMALL_CHECK_INIT (_stdout_r (_REENT));
#ifdef _HAVE_STDC
  va_start (ap, fmt);
#else
  va_start (ap);
#endif
  ret = vfprintf (_stdout_r (_REENT), fmt, ap);
  ac:	7c 64 1b 78 	mr      r4,r3
  b0:	90 a1 00 10 	stw     r5,16(r1)
  b4:	38 a1 00 70 	addi    r5,r1,112
  b8:	80 1e ff f0 	lwz     r0,-16(r30)
  bc:	90 c1 00 14 	stw     r6,20(r1)
  c0:	7f c0 f2 14 	add     r30,r0,r30
  c4:	90 e1 00 18 	stw     r7,24(r1)
  c8:	81 7e 80 00 	lwz     r11,-32768(r30)
  cc:	91 01 00 1c 	stw     r8,28(r1)
  d0:	81 6b 00 00 	lwz     r11,0(r11)
  d4:	91 21 00 20 	stw     r9,32(r1)
  d8:	91 41 00 24 	stw     r10,36(r1)
  dc:	40 86 00 24 	bne-    cr1,100 <printf+0x70>
  e0:	d8 21 00 28 	stfd    f1,40(r1)
  e4:	d8 41 00 30 	stfd    f2,48(r1)
  e8:	d8 61 00 38 	stfd    f3,56(r1)
  ec:	d8 81 00 40 	stfd    f4,64(r1)
  f0:	d8 a1 00 48 	stfd    f5,72(r1)
  f4:	d8 c1 00 50 	stfd    f6,80(r1)
  f8:	d8 e1 00 58 	stfd    f7,88(r1)
  fc:	d9 01 00 60 	stfd    f8,96(r1)
 100:	38 00 00 01 	li      r0,1
 104:	39 20 00 00 	li      r9,0
 108:	98 01 00 70 	stb     r0,112(r1)
 10c:	38 01 00 98 	addi    r0,r1,152
 110:	99 21 00 71 	stb     r9,113(r1)
 114:	39 21 00 08 	addi    r9,r1,8
 118:	80 6b 00 08 	lwz     r3,8(r11)
 11c:	90 01 00 74 	stw     r0,116(r1)
 120:	91 21 00 78 	stw     r9,120(r1)
 124:	48 00 00 01 	bl      124 <printf+0x94>
  va_end (ap);
  return ret;
}
 128:	80 01 00 94 	lwz     r0,148(r1)
 12c:	83 c1 00 88 	lwz     r30,136(r1)
 130:	38 21 00 90 	addi    r1,r1,144
 134:	7c 08 03 a6 	mtlr    r0
 138:	4e 80 00 20 	blr






More information about the Efi332 mailing list