public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix length computation bug in bfin port
@ 2023-07-22 15:53 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2023-07-22 15:53 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

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.

Jeff

[-- Attachment #2: P --]
[-- Type: text/plain, Size: 1227 bytes --]

commit bb095e8a343db043a0cd0b0da9b2ab1186d1a1ed
Author: Jeff Law <jlaw@ventanamicro.com>
Date:   Sat Jul 22 09:47:21 2023 -0600

    [committed] Fix length computation bug in bfin port
    
    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.

diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md
index 9b5ab071778..c6b174dc3bd 100644
--- a/gcc/config/bfin/bfin.md
+++ b/gcc/config/bfin/bfin.md
@@ -1401,7 +1401,8 @@ (define_insn "ones"
 	 (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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-22 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-22 15:53 [committed] Fix length computation bug in bfin port Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).