All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used.
@ 2011-02-20  3:12 Alexander Holler
  2011-02-20  8:42 ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Holler @ 2011-02-20  3:12 UTC (permalink / raw)
  To: u-boot

Without -msoft-float the compiler would be allowed to use certain
floating-point instructions (VFP/NEON) e.g. for optimizations, which
would require additional code, for example to save contexts for
interrupts. Add a comment which describes this in short words.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
---
 arch/arm/cpu/arm1136/config.mk           |    2 ++
 arch/arm/cpu/arm1176/config.mk           |    2 ++
 arch/arm/cpu/arm1176/s3c64xx/config.mk   |    2 ++
 arch/arm/cpu/arm720t/config.mk           |    1 +
 arch/arm/cpu/arm920t/config.mk           |    1 +
 arch/arm/cpu/arm925t/config.mk           |    1 +
 arch/arm/cpu/arm926ejs/config.mk         |    1 +
 arch/arm/cpu/arm926ejs/davinci/config.mk |    1 +
 arch/arm/cpu/arm946es/config.mk          |    1 +
 arch/arm/cpu/arm_intcm/config.mk         |    1 +
 arch/arm/cpu/armv7/config.mk             |    2 ++
 arch/arm/cpu/armv7/omap-common/config.mk |    2 ++
 arch/arm/cpu/ixp/config.mk               |    1 +
 arch/arm/cpu/lh7a40x/config.mk           |    1 +
 arch/arm/cpu/pxa/config.mk               |    1 +
 arch/arm/cpu/s3c44b0/config.mk           |    1 +
 arch/arm/cpu/sa1100/config.mk            |    1 +
 17 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm1136/config.mk b/arch/arm/cpu/arm1136/config.mk
index 3e68535..e2c32c0 100644
--- a/arch/arm/cpu/arm1136/config.mk
+++ b/arch/arm/cpu/arm1136/config.mk
@@ -20,6 +20,8 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
+
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 # Make ARMv5 to allow more compilers to work, even though its v6.
diff --git a/arch/arm/cpu/arm1176/config.mk b/arch/arm/cpu/arm1176/config.mk
index 14346cf..a9a36b4 100644
--- a/arch/arm/cpu/arm1176/config.mk
+++ b/arch/arm/cpu/arm1176/config.mk
@@ -20,6 +20,8 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
+
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 # Make ARMv5 to allow more compilers to work, even though its v6.
diff --git a/arch/arm/cpu/arm1176/s3c64xx/config.mk b/arch/arm/cpu/arm1176/s3c64xx/config.mk
index 14346cf..a9a36b4 100644
--- a/arch/arm/cpu/arm1176/s3c64xx/config.mk
+++ b/arch/arm/cpu/arm1176/s3c64xx/config.mk
@@ -20,6 +20,8 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
+
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 # Make ARMv5 to allow more compilers to work, even though its v6.
diff --git a/arch/arm/cpu/arm720t/config.mk b/arch/arm/cpu/arm720t/config.mk
index 3844c62..1d59f60 100644
--- a/arch/arm/cpu/arm720t/config.mk
+++ b/arch/arm/cpu/arm720t/config.mk
@@ -22,6 +22,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS +=  -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi
diff --git a/arch/arm/cpu/arm920t/config.mk b/arch/arm/cpu/arm920t/config.mk
index 8f6c1a3..b595088 100644
--- a/arch/arm/cpu/arm920t/config.mk
+++ b/arch/arm/cpu/arm920t/config.mk
@@ -21,6 +21,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS += -march=armv4
diff --git a/arch/arm/cpu/arm925t/config.mk b/arch/arm/cpu/arm925t/config.mk
index 8f6c1a3..b595088 100644
--- a/arch/arm/cpu/arm925t/config.mk
+++ b/arch/arm/cpu/arm925t/config.mk
@@ -21,6 +21,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS += -march=armv4
diff --git a/arch/arm/cpu/arm926ejs/config.mk b/arch/arm/cpu/arm926ejs/config.mk
index f8ef90f..fb83862 100644
--- a/arch/arm/cpu/arm926ejs/config.mk
+++ b/arch/arm/cpu/arm926ejs/config.mk
@@ -21,6 +21,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS += -march=armv5te
diff --git a/arch/arm/cpu/arm926ejs/davinci/config.mk b/arch/arm/cpu/arm926ejs/davinci/config.mk
index 565adda..081c13d 100644
--- a/arch/arm/cpu/arm926ejs/davinci/config.mk
+++ b/arch/arm/cpu/arm926ejs/davinci/config.mk
@@ -21,6 +21,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS += -march=armv5te
diff --git a/arch/arm/cpu/arm946es/config.mk b/arch/arm/cpu/arm946es/config.mk
index e783f69..f7db925 100644
--- a/arch/arm/cpu/arm946es/config.mk
+++ b/arch/arm/cpu/arm946es/config.mk
@@ -21,6 +21,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS +=  -march=armv4
diff --git a/arch/arm/cpu/arm_intcm/config.mk b/arch/arm/cpu/arm_intcm/config.mk
index e783f69..f7db925 100644
--- a/arch/arm/cpu/arm_intcm/config.mk
+++ b/arch/arm/cpu/arm_intcm/config.mk
@@ -21,6 +21,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS +=  -march=armv4
diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
index 49ac9c7..03ec32b 100644
--- a/arch/arm/cpu/armv7/config.mk
+++ b/arch/arm/cpu/armv7/config.mk
@@ -20,6 +20,8 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
+
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 # Make ARMv5 to allow more compilers to work, even though its v7a.
diff --git a/arch/arm/cpu/armv7/omap-common/config.mk b/arch/arm/cpu/armv7/omap-common/config.mk
index 49ac9c7..03ec32b 100644
--- a/arch/arm/cpu/armv7/omap-common/config.mk
+++ b/arch/arm/cpu/armv7/omap-common/config.mk
@@ -20,6 +20,8 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
+
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 # Make ARMv5 to allow more compilers to work, even though its v7a.
diff --git a/arch/arm/cpu/ixp/config.mk b/arch/arm/cpu/ixp/config.mk
index deca3f4..9634615 100644
--- a/arch/arm/cpu/ixp/config.mk
+++ b/arch/arm/cpu/ixp/config.mk
@@ -24,6 +24,7 @@
 
 BIG_ENDIAN = y
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian
 
 PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100
diff --git a/arch/arm/cpu/lh7a40x/config.mk b/arch/arm/cpu/lh7a40x/config.mk
index 47b2b7b..6c4fa54 100644
--- a/arch/arm/cpu/lh7a40x/config.mk
+++ b/arch/arm/cpu/lh7a40x/config.mk
@@ -21,6 +21,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS += -march=armv4
diff --git a/arch/arm/cpu/pxa/config.mk b/arch/arm/cpu/pxa/config.mk
index a05d69c..45405d6 100644
--- a/arch/arm/cpu/pxa/config.mk
+++ b/arch/arm/cpu/pxa/config.mk
@@ -22,6 +22,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS += -march=armv5te -mtune=xscale
diff --git a/arch/arm/cpu/s3c44b0/config.mk b/arch/arm/cpu/s3c44b0/config.mk
index 7454d72..6a374a7 100644
--- a/arch/arm/cpu/s3c44b0/config.mk
+++ b/arch/arm/cpu/s3c44b0/config.mk
@@ -22,6 +22,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi -msoft-float
diff --git a/arch/arm/cpu/sa1100/config.mk b/arch/arm/cpu/sa1100/config.mk
index 6f21f41..e52e8b0 100644
--- a/arch/arm/cpu/sa1100/config.mk
+++ b/arch/arm/cpu/sa1100/config.mk
@@ -22,6 +22,7 @@
 # MA 02111-1307 USA
 #
 
+# -msoft-float forces the compiler to not use any fp-related instructions.
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
 
 PLATFORM_CPPFLAGS += -march=armv4 -mtune=strongarm1100
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used.
  2011-02-20  3:12 [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used Alexander Holler
@ 2011-02-20  8:42 ` Wolfgang Denk
  2011-02-20  9:39   ` Alexander Holler
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2011-02-20  8:42 UTC (permalink / raw)
  To: u-boot

Dear Alexander Holler,

In message <1298171532-5296-1-git-send-email-holler@ahsoftware.de> you wrote:
> Without -msoft-float the compiler would be allowed to use certain
> floating-point instructions (VFP/NEON) e.g. for optimizations, which
> would require additional code, for example to save contexts for
> interrupts. Add a comment which describes this in short words.

Hm... why do you see a need to explain this for ARM, but not so for
the other architectrures, say for PowerPC?

If you really want to add this, then it should probably be somewhere
in the REAME or another central place of documentation (instead of
distributed over tons of Makefiles), and to make your message
understood you might want to add "additional code" may mean that
additional function blocks in the respective SoC may need to be
initialized and, for example, clocked, which may for example
significantly increase the power dissipation of the system.

> +# -msoft-float forces the compiler to not use any fp-related instructions.

Well, now this is a commonplace that says about nothing and can be
leftout as well.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"How is this place run - is it an anarchy?"
"No, I wouldn't say so; it is not that well organised..."

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used.
  2011-02-20  8:42 ` Wolfgang Denk
@ 2011-02-20  9:39   ` Alexander Holler
  2011-02-20  9:52     ` Alexander Holler
  2011-02-20 10:20     ` Wolfgang Denk
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Holler @ 2011-02-20  9:39 UTC (permalink / raw)
  To: u-boot

Am 20.02.2011 09:42, schrieb Wolfgang Denk:
> Dear Alexander Holler,
>
> In message<1298171532-5296-1-git-send-email-holler@ahsoftware.de>  you wrote:
>> Without -msoft-float the compiler would be allowed to use certain
>> floating-point instructions (VFP/NEON) e.g. for optimizations, which
>> would require additional code, for example to save contexts for
>> interrupts. Add a comment which describes this in short words.
>
> Hm... why do you see a need to explain this for ARM, but not so for
> the other architectrures, say for PowerPC?

I don't know how other the compiler behaves for other architectures and 
if those are having the need to save fp-contexts for irqs.

>
> If you really want to add this, then it should probably be somewhere
> in the REAME or another central place of documentation (instead of
> distributed over tons of Makefiles), and to make your message

I prefer comments where they are usefull. Hiding them somewhere is useless.

> understood you might want to add "additional code" may mean that
> additional function blocks in the respective SoC may need to be
> initialized and, for example, clocked, which may for example
> significantly increase the power dissipation of the system.
>
>> +# -msoft-float forces the compiler to not use any fp-related instructions.
>
> Well, now this is a commonplace that says about nothing and can be
> leftout as well.

# -msoft-float forces the compiler to avoid any fp-related instructions 
for optimizations.

Would that be better?

Regards,

Alexander

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used.
  2011-02-20  9:39   ` Alexander Holler
@ 2011-02-20  9:52     ` Alexander Holler
  2011-02-20 10:05       ` Alexander Holler
  2011-02-20 10:20     ` Wolfgang Denk
  1 sibling, 1 reply; 8+ messages in thread
From: Alexander Holler @ 2011-02-20  9:52 UTC (permalink / raw)
  To: u-boot

Am 20.02.2011 10:39, schrieb Alexander Holler:

> # -msoft-float forces the compiler to avoid any fp-related instructions
> for optimizations.
>
> Would that be better?

Anyway, I don't care about that patch. I now know the reason. ;)

Btw, isn't soft-float useless on ARM when armv5 is used as architecture?

Regards,

Alexander

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used.
  2011-02-20  9:52     ` Alexander Holler
@ 2011-02-20 10:05       ` Alexander Holler
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Holler @ 2011-02-20 10:05 UTC (permalink / raw)
  To: u-boot

Am 20.02.2011 10:52, schrieb Alexander Holler:
> Am 20.02.2011 10:39, schrieb Alexander Holler:
>
>> # -msoft-float forces the compiler to avoid any fp-related instructions
>> for optimizations.
>>
>> Would that be better?
>
> Anyway, I don't care about that patch. I now know the reason. ;)
>
> Btw, isn't soft-float useless on ARM when armv5 is used as architecture?

To answer myself: No.

See 
http://www.arm.com/products/processors/technologies/vector-floating-point.php

Regards,

Alexander

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used.
  2011-02-20  9:39   ` Alexander Holler
  2011-02-20  9:52     ` Alexander Holler
@ 2011-02-20 10:20     ` Wolfgang Denk
  2011-02-20 15:43       ` Eric Cooper
  2011-02-20 18:57       ` Alexander Holler
  1 sibling, 2 replies; 8+ messages in thread
From: Wolfgang Denk @ 2011-02-20 10:20 UTC (permalink / raw)
  To: u-boot

Dear Alexander Holler,

In message <4D60E16E.1060406@ahsoftware.de> you wrote:
>
> I don't know how other the compiler behaves for other architectures and 
> if those are having the need to save fp-contexts for irqs.

I thought I had explained this again in recent postings, not to
mention the times I did that before; you probably can find this in the
archives.

> # -msoft-float forces the compiler to avoid any fp-related instructions 
> for optimizations.
> 
> Would that be better?

No, not at all, because the only additional information about what
-msoft-float does (not using FP instructions) in the "for
optimizations" part - but that does not help much if you don;t have
the background we discussed here again.

So if you want to document this, then please provide a more complete
explanation about the reasons for using -msoft-float, summarizing the
recent discussion.

Keep in mind that it does not only apply to ARM Makefiles, but to all
other architectures as well. And instead of adding it to all ~30
affected files (which also gives no guarantee that it will be
documented in any newly created config.mk files), please add it to
some central doc file - either to the README, or feel free to create
a doc/README.toolchain or similar that can then also be used to
document things like linker options, information about known issues,
etc.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Remember, an int is not always 16 bits. I'm  not  sure,  but  if  the
80386  is one step closer to Intel's slugfest with the CPU curve that
is aymptotically approaching a real machine, perhaps an int has  been
implemented as 32 bits by some Unix vendors...?       - Derek Terveer

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used.
  2011-02-20 10:20     ` Wolfgang Denk
@ 2011-02-20 15:43       ` Eric Cooper
  2011-02-20 18:57       ` Alexander Holler
  1 sibling, 0 replies; 8+ messages in thread
From: Eric Cooper @ 2011-02-20 15:43 UTC (permalink / raw)
  To: u-boot

On Sun, Feb 20, 2011 at 11:20:07AM +0100, Wolfgang Denk wrote:
> [...] or feel free to create a doc/README.toolchain or similar that
> can then also be used to document things like linker options,
> information about known issues, etc.

+1 for a README.toolchain file.

-- 
Eric Cooper             e c c @ c m u . e d u

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used.
  2011-02-20 10:20     ` Wolfgang Denk
  2011-02-20 15:43       ` Eric Cooper
@ 2011-02-20 18:57       ` Alexander Holler
  1 sibling, 0 replies; 8+ messages in thread
From: Alexander Holler @ 2011-02-20 18:57 UTC (permalink / raw)
  To: u-boot

On 20.02.2011 11:20, Wolfgang Denk wrote:

> No, not at all, because the only additional information about what

Thanks, at least I tried it.

Regards,

Alexander

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-20 18:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-20  3:12 [U-Boot] [PATCH] ARM: Add comments why -msoft-float is used Alexander Holler
2011-02-20  8:42 ` Wolfgang Denk
2011-02-20  9:39   ` Alexander Holler
2011-02-20  9:52     ` Alexander Holler
2011-02-20 10:05       ` Alexander Holler
2011-02-20 10:20     ` Wolfgang Denk
2011-02-20 15:43       ` Eric Cooper
2011-02-20 18:57       ` Alexander Holler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.