]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/mips/mips.c
* config/mips/mips.c (mips_final_postscan_insn): Modify call
[thirdparty/gcc.git] / gcc / config / mips / mips.c
index c6433dca1155ea1cc2fe8e3510390f7559dbdaa3..0e1a68a9c469a4e04ee252486c56c731d1883a1b 100644 (file)
@@ -20636,9 +20636,19 @@ mips_final_postscan_insn (FILE *file ATTRIBUTE_UNUSED, rtx_insn *insn,
   if (INSN_P (insn)
       && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
       && XINT (PATTERN (insn), 1) == UNSPEC_CONSTTABLE_END)
-    mips_set_text_contents_type (asm_out_file, "__pend_",
-                                INTVAL (XVECEXP (PATTERN (insn), 0, 0)),
-                                TRUE);
+    {
+      rtx_insn *next_insn = next_real_nondebug_insn (insn);
+      bool code_p = (next_insn != NULL
+                    && INSN_P (next_insn)
+                    && (GET_CODE (PATTERN (next_insn)) != UNSPEC_VOLATILE
+                        || XINT (PATTERN (next_insn), 1) != UNSPEC_CONSTTABLE));
+
+      /* Switch content type depending on whether there is code beyond
+        the constant pool.  */
+      mips_set_text_contents_type (asm_out_file, "__pend_",
+                                  INTVAL (XVECEXP (PATTERN (insn), 0, 0)),
+                                  code_p);
+    }
 }
 
 /* Return the function that is used to expand the <u>mulsidi3 pattern.