> -----Original Message-----
> From: [email protected] [mailto:qemu-devel-
> [email protected]] On Behalf Of Richard Henderson
> Sent: Friday, November 16, 2012 2:03 PM
> To: Aurelien Jarno
> Cc: [email protected]
> Subject: Re: [Qemu-devel] [PATCH 2/7] target-mips: generate a reserved
> instruction exception on CPU without DSP
>
> On 11/16/2012 03:04 AM, Aurelien Jarno wrote:
> > +static inline void check_dsp(CPUMIPSState *env, DisasContext *ctx)
> > {
> > if (unlikely(!(ctx->hflags & MIPS_HFLAG_DSP))) {
> > - generate_exception(ctx, EXCP_DSPDIS);
> > + if (env->insn_flags & ASE_DSP) {
> > + generate_exception(ctx, EXCP_DSPDIS);
> > + } else {
> > + generate_exception(ctx, EXCP_RI);
> > + }
>
> Perhaps it would make more sense to copy env->insn_flags into
> a new field in DisasContext at the start of translation, rather
> than modify 300 instances to pass around a second pointer?
>
>
> r~
I agree copying insn_flags to a new field is probably a cleaner way to go.
Also minor complaints from checkpatch.pl:
$ upstream/scripts/checkpatch.pl 'patches/dsp-ase-aurelien/Qemu-devel PATCH 27
target-mips generate a reservedinstruction exception on CPU without DSP.txt'
WARNING: line over 80 characters
#54: FILE: target-mips/translate.c:2582:
+static void gen_HILO (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int
reg)
WARNING: space prohibited between function name and open parenthesis '('
#54: FILE: target-mips/translate.c:2582:
+static void gen_HILO (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int
reg)
WARNING: space prohibited between function name and open parenthesis '('
#73: FILE: target-mips/translate.c:2661:
+static void gen_muldiv (CPUMIPSState *env, DisasContext *ctx,
total: 0 errors, 3 warnings, 1825 lines checked
patches/dsp-ase-aurelien/Qemu-devel PATCH 27 target-mips generate a
reservedinstruction exception on CPU without DSP.txt has style problems, please
review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
-Eric