Some insns are fully decoded by the time they execute here, and don't
need to extract any more fields. This leads to the local insn var
being unused which triggers compiler warnings. Mark it as unused so
we don't require ports to stub it themselves.
Bug: https://sourceware.org/PR31181
" const IDESC *idesc = &" IDESC-TABLE-VAR "[itype];\n"
(if (> (length (sfmt-iflds sfmt)) 0)
(string-append
- " CGEN_INSN_WORD insn = "
+ " CGEN_INSN_WORD insn"
+ ; Some insns are fully decoded by the time they get here, so they won't
+ ; access the insn variable. Mark it as unused to avoid warnings.
+ (if (adata-integral-insn? CURRENT-ARCH)
+ ""
+ " ATTRIBUTE_UNUSED")
+ " = "
(if (adata-integral-insn? CURRENT-ARCH)
"entire_insn;\n"
"base_insn;\n"))