https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77308

--- Comment #16 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Wow.

look at this:

Index: arm.md
===================================================================
--- arm.md      (revision 241539)
+++ arm.md      (working copy)
@@ -448,7 +448,7 @@
          (plus:DI (match_operand:DI 1 "s_register_operand" "")
                   (match_operand:DI 2 "arm_adddi_operand"  "")))
     (clobber (reg:CC CC_REGNUM))])]
-  "TARGET_EITHER"
+  "TARGET_EITHER && !TARGET_THUMB2"
   "
   if (TARGET_THUMB1)
     {
@@ -2256,7 +2256,7 @@
   [(set (match_operand:DI         0 "s_register_operand" "")
        (and:DI (match_operand:DI 1 "s_register_operand" "")
                (match_operand:DI 2 "neon_inv_logic_op2" "")))]
-  "TARGET_32BIT"
+  "TARGET_32BIT && !TARGET_THUMB2"
   ""
 )

@@ -3310,7 +3310,7 @@
   [(set (match_operand:DI         0 "s_register_operand" "")
        (xor:DI (match_operand:DI 1 "s_register_operand" "")
                (match_operand:DI 2 "arm_xordi_operand" "")))]
-  "TARGET_32BIT"
+  "TARGET_32BIT && !TARGET_THUMB2"
   ""
 )


Thus only disabling adddi3, anddi3, and xordi3,
but not ashldi3 and ashrdi3, because they are not part of the problem.

reduces
arm-linux-gnueabihf-gcc -mthumb -march=armv7 -mfloat-abi=soft -Os -c pr77308.c

frame = 272 (about the same as aarch64 had!)
code  = 0x374C

sha512_block_data_order:
        @ args = 0, pretend = 0, frame = 272
        @ frame_needed = 0, uses_anonymous_args = 0


Maybe I am dreaming, or something is completely wrong now...

Reply via email to