]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[committed] Fix length computation bug in bfin port
authorJeff Law <jlaw@ventanamicro.com>
Sat, 22 Jul 2023 15:47:21 +0000 (09:47 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sat, 22 Jul 2023 15:51:46 +0000 (09:51 -0600)
The tester seemed to occasionally ping-pong a compilation failure on the
builtin-bitops-1.c test.  I long suspected it was something like length
computations.

I finally got a few minutes to dig into it, and sure enough the blackfin
port was claiming the "ones" operation was 2 bytes when it is in fact 4 bytes.

This fixes the compilation failure for the builtin-bitops-1.c test.   Sadly,
it doesn't fix any of the other failures on the bfin port.

Committed to the trunk.

gcc/
* config/bfin/bfin.md (ones): Fix length computation.

gcc/config/bfin/bfin.md

index 9b5ab0717786a678622be971174bb19762378a91..c6b174dc3bddc20f872151d56e9e3fea922a462b 100644 (file)
         (popcount:SI (match_operand:SI 1 "register_operand" "d"))))]
   ""
   "%h0 = ONES %1;"
-  [(set_attr "type" "alu0")])
+  [(set_attr "type" "alu0")
+   (set_attr "length" "4")])
 
 (define_expand "popcountsi2"
   [(set (match_dup 2)