diff options
author | Gavin Romig-Koch <gavin@redhat.com> | 1998-12-20 00:01:51 +0000 |
---|---|---|
committer | Gavin Romig-Koch <gavin@redhat.com> | 1998-12-20 00:01:51 +0000 |
commit | d95b73282a3dcab0c2eab32f327491147a651173 (patch) | |
tree | b1ee9a3cc09d1a8a65bdf8b561c5657e14c0b1ff /gas | |
parent | 0e52a532e4c7ed810f839d05d16b7c03e935a706 (diff) | |
download | gdb-d95b73282a3dcab0c2eab32f327491147a651173.zip gdb-d95b73282a3dcab0c2eab32f327491147a651173.tar.gz gdb-d95b73282a3dcab0c2eab32f327491147a651173.tar.bz2 |
* config/tc-mips.c (mips_eabi64): New.
(md_begin): Set mips_eabi64.
(mips_elf_final_processing): Use it.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 26 |
2 files changed, 27 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 236a160..cbfb4e1 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +1998-12-19 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (mips_eabi64): New. + (md_begin): Set mips_eabi64. + (mips_elf_final_processing): Use it. + 1998-12-18 Gavin Romig-Koch <gavin@cygnus.com> * config/tc-mips.c (mips_elf_final_processing): diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 3de536d..87343be 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -201,6 +201,9 @@ static int mips_cpu = -1; /* The argument of the -mabi= flag. */ static char* mips_abi_string = 0; +/* Wether we should mark the file EABI64 or EABI32. */ +static int mips_eabi64 = 0; + /* Whether the 4650 instructions (mad/madu) are permitted. */ static int mips_4650 = -1; @@ -1012,6 +1015,7 @@ md_begin () else if (mips_cpu == 4000 || mips_cpu == 4100 /* start-sanitize-vr4xxx */ + || mips_cpu == 4111 || mips_cpu == 4121 /* end-sanitize-vr4xxx */ || mips_cpu == 4400 @@ -1056,7 +1060,11 @@ md_begin () mips_4010 = (mips_cpu == 4010); if (mips_4100 < 0) - mips_4100 = (mips_cpu == 4100); + mips_4100 = (mips_cpu == 4100 + /* start-sanitize-vr4xxx */ + || mips_cpu == 4111 + /* end-sanitize-vr4xxx */ + ); /* start-sanitize-vr4xxx */ if (mips_4121 < 0) @@ -1099,6 +1107,12 @@ md_begin () if (mips_opts.isa < 2 && mips_trap) as_bad (_("trap exception not supported at ISA 1")); + /* Set the EABI kind based on the ISA before the user gets + to change the ISA with directives. This isn't really + the best, but then neither is basing the abi on the isa. */ + if (mips_opts.isa > 2 && strcmp (mips_abi_string,"eabi")) + mips_eabi64 = 1; + if (mips_cpu != 0 && mips_cpu != -1) { ok = bfd_set_arch_mach (stdoutput, bfd_arch_mips, mips_cpu); @@ -9603,7 +9617,7 @@ md_parse_option (c, arg) mips_cpu = 4100; /* start-sanitize-vr4xxx */ else if (strcmp (p, "4111") == 0) - mips_cpu = 4100; + mips_cpu = 4111; else if (strcmp (p, "4121") == 0) mips_cpu = 4121; /* end-sanitize-vr4xxx */ @@ -9918,6 +9932,8 @@ MIPS options:\n\ -no-m4100 do not permit VR4100 instructions\n")); /* start-sanitize-vr4xxx */ fprintf(stream, _("\ +-mcpu=vr4111 generate code for vr4111\n")); + fprintf(stream, _("\ -mcpu=vr4121 generate code for vr4121\n\ -m4121 permit VR4121 instructions\n\ -no-m4121 do not permit VR4121 instructions\n")); @@ -12092,10 +12108,10 @@ mips_elf_final_processing () elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_O64; else if (strcmp (mips_abi_string,"eabi") == 0) { - if (mips_opts.isa > 2) - elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_EABI32; - else + if (mips_eabi64) elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_EABI64; + else + elf_elfheader (stdoutput)->e_flags |= E_MIPS_ABI_EABI32; } } |