> -----Original Message----- > From: Richard Henderson <richard.hender...@linaro.org> > Sent: Thursday, October 1, 2020 1:54 PM > To: Philippe Mathieu-Daudé <f4...@amsat.org>; Taylor Simpson > <tsimp...@quicinc.com>; qemu-devel@nongnu.org > Cc: laur...@vivier.eu; riku.voi...@iki.fi; aleksandar.m.m...@gmail.com; > a...@rev.ng > Subject: Re: [RFC PATCH v4 19/29] Hexagon (target/hexagon) generator > phase 3 - C preprocessor for decode tree > > >> +void opcode_init(void) > >> +{ > >> +#define Q6INSN(TAG, BEH, ATTRIBS, DESCR, SEM) \ > >> + opcode_syntax[TAG] = BEH; > >> +#define EXTINSN(TAG, BEH, ATTRIBS, DESCR, SEM) \ > >> + opcode_syntax[TAG] = BEH; > >> +#include "imported/allidefs.def" > >> +#undef Q6INSN > >> +#undef EXTINSN > >> +} > > What is it that about this case that can't be initialized at compile time?
Several of the Q6INSN's in the imported directory have a ; after them - bleh. Here's an example. Q6INSN(L2_loadw_locked,"Rd32=memw_locked(Rs32)", ATTRIBS(A_LOAD,A_RESTRICT_SLOT0ONLY), "Load word with lock", { fEA_REG(RsV); fLOAD_LOCKED(1,4,u,EA,RdV) }); So, if I do this, there are syntax errors. const char * const opcode_syntax[XX_LAST_OPCODE] = { #define Q6INSN(TAG, BEH, ATTRIBS, DESCR, SEM) \ [TAG] = BEH, #define EXTINSN(TAG, BEH, ATTRIBS, DESCR, SEM) \ [TAG] = BEH, #include "imported/allidefs.def" #undef Q6INSN #undef EXTINSN }; I'll remove the extra ;'s from the imported files and make the change in this file. Taylor