This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] microMIPS support
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 26 Apr 2012 20:37:13 +0200
- Subject: Re: [PATCH] microMIPS support
- References: <alpine.DEB.1.10.1204241843340.19835@tp.orcam.me.uk>
Hello Maciej,
sure I have seen no MIPS arch bugs...
On Tue, 24 Apr 2012 22:29:01 +0200, Maciej W. Rozycki wrote:
[...]
> +/* For backwards compatibility we default to MIPS16. This flag is
> + overridden as soon as unambiguous ELF file flags tell us the
> + compressed ISA encoding used. */
> +static const char mips_compression_mips16[] = "mips16";
> +static const char mips_compression_micromips[] = "micromips";
> +static const char *mips_compression_strings[] = {
nitpick, be more readonly:
static const char *const mips_compression_strings[] = {
> + mips_compression_mips16,
> + mips_compression_micromips,
> + NULL
> +};
[...]
> +/* Return one iff MSYM refers to standard ISA code. */
> +
> static int
> -msymbol_is_special (struct minimal_symbol *msym)
> +msymbol_is_mips (struct minimal_symbol *msym)
> +{
> + return !(MSYMBOL_TARGET_FLAG_1 (msym) | MSYMBOL_TARGET_FLAG_2 (msym));
(a) | -> ||
(b) I have found here it is best to expand logical expressions for the patch
readers, despite author may see it more logical with the parentheses.
return !MSYMBOL_TARGET_FLAG_1 (msym) && !MSYMBOL_TARGET_FLAG_2 (msym);
> +}
[...]
> @@ -686,8 +779,8 @@ mips_ax_pseudo_register_push_stack (stru
> return 0;
> }
>
> -/* Table to translate MIPS16 register field to actual register number. */
> -static int mips16_to_32_reg[8] = { 16, 17, 2, 3, 4, 5, 6, 7 };
> +/* Table to translate 3-bit register field to actual register number. */
> +static int mips_reg3_to_reg[8] = { 16, 17, 2, 3, 4, 5, 6, 7 };
It can be const.
Thanks,
Jan