]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
AVR: Set .type of jump table label.
authorGeorg-Johann Lay <avr@gjlay.de>
Thu, 31 Jul 2025 16:31:33 +0000 (18:31 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Thu, 31 Jul 2025 18:32:53 +0000 (20:32 +0200)
gcc/
* config/avr/avr.cc (avr_output_addr_vec) <labl>: Asm out its .type.

gcc/config/avr/avr.cc

index 94684468de392b02e1ebeca817d21c206be61edb..1fb59b624de79422dd2a0a17a08fbaaf0a1ad835 100644 (file)
@@ -14418,6 +14418,13 @@ avr_output_addr_vec (rtx_insn *labl, rtx table)
   // Output the label that precedes the table.
 
   ASM_OUTPUT_ALIGN (stream, 1);
+
+  char s_labl[40];
+  targetm.asm_out.generate_internal_label (s_labl, "L",
+                                          CODE_LABEL_NUMBER (labl));
+  ASM_OUTPUT_TYPE_DIRECTIVE (stream, s_labl,
+                            AVR_HAVE_JMP_CALL ? "object" : "function");
+
   targetm.asm_out.internal_label (stream, "L", CODE_LABEL_NUMBER (labl));
 
   // Output the table's content.