Re: [PATCH] MIPS: Add microMIPS MSA support.

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

 



Hi Stephen,

On Fri, Apr 11, 2014 at 4:58 PM, Steven J. Hill <Steven.Hill@xxxxxxxxxx> wrote:
> --- a/arch/mips/include/asm/asmmacro.h
> +++ b/arch/mips/include/asm/asmmacro.h
> @@ -273,7 +273,12 @@
>         .macro  cfcmsa  rd, cs
>         .set    push
>         .set    noat
> +#ifdef CONFIG_CPU_MICROMIPS
> +       .insn
> +       .word   0x587e0056 | (\cs << 11)
> +#else
>         .word   0x787e0059 | (\cs << 11)
> +#endif

Personally, I would like it more if you would use the CFCMSA_INSN
macro in the code above. This allows to get rid of all but one #ifdef,
and avoids mistakes in the parameter parts (e.g. "| (\cs << 11)").

> diff --git a/arch/mips/include/asm/msa.h b/arch/mips/include/asm/msa.h
> index a2aba6c..fd76b3b 100644
> --- a/arch/mips/include/asm/msa.h
> +++ b/arch/mips/include/asm/msa.h
> @@ -96,6 +96,13 @@ static inline void write_msa_##name(unsigned int val)                \
>   * allow compilation with toolchains that do not support MSA. Once all
>   * toolchains in use support MSA these can be removed.
>   */
> +#ifdef CONFIG_CPU_MICROMIPS
> +#define CFCMSA_INSN    0x587e0056
> +#define CTCMSA_INSN    0x583e0816
> +#else
> +#define CFCMSA_INSN    0x787e0059
> +#define CTCMSA_INSN    0x783e0819
> +#endif

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux