qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [RFC PATCH v4 19/29] Hexagon (target/hexagon) generator phase 3 - C


From: Taylor Simpson
Subject: RE: [RFC PATCH v4 19/29] Hexagon (target/hexagon) generator phase 3 - C preprocessor for decode tree
Date: Thu, 1 Oct 2020 23:31:38 +0000


> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Thursday, October 1, 2020 1:54 PM
> To: Philippe Mathieu-Daudé <f4bug@amsat.org>; Taylor Simpson
> <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: laurent@vivier.eu; riku.voipio@iki.fi; aleksandar.m.mail@gmail.com;
> ale@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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]