]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sparc: Treat instructions with length 0 as empty
authorDaniel Cederman <cederman@gaisler.com>
Tue, 5 Dec 2023 14:26:27 +0000 (15:26 +0100)
committerDaniel Hellstrom <daniel@gaisler.com>
Tue, 16 Jan 2024 11:57:01 +0000 (12:57 +0100)
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

gcc/config/sparc/sparc.cc

index 38aedd20054de36fe45c1c0df3dc4ac6627572f5..f6f98ba1bc41c3dd345bf48013cb341ae3d3749c 100644 (file)
@@ -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),