]> 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:50:33 +0000 (20:50 +0200)
gcc/
* config/avr/avr.cc (avr_output_addr_vec) <labl>: Asm out its .type.

(cherry picked from commit 33d02f3f13cb9356c971ff75835758fc1fdb5dfd)

gcc/config/avr/avr.cc

index 6b5826672849787f2ed183718af7ba33deb2fce0..847fa3f483c666bf46c8c2ca9bfae904abe2e3c4 100644 (file)
@@ -14422,6 +14422,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.