Skip to contentSkip to conversation

EP93xx - update of GCC support for this sick CPU/FPU

PATCH New Marcin Juszkiewicz 3 participants 16 messages Jun 1, 2009 – Jun 5, 2009

lore
Share & tools
lore
#0 lore raw

Hi

This patchset is taken from http://martinwguy.co.uk/martin/crunch/

It is enabled by default for ep93xx devices as EDB9301 boots into rootfs built with this toolchain without problems. Running "openssl speed" works but end table with results contains broken calculations.

Binary locales do not work as QEMU do not handle ep93xx cpu.

Patches are a bit ugly maybe (in conf/machine/include/*) but I want to show it finally to people before it rust.

Text from page:

On 10 March there were no known bugs in this stuff (again). On 19 March libvorbisenc managed to find a bug in GCC whereby it incorrectly optimizes certain code sequences that use single-precision floats. The Maverick code generator exhibits similar symptoms for the same code, but only at optimization levels -O2 and above, so the fastest reliable optimization options for Maverick at present are -O -ffast-math.

I've been working on GCC-4.3.3 to make it generate working code for the Cirrus Logic MaverickCrunch FPU, as found in their ARM-based EP9302, EP9307, EP9312 and EP9315 chips, making floating point-intensive code about 2.5 times faster.

This follows on from Hasjim Williams' earlier work with gcc-4.1.2 and 4.2.0, a bundle of his more recent ideas and more hacks from me.

If you want to understand the patches themselves, there is an article about the MaverickCrunch FPU and GCC's problems with it on the Debian wiki [1] and I have added commentary at the top of the individual patch files.

1. http://wiki.debian.org/ArmEabiMaverickCrunch

#1 lore raw

PATCH 1/13 gcc 4.3.3: add ep93xx patches from Martin W. Guy

From: Marcin Juszkiewicz <[email protected]>

Patchset taken from http://martinwguy.co.uk/martin/crunch/

Text from page:

On 10 March there were no known bugs in this stuff (again). On 19 March libvorbisenc managed to find a bug in GCC whereby it incorrectly optimizes certain code sequences that use single-precision floats. The Maverick code generator exhibits similar symptoms for the same code, but only at optimization levels -O2 and above, so the fastest reliable optimization options for Maverick at present are -O -ffast-math.

I've been working on GCC-4.3.3 to make it generate working code for the Cirrus Logic MaverickCrunch FPU, as found in their ARM-based EP9302, EP9307, EP9312 and EP9315 chips, making floating point-intensive code about 2.5 times faster.

This follows on from Hasjim Williams' earlier work with gcc-4.1.2 and 4.2.0, a bundle of his more recent ideas and more hacks from me.

If you want to understand the patches themselves, there is an article about the MaverickCrunch FPU and GCC's problems with it on the Debian wiki [1] and I have added commentary at the top of the individual patch files.

1. http://wiki.debian.org/ArmEabiMaverickCrunch

---
 recipes/gcc/gcc-4.3.3.inc                          |   27 +
 recipes/gcc/gcc-4.3.3/ep93xx/README                |   11 +
 recipes/gcc/gcc-4.3.3/ep93xx/URL                   |    1 +
 .../gcc/gcc-4.3.3/ep93xx/arm-crunch-20000320.patch |   13 +
 .../arm-crunch-arm_dbx_register_number.patch       |   15 +
 .../gcc-4.3.3/ep93xx/arm-crunch-ccmav-mode.patch   |  734 ++++++++++++++++++++
 .../ep93xx/arm-crunch-cfcpy-with-cfsh64.patch      |   27 +
 .../ep93xx/arm-crunch-cftruncd32-attr.patch        |   12 +
 .../ep93xx/arm-crunch-cirrus-di-flag.patch         |  248 +++++++
 .../ep93xx/arm-crunch-disable-cmpdi.patch          |   29 +
 .../gcc-4.3.3/ep93xx/arm-crunch-drop-thumb2.patch  |   98 +++
 ...eabi-ieee754-endian-littleword-littlebyte.patch |   15 +
 .../arm-crunch-eabi-mvf0-scratch-ieee754.patch     |   89 +++
 .../arm-crunch-fix-64bit-const-offsets.patch       |   25 +
 .../ep93xx/arm-crunch-fix-cirrus-reorg5.patch      |  313 +++++++++
 .../ep93xx/arm-crunch-floatsi-no-scratch.patch     |   35 +
 .../gcc-4.3.3/ep93xx/arm-crunch-fp_consts.patch    |   15 +
 .../gcc/gcc-4.3.3/ep93xx/arm-crunch-mieee.patch    |  267 +++++++
 .../ep93xx/arm-crunch-movsf-movdf-Uy.patch         |   65 ++
 .../gcc-4.3.3/ep93xx/arm-crunch-neg-enable.patch   |   31 +
 .../gcc-4.3.3/ep93xx/arm-crunch-neg-protect.patch  |   33 +
 .../gcc/gcc-4.3.3/ep93xx/arm-crunch-pipeline.patch |  461 ++++++++++++
 .../gcc/gcc-4.3.3/ep93xx/arm-crunch-readme.patch   |  107 +++
 .../ep93xx/arm-crunch-repair-truncxfsi.patch       |   29 +
 .../gcc/gcc-4.3.3/ep93xx/arm-crunch-saveregs.patch |   88 +++
 .../gcc/gcc-4.3.3/ep93xx/arm-crunch-scratch.patch  |   27 +
 .../gcc-4.3.3/ep93xx/arm-prologue_use-length.patch |   10 +
 recipes/gcc/gcc-4.3.3/ep93xx/arm-size-bugfix.patch |   33 +
 recipes/gcc/gcc-4.3.3/ep93xx/series                |   25 +
 29 files changed, 2883 insertions(+), 0 deletions(-)
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/README
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/URL
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-20000320.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-arm_dbx_register_number.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-ccmav-mode.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cfcpy-with-cfsh64.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cftruncd32-attr.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cirrus-di-flag.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-disable-cmpdi.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-drop-thumb2.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-64bit-const-offsets.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-cirrus-reorg5.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-floatsi-no-scratch.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fp_consts.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-mieee.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-movsf-movdf-Uy.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-enable.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-protect.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-pipeline.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-readme.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-repair-truncxfsi.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-saveregs.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-scratch.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-prologue_use-length.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/arm-size-bugfix.patch
 create mode 100644 recipes/gcc/gcc-4.3.3/ep93xx/series
recipes/gcc/gcc-4.3.3.inc +27 -0
index 2947b18..6ccb0f1 100644
@@ -65,6 +65,33 @@ SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
 SRC_URI_append_sh4  = " file://sh_unwind.patch;patch=1 \
 			file://gcc-4.2.3-linux-multilib-fix.patch;patch=1 \
 		      "
+SRC_URI_append_ep93xx = " \
+	file://ep93xx/arm-crunch-readme.patch;patch=1 \
+	file://ep93xx/arm-crunch-saveregs.patch;patch=1 \
+	file://ep93xx/arm-crunch-scratch.patch;patch=1 \
+	file://ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch;patch=1 \
+	file://ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch;patch=1 \
+	file://ep93xx/arm-crunch-20000320.patch;patch=1 \
+	file://ep93xx/arm-crunch-disable-cmpdi.patch;patch=1 \
+	file://ep93xx/arm-crunch-fix-64bit-const-offsets.patch;patch=1 \
+	file://ep93xx/arm-crunch-fp_consts.patch;patch=1 \
+	file://ep93xx/arm-crunch-neg-enable.patch;patch=1 \
+	file://ep93xx/arm-crunch-neg-protect.patch;patch=1 \
+	file://ep93xx/arm-crunch-repair-truncxfsi.patch;patch=1 \
+	file://ep93xx/arm-crunch-floatsi-no-scratch.patch;patch=1 \
+	file://ep93xx/arm-crunch-movsf-movdf-Uy.patch;patch=1 \
+	file://ep93xx/arm-crunch-drop-thumb2.patch;patch=1 \
+	file://ep93xx/arm-crunch-arm_dbx_register_number.patch;patch=1 \
+	file://ep93xx/arm-crunch-pipeline.patch;patch=1 \
+	file://ep93xx/arm-crunch-ccmav-mode.patch;patch=1 \
+	file://ep93xx/arm-crunch-cfcpy-with-cfsh64.patch;patch=1 \
+	file://ep93xx/arm-crunch-mieee.patch;patch=1 \
+	file://ep93xx/arm-size-bugfix.patch;patch=1 \
+	file://ep93xx/arm-prologue_use-length.patch;patch=1 \
+	file://ep93xx/arm-crunch-cftruncd32-attr.patch;patch=1 \
+	file://ep93xx/arm-crunch-fix-cirrus-reorg5.patch;patch=1 \
+	file://ep93xx/arm-crunch-cirrus-di-flag.patch;patch=1 \
+"
 # Language Overrides
 FORTRAN = ""
 FORTRAN_linux-gnueabi = ",fortran"
recipes/gcc/gcc-4.3.3/ep93xx/README new file +11 -0
new file mode 100644
index 0000000..a656a85
@@ -0,0 +1,11 @@
+This is a set of patches for gcc-4.3 that fix code generation for the
+Maverick Crunch FPU present in Cirrus Logic EP93xx devices.
+
+They are based on the patch ideas for OpenEmbedded that Hasjim Williams sent me
+privately in April 2008, with my own reimplementation of the CCMAV mode and the
+addition of a -mieee switch to fully respect denormalized values (with a 50%
+speed penalty).
+
+See the comments at the top of each patch file for further details.
+
+   Martin Guy <[email protected]>, 21 November 2008 - 12 March 2009
recipes/gcc/gcc-4.3.3/ep93xx/URL new file +1 -0
new file mode 100644
index 0000000..7761ed8
@@ -0,0 +1 @@
+http://martinwguy.co.uk/martin/crunch/gcc-4.3.3-patches/
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-20000320.patch new file +13 -0
new file mode 100644
index 0000000..8a9836b
@@ -0,0 +1,13 @@
+Fix one test in the testsuite to know about Maverick crunch word order
+
+--- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c.original	2007-06-07 16:33:44.000000000 +1000
++++ gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c	2007-06-07 16:34:05.000000000 +1000
+@@ -48,7 +48,7 @@
+     exit (0);
+   
+   c(0x3690000000000000ULL, 0x00000000U);
+-#if (defined __arm__ || defined __thumb__) && ! (defined __ARMEB__ || defined __VFP_FP__)
++#if (defined __arm__ || defined __thumb__) && ! (defined __ARMEB__ || defined __VFP_FP__) && ! (defined __MAVERICK__)
+   /* The ARM always stores FP numbers in big-wordian format,
+      even when running in little-byteian mode.  */
+   c(0x0000000136900000ULL, 0x00000001U);
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-arm_dbx_register_number.patch new file +15 -0
new file mode 100644
index 0000000..4d4b9da
@@ -0,0 +1,15 @@
+Include the Maverick Crunch registers in the GCC->DWARF2 register number
+mapping. Without this, cc -g with maverick hardfloat fails.
+
+--- gcc-4.3.2/gcc/config/arm/arm.c-original	2008-04-11 16:16:25.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/arm.c	2008-04-11 16:19:15.000000000 +1000
+@@ -18298,6 +18298,9 @@
+   if (IS_FPA_REGNUM (regno))
+     return (TARGET_AAPCS_BASED ? 96 : 16) + regno - FIRST_FPA_REGNUM;
+ 
++  if (IS_CIRRUS_REGNUM (regno))
++    return 28 + regno - FIRST_CIRRUS_FP_REGNUM;
++
+   /* FIXME: VFPv3 register numbering.  */
+   if (IS_VFP_REGNUM (regno))
+     return 64 + regno - FIRST_VFP_REGNUM;
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-ccmav-mode.patch new file +734 -0

734 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cfcpy-with-cfsh64.patch new file +27 -0
new file mode 100644
index 0000000..6260699
@@ -0,0 +1,27 @@
+cfcpys and cfcpyd have hardware bugs which mean they truncate denormalized
+values to zero and convert minus zero to plus zero.
+
+A 64-bit shift with a shift count of 0 copies them bitwise.
+
+    Martin Guy <[email protected]>, December 2008
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old	2008-11-21 19:06:37.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md	2008-12-03 12:13:08.000000000 +0000
+@@ -485,7 +485,7 @@
+    && (GET_CODE (operands[0]) != MEM
+        || register_operand (operands[1], SFmode))"
+   "@
+-   cfcpys%?\\t%V0, %V1
++   cfsh64%?\\t%Z0, %Z1, #0\\t%@ float
+    cfldrs%?\\t%V0, %1
+    cfmvsr%?\\t%V0, %1
+    cfmvrs%?\\t%0, %V1
+@@ -514,7 +514,7 @@
+     case 1: return \"stm%?ia\\t%m0, %M1\\t%@ double\";
+     case 2: return \"#\";
+     case 3: case 4: return output_move_double (operands);
+-    case 5: return \"cfcpyd%?\\t%V0, %V1\";
++    case 5: return \"cfsh64%?\\t%Z0, %Z1, #0\\t%@ double\";
+     case 6: return \"cfldrd%?\\t%V0, %1\";
+     case 7: return \"cfmvdlr\\t%V0, %Q1\;cfmvdhr%?\\t%V0, %R1\";
+     case 8: return \"cfmvrdl%?\\t%Q0, %V1\;cfmvrdh%?\\t%R0, %V1\";
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cftruncd32-attr.patch new file +12 -0
new file mode 100644
index 0000000..bdc603a
@@ -0,0 +1,12 @@
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old	2009-02-16 16:19:19.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md	2009-03-10 12:13:10.000000000 +0000
+@@ -425,7 +425,8 @@
+   "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+   "cftruncd32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+   [(set_attr "type" "f_cvt")
+-   (set_attr "length" "8")]
++   (set_attr "length" "8")
++   (set_attr "cirrus" "normal")]
+ )
+ 
+ ; Cirrus hardware bugs: denormalized values on input are truncated to zero
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cirrus-di-flag.patch new file +248 -0

248 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-disable-cmpdi.patch new file +29 -0
new file mode 100644
index 0000000..7db1274
@@ -0,0 +1,29 @@
+Disable the Maverick's cmpdi instruction which cannot perform the simultaneous
+signed/unsigned comparison expected by GCC.
+
+diff -ruN /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md
+--- /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.md	2006-09-28 03:10:22.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md	2007-05-15 09:53:21.000000000 +1000
+@@ -7354,10 +7366,12 @@
+ )
+ 
+ ;; Cirrus DI compare instruction
++;; This is disabled and left go through ARM core registers, because currently
++;; Crunch coprocessor does only signed comparison.
+ (define_expand "cmpdi"
+   [(match_operand:DI 0 "cirrus_fp_register" "")
+    (match_operand:DI 1 "cirrus_fp_register" "")]
+-  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK & 0"
+   "{
+      arm_compare_op0 = operands[0];
+      arm_compare_op1 = operands[1];
+@@ -7368,7 +7382,7 @@
+   [(set (reg:CC CC_REGNUM)
+ 	(compare:CC (match_operand:DI 0 "cirrus_fp_register" "v")
+ 		    (match_operand:DI 1 "cirrus_fp_register" "v")))]
+-  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK & 0"
+   "cfcmp64%?\\tr15, %V0, %V1"
+   [(set_attr "type"   "mav_farith")
+    (set_attr "cirrus" "compare")]
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-drop-thumb2.patch new file +98 -0

98 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch new file +15 -0
new file mode 100644
index 0000000..f16336d
@@ -0,0 +1,15 @@
+Define Maverick floating point word order in libgcc's assemble support routines
+
+--- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-df.S	2007-06-07 13:06:52.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/ieee754-df.S	2008-04-07 13:15:49.000000000 +1000
+@@ -42,8 +42,9 @@
+ 
+ 
+ @ For FPA, float words are always big-endian.
++@ For MAVERICK, float words are always little-endian.
+ @ For VFP, floats words follow the memory system mode.
+-#if defined(__VFP_FP__) && !defined(__ARMEB__)
++#if ((defined(__VFP_FP__) && !defined(__ARMEB__)) || defined(__MAVERICK__))
+ #define xl r0
+ #define xh r1
+ #define yl r2
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch new file +89 -0

89 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-64bit-const-offsets.patch new file +25 -0
new file mode 100644
index 0000000..e3d6701
@@ -0,0 +1,25 @@
+Fixup possible address offsets for constant double integers
+also when using Maverick to handle 64-bit integers.
+
+--- gcc-4.3.2/gcc/config/arm/arm.c-original	2007-06-12 14:46:20.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/arm.c	2007-06-12 14:48:06.000000000 +1000
+@@ -3815,7 +3815,8 @@
+ 
+   use_ldrd = (TARGET_LDRD
+ 	      && (mode == DImode
+-		  || (mode == DFmode && (TARGET_SOFT_FLOAT || TARGET_VFP))));
++		  || (mode == DFmode
++		      && (TARGET_SOFT_FLOAT || TARGET_VFP || TARGET_MAVERICK))));
+ 
+   if (code == POST_INC || code == PRE_DEC
+       || ((code == PRE_INC || code == POST_DEC)
+@@ -4424,7 +4424,8 @@
+ 	  /* VFP addressing modes actually allow greater offsets, but for
+ 	     now we just stick with the lowest common denominator.  */
+ 	  if (mode == DImode
+-	      || ((TARGET_SOFT_FLOAT || TARGET_VFP) && mode == DFmode))
++	      || (mode == DFmode
++		  && (TARGET_SOFT_FLOAT || TARGET_VFP || TARGET_MAVERICK)))
+ 	    {
+ 	      low_n = n & 0x0f;
+ 	      n &= ~0x0f;
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-cirrus-reorg5.patch new file +313 -0

313 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-floatsi-no-scratch.patch new file +35 -0
new file mode 100644
index 0000000..d5eaa89
@@ -0,0 +1,35 @@
+When converting from 32-bit integers (in ARM registers) to single and double
+precision floating points (in Maverick registers), transfer the 32-bit value
+straight to the destination register and convert it in place there,
+instead of pointlessly using an extra Maverick register.
+
+    Martin Guy <[email protected]> 15 Nov 2008
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old	2008-11-15 18:17:52.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md	2008-11-15 18:24:41.000000000 +0000
+@@ -300,10 +300,9 @@
+ ;; Convert Cirrus-SI to Cirrus-SF
+ (define_insn "cirrus_floatsisf2"
+   [(set (match_operand:SF           0 "cirrus_fp_register" "=v")
+- 	(float:SF (match_operand:SI 1 "s_register_operand"  "r")))
++ 	(float:SF (match_operand:SI 1 "s_register_operand"  "r")))]
+-   (clobber (match_scratch:DF 2 "=v"))]
+   "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+-  "cfmv64lr%?\\t%Z2, %1\;cfcvt32s%?\\t%V0, %Y2"
++  "cfmv64lr%?\\t%Z0, %1\;cfcvt32s%?\\t%V0, %Y0"
+   [(set_attr "length" "8")
+    (set_attr "cirrus" "move")]
+ )
+@@ -310,10 +309,9 @@
+ 
+ (define_insn "cirrus_floatsidf2"
+   [(set (match_operand:DF           0 "cirrus_fp_register" "=v")
+-	(float:DF (match_operand:SI 1 "s_register_operand" "r")))
++	(float:DF (match_operand:SI 1 "s_register_operand" "r")))]
+-   (clobber (match_scratch:DF 2 "=v"))]
+   "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+-  "cfmv64lr%?\\t%Z2, %1\;cfcvt32d%?\\t%V0, %Y2"
++  "cfmv64lr%?\\t%Z0, %1\;cfcvt32d%?\\t%V0, %Y0"
+   [(set_attr "length" "8")
+    (set_attr "cirrus" "move")]
+ )
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fp_consts.patch new file +15 -0
new file mode 100644
index 0000000..0bc886b
@@ -0,0 +1,15 @@
+Maverick does not have immediate FP constants.
+
+--- gcc-4.3.2/gcc/config/arm/arm.c-original	2007-06-12 16:17:14.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/arm.c	2007-06-12 16:17:28.000000000 +1000
+@@ -5699,7 +5699,9 @@
+   int i;
+   REAL_VALUE_TYPE r;
+ 
++  if (TARGET_MAVERICK)
++    fp_consts_inited = 0;
+-  if (TARGET_VFP)
++  else if (TARGET_VFP)
+     fp_consts_inited = 1;
+   else
+     fp_consts_inited = 8;
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-mieee.patch new file +267 -0

267 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-movsf-movdf-Uy.patch new file +65 -0

65 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-enable.patch new file +31 -0
new file mode 100644
index 0000000..d675407
@@ -0,0 +1,31 @@
+In arm.md, enable expansion for neg[sd]f for Maverick - the instructions are
+already already defined in cirrus.md
+
+Without this patch for some reason it still manages to produce cfnegd
+instructions but not cfnegs, presumably via some optimization path.
+
+    Martin Guy <[email protected]> December 2008
+
+--- gcc-4.3.2/gcc/config/arm/arm.md.old	2008-12-03 15:22:43.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md	2008-12-03 15:29:38.000000000 +0000
+@@ -3366,14 +3366,18 @@
+ (define_expand "negsf2"
+   [(set (match_operand:SF         0 "s_register_operand" "")
+ 	(neg:SF (match_operand:SF 1 "s_register_operand" "")))]
+-  "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++  "TARGET_32BIT && TARGET_HARD_FLOAT
++   && (TARGET_FPA || TARGET_VFP
++       || (TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS(SFmode))"
+   ""
+ )
+ 
+ (define_expand "negdf2"
+   [(set (match_operand:DF         0 "s_register_operand" "")
+ 	(neg:DF (match_operand:DF 1 "s_register_operand" "")))]
+-  "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++  "TARGET_32BIT && TARGET_HARD_FLOAT
++   && (TARGET_FPA || TARGET_VFP
++       || (TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS(DFmode))"
+   "")
+ 
+ ;; abssi2 doesn't really clobber the condition codes if a different register
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-protect.patch new file +33 -0
new file mode 100644
index 0000000..63d3090
@@ -0,0 +1,33 @@
+The Crunch cfnegs and cfnegd instructions have a hardware bug in all silicon
+revisions (D0 to E2) whereby neg(0) returns 0 (not -0). See erratum 12.
+
+For ieee-correctness, and to pass another case in GCC's IEEE testsuite,
+we disable the instruction and do it in software unless
+-funsafe-math-optimizations (included in -ffast-math) is given.
+
+    Martin Guy <[email protected]>, September 2008
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md-original	2007-06-12 17:01:24.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md	2007-06-12 17:03:26.000000000 +1000
+@@ -254,18 +254,19 @@
+   [(set_attr "cirrus" "normal")]
+ )
+ 
++; Cirrus hardware bug: neg 0 -> 0 instead of -0
+ (define_insn "*cirrus_negsf2"
+   [(set (match_operand:SF         0 "cirrus_fp_register" "=v")
+ 	(neg:SF (match_operand:SF 1 "cirrus_fp_register"  "v")))]
+-  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS (SFmode)"
+   "cfnegs%?\\t%V0, %V1"
+   [(set_attr "cirrus" "normal")]
+ )
+ 
+ (define_insn "*cirrus_negdf2"
+   [(set (match_operand:DF         0 "cirrus_fp_register" "=v")
+ 	(neg:DF (match_operand:DF 1 "cirrus_fp_register"  "v")))]
+-  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS (DFmode)"
+   "cfnegd%?\\t%V0, %V1"
+   [(set_attr "cirrus" "normal")]
+ )
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-pipeline.patch new file +461 -0

461 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-readme.patch new file +107 -0

107 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-repair-truncxfsi.patch new file +29 -0
new file mode 100644
index 0000000..b15ad24
@@ -0,0 +1,29 @@
+Fix two bugs in the Maverick trunc[sd]fsi expansions:
+- the target of cirrus_truncsfsi2 is an ARM register, not a Maverick register.
+- a typo in both descriptions transfers info for operand 0 into operand 1
+
+    Martin Guy <martinwguy"yahoo.it> 15 Nov 2008
+
+--- gcc-4.3.2/gcc/config/arm/arm.md.old	2008-11-09 19:13:54.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md	2008-11-15 18:11:08.000000000 +0000
+@@ -3574,10 +3574,8 @@
+   "
+   if (TARGET_MAVERICK)
+     {
+-      if (!cirrus_fp_register (operands[0], SImode))
+-        operands[0] = force_reg (SImode, operands[0]);
+       if (!cirrus_fp_register (operands[1], SFmode))
+-        operands[1] = force_reg (SFmode, operands[0]);
++        operands[1] = force_reg (SFmode, operands[1]);
+       emit_insn (gen_cirrus_truncsfsi2 (operands[0], operands[1]));
+       DONE;
+     }
+@@ -3591,7 +3589,7 @@
+   if (TARGET_MAVERICK)
+     {
+       if (!cirrus_fp_register (operands[1], DFmode))
+-        operands[1] = force_reg (DFmode, operands[0]);
++        operands[1] = force_reg (DFmode, operands[1]);
+       emit_insn (gen_cirrus_truncdfsi2 (operands[0], operands[1]));
+       DONE;
+     }
recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-saveregs.patch new file +88 -0

88 lines not on this page · raw message

recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-scratch.patch new file +27 -0
new file mode 100644
index 0000000..fa3dc80
@@ -0,0 +1,27 @@
+Increase the number of Cirrus scratch registers from 4 to 8 (ie half of them)
+
+--- gcc-4.3.2/gcc/config/arm/arm.h.old	2008-09-26 16:01:45.000000000 +0100
++++ gcc-4.3.2/gcc/config/arm/arm.h	2008-09-28 11:20:19.000000000 +0100
+@@ -626,8 +626,8 @@
+ 
+ /*
+   	mvf0		Cirrus floating point result
+-	mvf1-mvf3	Cirrus floating point scratch
+-	mvf4-mvf15   S	Cirrus floating point variable.  */
++	mvf1-mvf7	Cirrus floating point scratch
++	mvf8-mvf15   S	Cirrus floating point variable.  */
+ 
+ /*	s0-s15		VFP scratch (aka d0-d7).
+ 	s16-s31	      S	VFP variable (aka d8-d15).
+diff -urN gcc-4.3.0/gcc/config/arm/arm.h gcc-4.3.0/gcc/config/arm/arm.h
+--- gcc-4.3.2/gcc/config/arm/arm.h	2008-04-07 12:17:46.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/arm.h	2008-04-07 12:18:10.000000000 +1000
+@@ -753,7 +752,7 @@
+ 	       regno <= LAST_CIRRUS_FP_REGNUM; ++ regno)	\
+ 	    {							\
+ 	      fixed_regs[regno] = 0;				\
+-	      call_used_regs[regno] = regno < FIRST_CIRRUS_FP_REGNUM + 4; \
++	      call_used_regs[regno] = regno < FIRST_CIRRUS_FP_REGNUM + 8; \
+ 	    }							\
+ 	}							\
+       if (TARGET_VFP)						\
recipes/gcc/gcc-4.3.3/ep93xx/arm-prologue_use-length.patch new file +10 -0
new file mode 100644
index 0000000..d08b4fc
@@ -0,0 +1,10 @@
+--- gcc-4.3.2/gcc/config/arm/arm.md.old	2008-12-09 10:23:57.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md	2009-03-10 12:14:01.000000000 +0000
+@@ -11110,6 +11110,7 @@
+   [(unspec:SI [(match_operand:SI 0 "register_operand" "")] UNSPEC_PROLOGUE_USE)]
+   ""
+   "%@ %0 needed for prologue"
++  [(set_attr "length" "0")]
+ )
+ 
+ 
recipes/gcc/gcc-4.3.3/ep93xx/arm-size-bugfix.patch new file +33 -0
new file mode 100644
index 0000000..c3f3f3d
@@ -0,0 +1,33 @@
+Fix an obvious bug in GCC-4.3.2's ARM code generator.
+
+PR target/37668
+ * arm.c (arm_size_rtx_costs, case NEG): Don't fall through if the
+   result will be in an FPU register.
+
+This has been applied in gcc-4.4.0
+
+   Martin Guy <[email protected]>
+
+*** gcc-4.3.2/gcc/config/arm/arm.c	(revision 142660)
+--- gcc-4.3.2/gcc/config/arm/arm.c	(local)
+*************** arm_size_rtx_costs (rtx x, int code, int
+*** 5201,5207 ****
+  
+      case NEG:
+        if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT)
+! 	*total = COSTS_N_INSNS (1);
+        /* Fall through */
+      case NOT:
+        *total = COSTS_N_INSNS (ARM_NUM_REGS (mode));
+--- 5201,5211 ----
+  
+      case NEG:
+        if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT)
+! 	{
+! 	  *total = COSTS_N_INSNS (1);
+! 	  return false;
+! 	}
+! 
+        /* Fall through */
+      case NOT:
+        *total = COSTS_N_INSNS (ARM_NUM_REGS (mode));
recipes/gcc/gcc-4.3.3/ep93xx/series new file +25 -0
new file mode 100644
index 0000000..e6bfe42
@@ -0,0 +1,25 @@
+arm-crunch-readme.patch
+arm-crunch-saveregs.patch
+arm-crunch-scratch.patch
+arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch
+arm-crunch-eabi-mvf0-scratch-ieee754.patch
+arm-crunch-20000320.patch
+arm-crunch-disable-cmpdi.patch
+arm-crunch-fix-64bit-const-offsets.patch
+arm-crunch-fp_consts.patch
+arm-crunch-neg-enable.patch
+arm-crunch-neg-protect.patch
+arm-crunch-repair-truncxfsi.patch
+arm-crunch-floatsi-no-scratch.patch
+arm-crunch-movsf-movdf-Uy.patch
+arm-crunch-drop-thumb2.patch
+arm-crunch-arm_dbx_register_number.patch
+arm-crunch-pipeline.patch
+arm-crunch-ccmav-mode.patch
+arm-crunch-cfcpy-with-cfsh64.patch 
+arm-crunch-mieee.patch 
+arm-size-bugfix.patch
+arm-prologue_use-length.patch
+arm-crunch-cftruncd32-attr.patch
+arm-crunch-fix-cirrus-reorg5.patch
+arm-crunch-cirrus-di-flag.patch
Signature · 1 line
1.6.3.1
#2 lore raw

PATCH 2/13 ep93xx: use Maverick FP

In reply to Marcin Juszkiewicz

From: Marcin Juszkiewicz <[email protected]>

---
 conf/machine/ep93xx.conf |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
conf/machine/ep93xx.conf +2 -2
index 268ed52..11bae2f 100644
@@ -23,7 +23,7 @@ EXTRA_IMAGECMD_jffs2 = "--eraseblock=0x40000 --pad=0x500000 "
 
 #tune for ep93xx cpus
 #can be used for crunch support later on
-#require conf/machine/include/tune-ep9312.inc
+require conf/machine/include/tune-ep9312.inc
 
 
-require conf/machine/include/tune-arm920t.inc
+#require conf/machine/include/tune-arm920t.inc
Signature · 1 line
1.6.3.1
#3 lore raw

PATCH 3/13 tune-ep9312: use flags from Martin W. Guy work

In reply to Marcin Juszkiewicz

From: Marcin Juszkiewicz <[email protected]>

---
 conf/machine/include/tune-ep9312.inc |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
conf/machine/include/tune-ep9312.inc +2 -3
index cf3de9c..fd9c1cc 100644
@@ -1,8 +1,7 @@
-TARGET_CC_ARCH = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312"
-# add "-mfp=maverick" for newer gcc versions > 4.0
+TARGET_CC_ARCH = "-mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp -fno-signed-zeros -O"
 
 #set arch to ep9312 for all generated packages
-PACKAGE_EXTRA_ARCHS += "armv4 armv4t ep9312"
+PACKAGE_EXTRA_ARCHS += "armv4 armv4t ep93xx"
 BASE_PACKAGE_ARCH = "ep9312"
 FEED_ARCH = "ep9312"
 
Signature · 1 line
1.6.3.1
#4 lore raw

PATCH 5/13 angstrom: no binary locales for ep93xx

In reply to Marcin Juszkiewicz

From: Marcin Juszkiewicz <[email protected]>

---
 conf/distro/include/angstrom.inc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
conf/distro/include/angstrom.inc +3 -0
index 2655bfe..a91efe4 100644
@@ -99,6 +99,9 @@ ENABLE_BINARY_LOCALE_GENERATION ?= "1"
 # We only want to build UTF8 locales
 LOCALE_UTF8_ONLY = "1"
 
+#qemu doesn't like this fp
+ENABLE_BINARY_LOCALE_GENERATION_ep93xx = "0"
+
 #qemu has taken a dislike to armeb as well
 ENABLE_BINARY_LOCALE_GENERATION_armeb = "0"
 
Signature · 1 line
1.6.3.1
#5 lore raw

PATCH 6/13 tune-ep9312: ep9312 can run armv4t binaries

In reply to Marcin Juszkiewicz

From: Marcin Juszkiewicz <[email protected]>

---
 conf/machine/include/tune-ep9312.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
conf/machine/include/tune-ep9312.inc +1 -1
index fd9c1cc..3f89b67 100644
@@ -1,7 +1,7 @@
 TARGET_CC_ARCH = "-mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp -fno-signed-zeros -O"
 
 #set arch to ep9312 for all generated packages
-PACKAGE_EXTRA_ARCHS += "armv4 armv4t ep93xx"
+PACKAGE_EXTRA_ARCHS += "armv4t"
 BASE_PACKAGE_ARCH = "ep9312"
 FEED_ARCH = "ep9312"
 
Signature · 1 line
1.6.3.1
#6 lore raw

PATCH 7/13 tune-ep3912: optimize with -O not -O2

In reply to Marcin Juszkiewicz

From: Marcin Juszkiewicz <[email protected]>

---
 conf/machine/include/tune-ep9312.inc |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
conf/machine/include/tune-ep9312.inc +6 -2
index 3f89b67..c8770e0 100644
@@ -1,10 +1,14 @@
-TARGET_CC_ARCH = "-mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp -fno-signed-zeros -O"
+TARGET_CC_ARCH = "-mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp"
 
 #set arch to ep9312 for all generated packages
-PACKAGE_EXTRA_ARCHS += "armv4t"
+PACKAGE_EXTRA_ARCHS += "armv4t ep9312"
 BASE_PACKAGE_ARCH = "ep9312"
 FEED_ARCH = "ep9312"
 
 # Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish
 require conf/machine/include/tune-thumb.inc
 
+FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O -fno-signed-zeros"
+DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g"
+SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"
+BUILD_OPTIMIZATION = "-O"
Signature · 1 line
1.6.3.1
#7 lore raw
In reply to Marcin Juszkiewicz

Dnia poniedziałek, 1 czerwca 2009 o 16:49:16 Marcin Juszkiewicz napisał(a):

Quoted 1 line

Patches are a bit ugly maybe

Sorry for mess - numbering is broken - there are only those 6 patches.

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
#8 lore raw
In reply to Marcin Juszkiewicz
Quoted 4 lines · Marcin Juszkiewicz

Hi

This patchset is taken from http://martinwguy.co.uk/martin/crunch/

Quoted 8 lines

It is enabled by default for ep93xx devices as EDB9301 boots into rootfs built with this toolchain without problems. Running "openssl speed" works but end table with results contains broken calculations.

Binary locales do not work as QEMU do not handle ep93xx cpu.

Patches are a bit ugly maybe (in conf/machine/include/*) but I want to show it finally to people before it rust.

maverick *is* ugly :) The patches look OK, so feel free to add my Acked-by to all of them.

regards,

Koen

#9 lore raw
Quoted 9 lines · Koen Kooi
Quoted 8 lines · Marcin Juszkiewicz

Hi

This patchset is taken from http://martinwguy.co.uk/martin/crunch/

It is enabled by default for ep93xx devices as EDB9301 boots into rootfs built with this toolchain without problems. Running "openssl speed" works but end table with results contains broken calculations.

Quoted 7 lines
Quoted 4 lines

Binary locales do not work as QEMU do not handle ep93xx cpu.

Patches are a bit ugly maybe (in conf/machine/include/*) but I want to show it finally to people before it rust.

maverick *is* ugly :) The patches look OK, so feel free to add my Acked-by to all of them.

Mine too.

Signature · 1 line
Tom Rini
#10 lore raw

PATCH 1/4 binutils: added Maverick support (done by Hasjim Williams)

In reply to Marcin Juszkiewicz
---
 recipes/binutils/binutils_2.18.bb            |    5 +-
 recipes/binutils/files/binutils-crunch.patch |  163 ++++++++++++++++++++++++++
 2 files changed, 167 insertions(+), 1 deletions(-)
 create mode 100644 recipes/binutils/files/binutils-crunch.patch
recipes/binutils/binutils_2.18.bb +4 -1
index 0155fb1..3b650c6 100644
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
 
 require binutils.inc
 LICENSE = "GPLv3"
@@ -18,3 +18,6 @@ SRC_URI = "\
 
 # powerpc patches
 SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
+
+# ep93xx crunch patches
+SRC_URI_append_ep9312 = " file://binutils-crunch.patch;patch=1"
recipes/binutils/files/binutils-crunch.patch new file +163 -0

163 lines not on this page · raw message

Signature · 1 line
1.6.3.1
#11 lore raw

Next set of EP93xx patches

In reply to Marcin Juszkiewicz

Here I am with another set of patches to make EP93xx cpus working better in OpenEmbedded.

This time I merged glibc 2.6.1 and binutils 2.18 patches done by Hasjim Williams and changed a bit Ångström configs for building with Maverick tuning enabled.

After rebuilding whole rootfs I got system which works and even gives proper output from 'openssl speed md5' command.

#12 lore raw

Re: Next set of EP93xx patches

Quoted 9 lines · Marcin Juszkiewicz

Here I am with another set of patches to make EP93xx cpus working better in OpenEmbedded.

This time I merged glibc 2.6.1 and binutils 2.18 patches done by Hasjim Williams and changed a bit Ångström configs for building with Maverick tuning enabled.

After rebuilding whole rootfs I got system which works and even gives proper output from 'openssl speed md5' command.

You can add my acked-by to all 4 patches.

regards,

Koen

#13 lore raw

PATCH 2/4 glibc: added Maverick support (done by Hasjim Williams)

In reply to Marcin Juszkiewicz
---
 .../glibc/glibc-2.4/glibc-crunch-eabi-force.patch  |  133 ++++++
 .../glibc-2.4/glibc-crunch-eabi-fraiseexcpt.patch  |   88 ++++
 .../glibc-crunch-eabi-setjmp_longjmp.patch         |  112 +++++
 .../glibc/glibc-2.4/glibc-crunch-eabi-unwind.patch |   12 +
 recipes/glibc/glibc-2.4/glibc-crunch-eabi.patch    |  461 ++++++++++++++++++++
 .../glibc-crunch-endian-bigword-littlebyte.patch   |   40 ++
 ...glibc-crunch-endian-littleword-littlebyte.patch |   40 ++
 recipes/glibc/glibc-2.4/glibc-crunch-oabi.patch    |  310 +++++++++++++
 recipes/glibc/glibc-2.4/glibc-crunch-oabi2.patch   |   18 +
 recipes/glibc/glibc_2.6.1.bb                       |   11 +-
 10 files changed, 1223 insertions(+), 2 deletions(-)
 create mode 100644 recipes/glibc/glibc-2.4/glibc-crunch-eabi-force.patch
 create mode 100644 recipes/glibc/glibc-2.4/glibc-crunch-eabi-fraiseexcpt.patch
 create mode 100644 recipes/glibc/glibc-2.4/glibc-crunch-eabi-setjmp_longjmp.patch
 create mode 100644 recipes/glibc/glibc-2.4/glibc-crunch-eabi-unwind.patch
 create mode 100644 recipes/glibc/glibc-2.4/glibc-crunch-eabi.patch
 create mode 100644 recipes/glibc/glibc-2.4/glibc-crunch-endian-bigword-littlebyte.patch
 create mode 100644 recipes/glibc/glibc-2.4/glibc-crunch-endian-littleword-littlebyte.patch
 create mode 100644 recipes/glibc/glibc-2.4/glibc-crunch-oabi.patch
 create mode 100644 recipes/glibc/glibc-2.4/glibc-crunch-oabi2.patch
recipes/glibc/glibc-2.4/glibc-crunch-eabi-force.patch new file +133 -0
new file mode 100644
index 0000000..b509b13
@@ -0,0 +1,133 @@
+diff -urN glibc-2.6.1/ports/sysdeps/arm/eabi/bits/fenv.h glibc-2.6.1/ports/sysdeps/arm/eabi/bits/fenv.h
+--- glibc-2.6.1/ports/sysdeps/arm/eabi/bits/fenv.h	2008-04-04 18:32:58.000000000 +1000
++++ glibc-2.6.1/ports/sysdeps/arm/eabi/bits/fenv.h	2008-04-07 10:40:28.000000000 +1000
+@@ -20,6 +20,8 @@
+ # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+ #endif
+ 
++#if 0
++
+ /* Define bits representing exceptions in the VFP FPU status word.  */
+ enum
+   {
+@@ -55,37 +57,50 @@
+ #define FE_TOWARDZERO FE_TOWARDZERO
+   };
+ 
++#endif
++
+ /* Define bits representing exceptions in the CRUNCH FPU status word.  */
+ enum
+   {
+     FE_CRUNCH_INVALID = (1),
+ #define FE_CRUNCH_INVALID FE_CRUNCH_INVALID
++#define FE_INVALID FE_CRUNCH_INVALID
++#define FE_DIVBYZERO 0
+     FE_CRUNCH_OVERFLOW = (4),
+ #define FE_CRUNCH_OVERFLOW FE_CRUNCH_OVERFLOW
++#define FE_OVERFLOW FE_CRUNCH_OVERFLOW
+     FE_CRUNCH_UNDERFLOW = (8),
+ #define FE_CRUNCH_UNDERFLOW FE_CRUNCH_UNDERFLOW
++#define FE_UNDERFLOW FE_CRUNCH_UNDERFLOW
+     FE_CRUNCH_INEXACT = (16),
+ #define FE_CRUNCH_INEXACT FE_CRUNCH_INEXACT
++#define FE_INEXACT FE_CRUNCH_INEXACT
+   };
+ 
+ /* Amount to shift by to convert an exception to a mask bit.  */
+ #define FE_CRUNCH_EXCEPT_SHIFT	5
++#define FE_EXCEPT_SHIFT FE_CRUNCH_EXCEPT_SHIFT
+ 
+ /* All supported exceptions, except DIVBYZERO.  */
+ #define FE_CRUNCH_ALL_EXCEPT	\
+ 	(FE_CRUNCH_INVALID | FE_CRUNCH_OVERFLOW | FE_CRUNCH_UNDERFLOW | FE_CRUNCH_INEXACT)
++#define FE_ALL_EXCEPT FE_CRUNCH_ALL_EXCEPT
+ 
+ /* CRUNCH supports all of the four defined rounding modes.  */
+ enum
+   {
+     FE_CRUNCH_TONEAREST = 0,
+ #define FE_CRUNCH_TONEAREST FE_CRUNCH_TONEAREST
++#define FE_TONEAREST FE_CRUNCH_TONEAREST
+     FE_CRUNCH_TOWARDZERO = 0x400,
+ #define FE_CRUNCH_TOWARDZERO FE_CRUNCH_TOWARDZERO
++#define FE_TOWARDZERO FE_CRUNCH_TOWARDZERO
+     FE_CRUNCH_DOWNWARD = 0x800,
+ #define FE_CRUNCH_DOWNWARD FE_CRUNCH_DOWNWARD
++#define FE_DOWNWARD FE_CRUNCH_DOWNWARD
+     FE_CRUNCH_UPWARD = 0xc00
+ #define FE_CRUNCH_UPWARD FE_CRUNCH_UPWARD
++#define FE_UPWARD FE_CRUNCH_UPWARD
+   };
+ 
+ 
+diff -urN glibc-2.6.1/ports/sysdeps/arm/eabi/fpu_control.h glibc-2.6.1/ports/sysdeps/arm/eabi/fpu_control.h
+--- glibc-2.6.1/ports/sysdeps/arm/eabi/fpu_control.h	2008-04-04 18:32:58.000000000 +1000
++++ glibc-2.6.1/ports/sysdeps/arm/eabi/fpu_control.h	2008-04-07 11:02:13.000000000 +1000
+@@ -20,6 +20,8 @@
+ #ifndef _FPU_CONTROL_H
+ #define _FPU_CONTROL_H
+ 
++#if 0
++
+ /* masking of interrupts */
+ #define _FPU_MASK_IM	0x00000100	/* invalid operation */
+ #define _FPU_MASK_ZM	0x00000200	/* divide by zero */
+@@ -45,6 +47,11 @@
+ #define _FPU_SETCW(cw) \
+   __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw))
+ 
++#endif
++
+ /* CRUNCH SECTION */
+
++/* Type of the control word.  */
++typedef unsigned int fpu_control_t;
++ 
+ /* DSPSC register: (from EP9312 User's Guide)
+@@ -69,19 +73,27 @@
+ 
+ /* masking of interrupts */
+ #define _FPU_CRUNCH_MASK_IM	(1 << 5)	/* invalid operation */
++#define _FPU_MASK_IM _FPU_CRUNCH_MASK_IM
+ #define _FPU_CRUNCH_MASK_ZM	0       	/* divide by zero */ 
++#define _FPU_MASK_ZM _FPU_CRUNCH_MASK_ZM
+ #define _FPU_CRUNCH_MASK_OM	(1 << 7)    /* overflow */
++#define _FPU_MASK_OM _FPU_CRUNCH_MASK_OM
+ #define _FPU_CRUNCH_MASK_UM    (1 << 8)	/* underflow */
++#define _FPU_MASK_UM _FPU_CRUNCH_MASK_UM
+ #define _FPU_CRUNCH_MASK_PM	(1 << 9)	/* inexact */
++#define _FPU_MASK_PM _FPU_CRUNCH_MASK_PM
+ #define _FPU_CRUNCH_MASK_DM    0           /* denormalized operation */
++#undef _FPU_MASK_DM
+ 
+ /* Some bits in the FPSCR are not yet defined.  They must be preserved when
+    modifying the contents.  */
+ #define _FPU_CRUNCH_RESERVED	0x03000042
++#define _FPU_RESERVED _FPU_CRUNCH_RESERVED
+ #define _FPU_CRUNCH_DEFAULT    0x00b00000
++#define _FPU_DEFAULT _FPU_CRUNCH_DEFAULT
+ /* Default + exceptions enabled. */
+ #define _FPU_CRUNCH_IEEE	(_FPU_CRUNCH_DEFAULT | 0x000003a0)
+-
++#define _FPU_IEEE _FPU_CRUNCH_IEEE
+ 
+ /* Macros for accessing the hardware control word.  */
+ /*	cfmvr64l	%1, mvdx0    */
+@@ -103,6 +115,7 @@
+ 	: "=r" (cw), "=r" (__t1), "=r" (__t2)	\
+ 	);					\
+ })
++#define _FPU_GETCW(cw) _FPU_CRUNCH_GETCW(cw)
+ 
+ /* cfmvr64l	%1, mvdx0    */
+ /* cfmvr64h	%2, mvdx0    */
+@@ -123,7 +136,7 @@
+ 	: "=r" (__t1), "=r" (__t2) : "r" (cw)	\
+ 	);					\
+ })
+-
++#define _FPU_SETCW(cw) _FPU_CRUNCH_SETCW(cw)
+ 
+ /* Default control word set at startup.  */
+ extern fpu_control_t __fpu_control;
recipes/glibc/glibc-2.4/glibc-crunch-eabi-fraiseexcpt.patch new file +88 -0

88 lines not on this page · raw message

recipes/glibc/glibc-2.4/glibc-crunch-eabi-setjmp_longjmp.patch new file +112 -0

112 lines not on this page · raw message

recipes/glibc/glibc-2.4/glibc-crunch-eabi-unwind.patch new file +12 -0
new file mode 100644
index 0000000..d91d4fd
@@ -0,0 +1,12 @@
+--- glibc-2.7/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h	2008-04-04 15:57:19.000000000 +1000
++++ glibc-2.7/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h	2008-04-04 16:00:41.000000000 +1000
+@@ -138,7 +138,8 @@
+       _UVRSC_VFP = 1,       /* vfp */
+       _UVRSC_FPA = 2,       /* fpa */
+       _UVRSC_WMMXD = 3,     /* Intel WMMX data register */
+-      _UVRSC_WMMXC = 4      /* Intel WMMX control register */
++      _UVRSC_WMMXC = 4,     /* Intel WMMX control register */
++      _UVRSC_CRUNCH = 5     /* Maverick crunch register */
+     }
+   _Unwind_VRS_RegClass;
+ 
recipes/glibc/glibc-2.4/glibc-crunch-eabi.patch new file +461 -0

461 lines not on this page · raw message

recipes/glibc/glibc-2.4/glibc-crunch-endian-bigword-littlebyte.patch new file +40 -0
new file mode 100644
index 0000000..e181e97
@@ -0,0 +1,40 @@
+diff -urN glibc-2.5/ports/sysdeps/arm/bits/endian.h glibc-2.5/ports/sysdeps/arm/bits/endian.h
+--- glibc-2.5/ports/sysdeps/arm/bits/endian.h	2005-06-13 20:11:47.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/bits/endian.h	2007-05-18 08:41:52.000000000 +1000
+@@ -15,5 +15,9 @@
+ #ifdef __VFP_FP__
+ #define __FLOAT_WORD_ORDER __BYTE_ORDER
+ #else
++#ifdef __MAVERICK__
++#define __FLOAT_WORD_ORDER __BIG_ENDIAN
++#else
+ #define __FLOAT_WORD_ORDER __BIG_ENDIAN
+ #endif
++#endif
+diff -urN glibc-2.5/ports/sysdeps/arm/gccframe.h glibc-2.5/ports/sysdeps/arm/gccframe.h
+--- glibc-2.5/ports/sysdeps/arm/gccframe.h	2001-11-16 11:07:20.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/gccframe.h	2007-05-18 08:53:38.000000000 +1000
+@@ -17,6 +17,10 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
++#ifdef __MAVERICK__
++#define FIRST_PSEUDO_REGISTER 43
++#else
+ #define FIRST_PSEUDO_REGISTER 27
++#endif
+ 
+ #include <sysdeps/generic/gccframe.h>
+diff -urN glibc-2.5/ports/sysdeps/arm/gmp-mparam.h glibc-2.5/ports/sysdeps/arm/gmp-mparam.h
+--- glibc-2.5/ports/sysdeps/arm/gmp-mparam.h	2005-06-13 20:11:47.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/gmp-mparam.h	2007-05-18 08:54:21.000000000 +1000
+@@ -29,6 +29,9 @@
+ #if defined(__ARMEB__)
+ # define IEEE_DOUBLE_MIXED_ENDIAN 0
+ # define IEEE_DOUBLE_BIG_ENDIAN 1
++#elif defined(__MAVERICK__)
++#define IEEE_DOUBLE_MIXED_ENDIAN 0
++#define IEEE_DOUBLE_BIG_ENDIAN 1
+ #elif defined(__VFP_FP__)
+ # define IEEE_DOUBLE_MIXED_ENDIAN 0
+ # define IEEE_DOUBLE_BIG_ENDIAN 0
recipes/glibc/glibc-2.4/glibc-crunch-endian-littleword-littlebyte.patch new file +40 -0
new file mode 100644
index 0000000..e8559d4
@@ -0,0 +1,40 @@
+diff -urN glibc-2.5/ports/sysdeps/arm/bits/endian.h glibc-2.5/ports/sysdeps/arm/bits/endian.h
+--- glibc-2.5/ports/sysdeps/arm/bits/endian.h	2005-06-13 20:11:47.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/bits/endian.h	2007-05-18 08:41:52.000000000 +1000
+@@ -15,5 +15,9 @@
+ #ifdef __VFP_FP__
+ #define __FLOAT_WORD_ORDER __BYTE_ORDER
+ #else
++#ifdef __MAVERICK__
++#define __FLOAT_WORD_ORDER __LITTLE_ENDIAN
++#else
+ #define __FLOAT_WORD_ORDER __BIG_ENDIAN
+ #endif
++#endif
+diff -urN glibc-2.5/ports/sysdeps/arm/gccframe.h glibc-2.5/ports/sysdeps/arm/gccframe.h
+--- glibc-2.5/ports/sysdeps/arm/gccframe.h	2001-11-16 11:07:20.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/gccframe.h	2007-05-18 08:53:38.000000000 +1000
+@@ -17,6 +17,10 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
++#ifdef __MAVERICK__
++#define FIRST_PSEUDO_REGISTER 43
++#else
+ #define FIRST_PSEUDO_REGISTER 27
++#endif
+ 
+ #include <sysdeps/generic/gccframe.h>
+diff -urN glibc-2.5/ports/sysdeps/arm/gmp-mparam.h glibc-2.5/ports/sysdeps/arm/gmp-mparam.h
+--- glibc-2.5/ports/sysdeps/arm/gmp-mparam.h	2005-06-13 20:11:47.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/gmp-mparam.h	2007-05-18 08:54:21.000000000 +1000
+@@ -29,6 +29,9 @@
+ #if defined(__ARMEB__)
+ # define IEEE_DOUBLE_MIXED_ENDIAN 0
+ # define IEEE_DOUBLE_BIG_ENDIAN 1
++#elif defined(__MAVERICK__)
++#define IEEE_DOUBLE_MIXED_ENDIAN 0
++#define IEEE_DOUBLE_BIG_ENDIAN 0
+ #elif defined(__VFP_FP__)
+ # define IEEE_DOUBLE_MIXED_ENDIAN 0
+ # define IEEE_DOUBLE_BIG_ENDIAN 0
recipes/glibc/glibc-2.4/glibc-crunch-oabi.patch new file +310 -0

310 lines not on this page · raw message

recipes/glibc/glibc-2.4/glibc-crunch-oabi2.patch new file +18 -0
new file mode 100644
index 0000000..fe5a050
@@ -0,0 +1,18 @@
+--- glibc-2.5/ports/sysdeps/arm/sysdep.h	2007-07-02 13:05:53.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/sysdep.h	2007-07-02 13:06:26.000000000 +1000
+@@ -51,6 +51,7 @@
+ 
+ #endif
+ 
++#if 0 // ndef __MAVERICK__
+ /* APCS-32 doesn't preserve the condition codes across function call. */
+ #ifdef __APCS_32__
+ #define LOADREGS(cond, base, reglist...)\
+@@ -74,6 +75,7 @@
+ #define DO_RET(_reg)		\
+ 	movs pc, _reg
+ #endif
++#endif
+ 
+ /* Define an entry point visible from C.  */
+ #define	ENTRY(name)							      \
recipes/glibc/glibc_2.6.1.bb +9 -2
index 949708f..0a8708c 100644
@@ -1,5 +1,5 @@
 require glibc.inc
-PR = "r16"
+PR = "r17"
 
 PACKAGES_DYNAMIC = "libc6*"
 RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
@@ -60,7 +60,14 @@ SRC_URI = "\
   file://march-i686.patch;patch=1;pnum=0 \
 "
 
-#  file://ldsocache-varrun.patch;patch=1 \
+SRC_URI_append_ep9312 = "\
+  file://glibc-crunch-endian-littleword-littlebyte.patch;patch=1 \
+  file://glibc-crunch-eabi-setjmp_longjmp.patch;patch=1 \
+  file://glibc-crunch-eabi-unwind.patch;patch=1 \
+  file://glibc-crunch-eabi.patch;patch=1 \
+  file://glibc-crunch-eabi-force.patch;patch=1 \
+  file://glibc-crunch-eabi-fraiseexcpt.patch;patch=1 \
+"
 
 # Build fails on sh3 and sh4 without additional patches
 SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
Signature · 1 line
1.6.3.1
#14 lore raw

PATCH 3/4 angstrom: disable binary locales for ep9312 (tuning) instead of ep93xx (machine)

In reply to Marcin Juszkiewicz

ep93xx can be built for armv4t which supports binary locales

---
 conf/distro/include/angstrom.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
conf/distro/include/angstrom.inc +2 -2
index a91efe4..9d4668b 100644
@@ -54,7 +54,7 @@ THUMB_INTERWORK = "yes"
 #Use this variable in feeds and other parts that need a URI
 ANGSTROM_URI ?= "http://www.angstrom-distribution.org"
 
-#Use this variable to select which recipe you want to use to get feed configs (/etc/ipkg/*, /etc/apt/sources.list)
+#Use this variable to select which recipe you want to use to get feed configs (/etc/ipkg/, /etc/apt/sources.list)
 # usefull for derivative distros and local testing
 # As this is runtime we can't and won't use virtual/feed-configs
 ANGSTROM_FEED_CONFIGS ?= "angstrom-feed-configs"
@@ -100,7 +100,7 @@ ENABLE_BINARY_LOCALE_GENERATION ?= "1"
 LOCALE_UTF8_ONLY = "1"
 
 #qemu doesn't like this fp
-ENABLE_BINARY_LOCALE_GENERATION_ep93xx = "0"
+ENABLE_BINARY_LOCALE_GENERATION_ep9312 = "0"
 
 #qemu has taken a dislike to armeb as well
 ENABLE_BINARY_LOCALE_GENERATION_armeb = "0"
Signature · 1 line
1.6.3.1
#15 lore raw

PATCH 4/4 angstrom: use -O not -O2 for ep9312 tuning

In reply to Marcin Juszkiewicz
---
 conf/distro/include/angstrom-glibc.inc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
conf/distro/include/angstrom-glibc.inc +2 -0
index 5df77d8..3d189b9 100644
@@ -15,11 +15,13 @@ FULL_OPTIMIZATION = "-fexpensive-optimizations -frename-registers -fomit-frame-p
 FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1"
 FULL_OPTIMIZATION_pn-glibc = "-fexpensive-optimizations -fomit-frame-pointer -O2"
 FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
+FULL_OPTIMIZATION_ep9312 = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O -fno-signed-zeros"
 
 BUILD_OPTIMIZATION = "-O2"
 BUILD_OPTIMIZATION_pn-perl = "-O1"
 BUILD_OPTIMIZATION_pn-glibc = "-O2"
 BUILD_OPTIMIZATION_sparc = "-O2"
+BUILD_OPTIMIZATION_ep9312 = "-O"
 
 TARGET_LINK_HASH_STYLE = "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH',d,1) in ['mips', 'mipsel']]}"
 
Signature · 1 line
1.6.3.1