Maverick (EP9312) floating point issues

Wouter van Heyst wouter@vidicode.nl
Tue Oct 21 10:48:00 GMT 2003


Hello all,

I'm new to this list, so please bear with me, if there exists a policy
on inlining patches and such (or not ranting overly verbose), I
apologize for not following it in advance. 

While trying to build a hello world binary with gcc 3.4 (snapshot from
20031015) and binutils 2.14.90.0.5 for the ep9312 (ARM Maverick), I ran
into some problems.  My glibc wasn't build for the ep9312, so several
objects are in a different binary format than the result of assembling
helloworld for the ep9312.  The problem occurs when merging the two,
confusingly, the error message made it look like a.out wasn't being
compiled for the ep9312 (no Maverick FP):

	libc_nonshared.a(elf-init.oS) uses Maverick instructions, whereas a.out does not
	libc_nonshared.a(elf-init.oS) uses hardware FP, whereas a.out uses software FP

So I tried invoking gas by hand, which did result in the correct object.
Then it hit me the error message couldn't possibly be right about
elf-init.oS, and readelf confirms my suspicion, the arguments are
switched!  (a.out _was_ being built with Maverick FP, and glibc wasn't,
the message from bfd was just wrong)

I changed bfd/elf32-arm.h to be more in line with the messages surrounding it.
Both cases (in_flags & EF_ARM_MAVERICK_FLOAT, and out_flags & EF_ARM_MAVERICK_FLOAT) 
take their arguments ibfd, obfd in the same order, but now the message
describes the situation at hand.  Is this the style it should be in?


--- binutils-2.14.90.0.5.old/bfd/elf32-arm.h    2003-07-23 17:08:08.000000000 +0200
+++ binutils-2.14.90.0.5/bfd/elf32-arm.h        2003-10-21 11:28:58.000000000 +0200
@@ -2366 +2366 @@
-ERROR: %s uses Maverick instructions, whereas %s does not"),
+ERROR: %s does not use Maverick instructions, whereas %s does"),


Looking through the reste of the code I also ran into
gas/config/tc-arm.c line 772, in struct reg_map all_reg_maps[].
The same message is used for MVFX and MVDX messages, I suppose the
second isntance should be MVDX?

--- binutils-2.14.90.0.5.old/gas/config/tc-arm.c        2003-07-23 17:08:10.000000000 +0200
+++ binutils-2.14.90.0.5/gas/config/tc-arm.c    2003-10-21 12:39:03.000000000 +0200
@@ -772 +772 @@
-  {mav_mvdx_table,  15, NULL, N_("Maverick MVFX register expected")},
+  {mav_mvdx_table,  15, NULL, N_("Maverick MVDX register expected")},


Now, to get rid of the merging problem I will probably rebuild my entire
toolchain specifically for the ep9312. Apparently you get software
floating point if you select a Maverick cpu, in gas/config/tc-arm.c
there is this piece of code:

#if defined OBJ_ELF
	if (cpu_variant & ARM_CEXT_MAVERICK)
	{
		flags ^= F_SOFT_FLOAT;
		flags |= EF_ARM_MAVERICK_FLOAT;
	}
#endif

As far as I understand it, the ep9312 accepts regular and fpu
instructions in the same stream, and dispatches the floating point ops
to the crunch core. Could someone tell me how software fp comes into the equation?

The ep9312 isn't one of the best supported ARM cpus it seems (compiler
wise, but the same goes for Linux on the EDB9312 development board), any
help would be greatly appreciated.

Wouter van Heyst
Vidicode Datacommunicatie BV



More information about the Binutils mailing list