Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] urgent toolchain


  • To: Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
  • Subject: Re: [arm-gnu] urgent toolchain
  • From: Gilles Chanteperdrix <gilles.chanteperdrix@xxxxxxxxxxx>
  • Date: Sat, 16 Aug 2008 19:48:01 +0200

Carlos O'Donell wrote:
> kiran wrote:
>> What are the options i have to give for compiling  the
>> program for  ARM926EJ-S cpu ?
>> The options right now i am using is
>> -msoft-float and -mcpu=arm926ej-s.
>> The toolchain what i am using is gcc version 4.2.1
>> (Sourcery G++ 4.2-107).
> 
> Using "-mfpu=vfp -mfloat-abi=softfp" instead of "-msoft-float" will 
> enable VFP hardware floating-point code-generation for your program. The 
> run-time libraries will still use software floating-point. Routines 
> compiled for VFP are compatible with software floating-point.

It looks like run-time libraries do contain some FP code. Here is an
excerpt of disassembling
arm-2007q3/arm-none-linux-gnueabi/libc/lib/libc-2.5.so:

00029a80 <__setfpucw>:
   29a80:	e92d4070 	push	{r4, r5, r6, lr}
   29a84:	e59fe048 	ldr	lr, [pc, #72]	; 29ad4 <__setfpucw+0x54>
   29a88:	e59f3048 	ldr	r3, [pc, #72]	; 29ad8 <__setfpucw+0x58>
   29a8c:	e08fe00e 	add	lr, pc, lr
   29a90:	e79ec003 	ldr	ip, [lr, r3]
   29a94:	e3a01040 	mov	r1, #64	; 0x40
   29a98:	e3a02000 	mov	r2, #0	; 0x0
   29a9c:	e28c5040 	add	r5, ip, #64	; 0x40
   29aa0:	e8950060 	ldm	r5, {r5, r6}
   29aa4:	e0053001 	and	r3, r5, r1
   29aa8:	e0064002 	and	r4, r6, r2
   29aac:	e1933004 	orrs	r3, r3, r4
   29ab0:	08bd8070 	popeq	{r4, r5, r6, pc}
   29ab4:	eef13a10 	fmrx	r3, fpscr
   29ab8:	e59f201c 	ldr	r2, [pc, #28]	; 29adc <__setfpucw+0x5c>
   29abc:	e59f101c 	ldr	r1, [pc, #28]	; 29ae0 <__setfpucw+0x60>
   29ac0:	e0032002 	and	r2, r3, r2
   29ac4:	e0001001 	and	r1, r0, r1
   29ac8:	e1822001 	orr	r2, r2, r1
   29acc:	eee12a10 	fmxr	fpscr, r2
   29ad0:	e8bd8070 	pop	{r4, r5, r6, pc}
   29ad4:	000f356c 	.word	0x000f356c
   29ad8:	0000010c 	.word	0x0000010c
   29adc:	0e08e0e0 	.word	0x0e08e0e0
   29ae0:	f1f71f1f 	.word	0xf1f71f1f
	...

00029af0 <__sigsetjmp>:
   29af0:	e1a0c000 	mov	ip, r0
   29af4:	e8ac6ff0 	stmia	ip!, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
   29af8:	e59f2044 	ldr	r2, [pc, #68]	; 29b44 <Lno_iwmmxt+0x4>
   29afc:	e59f3044 	ldr	r3, [pc, #68]	; 29b48 <Lrtld_global_ro>
   29b00:	e08f2002 	add	r2, pc, r2
   29b04:	e7922003 	ldr	r2, [r2, r3]
   29b08:	e5922040 	ldr	r2, [r2, #64]
   29b0c:	e3120040 	tst	r2, #64	; 0x40
   29b10:	0a000002 	beq	29b20 <Lno_vfp>
   29b14:	ecac8b11 	fstmiax	ip!, {d8-d15}
   29b18:	eef12a10 	fmrx	r2, fpscr
   29b1c:	e48c2004 	str	r2, [ip], #4

00029c00 <__longjmp>:
   29c00:	e1a0c000 	mov	ip, r0
   29c04:	e1b00001 	movs	r0, r1
   29c08:	03a00001 	moveq	r0, #1	; 0x1
   29c0c:	e8bc6ff0 	ldm	ip!, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
   29c10:	e59f1044 	ldr	r1, [pc, #68]	; 29c5c <Lno_iwmmxt+0x4>
   29c14:	e59f2044 	ldr	r2, [pc, #68]	; 29c60 <Lrtld_global_ro>
   29c18:	e08f1001 	add	r1, pc, r1
   29c1c:	e7911002 	ldr	r1, [r1, r2]
   29c20:	e5911040 	ldr	r1, [r1, #64]
   29c24:	e3110040 	tst	r1, #64	; 0x40
   29c28:	0a000002 	beq	29c38 <Lno_vfp>
   29c2c:	ecbc8b11 	fldmiax	ip!, {d8-d15}
   29c30:	e49c1004 	ldr	r1, [ip], #4
   29c34:	eee11a10 	fmxr	fpscr, r1

-- 
					    Gilles.