[gcc r13-8230] sparc: Treat instructions with length 0 as empty

Daniel Hellstrom danielh@gcc.gnu.org
Tue Jan 16 12:05:08 GMT 2024


https://gcc.gnu.org/g:2f89f02ee9a27a8e3fab1a2bca356450e56c7bae

commit r13-8230-g2f89f02ee9a27a8e3fab1a2bca356450e56c7bae
Author: Daniel Cederman <cederman@gaisler.com>
Date:   Tue Dec 5 15:26:27 2023 +0100

    sparc: Treat instructions with length 0 as empty
    
    This is to handle the membar_empty instruction that can be generated
    when compiling for UT699.
    
    gcc/ChangeLog:
    
            * config/sparc/sparc.cc (next_active_non_empty_insn): Length 0 treated as empty

Diff:
---
 gcc/config/sparc/sparc.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/config/sparc/sparc.cc b/gcc/config/sparc/sparc.cc
index 38aedd20054..f6f98ba1bc4 100644
--- a/gcc/config/sparc/sparc.cc
+++ b/gcc/config/sparc/sparc.cc
@@ -1130,6 +1130,7 @@ next_active_non_empty_insn (rtx_insn *insn)
   while (insn
 	 && (GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
 	     || GET_CODE (PATTERN (insn)) == ASM_INPUT
+	     || get_attr_length (insn) == 0
 	     || (USEFUL_INSN_P (insn)
 		 && (asm_noperands (PATTERN (insn)) >= 0)
 		 && !strcmp (decode_asm_operands (PATTERN (insn),


More information about the Gcc-cvs mailing list