summaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-07-15 15:07:28 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-07-15 15:07:28 +0000
commit744127e62a95fcdc3e0157b9bdec24a5873ee56e (patch)
tree6d29424909ec84de8a9765a6ec7413679090e0f0 /gdb/mips-tdep.c
parent760288e8b4669ccd54efebd736322f9451ef128f (diff)
downloadgdb-744127e62a95fcdc3e0157b9bdec24a5873ee56e.tar.gz
include/elf/
* mips.h (Tag_GNU_MIPS_ABI_FP): Remove comment. (Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE, Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT, Val_GNU_MIPS_ABI_FP_64): New enum. bfd/ * elfxx-mips.c (mips_elf_merge_obj_attributes): Replace hardcoded magic numbers with enum values. binutils/ * readelf.c (display_mips_gnu_attribute): Replace hardcoded magic numbers with enum values. gdb/ * mips-tdep.c (mips_gdbarch_init): Replace hardcoded magic numbers with enum values.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 3993f9259c9..f60a8447528 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -7910,7 +7910,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
int i, num_regs;
enum mips_fpu_type fpu_type;
struct tdesc_arch_data *tdesc_data = NULL;
- int elf_fpu_type = 0;
+ int elf_fpu_type = Val_GNU_MIPS_ABI_FP_ANY;
const char **reg_names;
struct mips_regnum mips_regnum, *regnum;
enum mips_isa mips_isa;
@@ -8235,17 +8235,17 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (!mips_fpu_type_auto)
fpu_type = mips_fpu_type;
- else if (elf_fpu_type != 0)
+ else if (elf_fpu_type != Val_GNU_MIPS_ABI_FP_ANY)
{
switch (elf_fpu_type)
{
- case 1:
+ case Val_GNU_MIPS_ABI_FP_DOUBLE:
fpu_type = MIPS_FPU_DOUBLE;
break;
- case 2:
+ case Val_GNU_MIPS_ABI_FP_SINGLE:
fpu_type = MIPS_FPU_SINGLE;
break;
- case 3:
+ case Val_GNU_MIPS_ABI_FP_SOFT:
default:
/* Soft float or unknown. */
fpu_type = MIPS_FPU_NONE;