[committed] PA 1.x architecture promotion
John David Anglin
dave@hiauly1.hia.nrc.ca
Sun May 22 01:50:00 GMT 2005
I noticed in looking at the object file generated from the hppa/basic/imem.s
test that the architecture was being promoted to PA 1.1 even though the test
only contains 1.0 instructions. This change fixes the problem.
Tested on hppa-unknown-linux-gnu with no regressions.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2005-05-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* config/tc-hppa.c (pa_ip): Promote architecture from PA 1.0 to 1.1
only if an instruction match is found.
Index: config/tc-hppa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-hppa.c,v
retrieving revision 1.118
diff -u -3 -p -r1.118 tc-hppa.c
--- config/tc-hppa.c 10 May 2005 15:10:08 -0000 1.118
+++ config/tc-hppa.c 22 May 2005 00:34:41 -0000
@@ -1641,21 +1641,9 @@ pa_ip (str)
the_insn.reloc = R_HPPA_NONE;
- /* If this instruction is specific to a particular architecture,
- then set a new architecture. */
- /* But do not automatically promote to pa2.0. The automatic promotion
- crud is for compatibility with HP's old assemblers only. */
- if (insn->arch < 20
+ if (insn->arch >= 20
&& bfd_get_mach (stdoutput) < insn->arch)
- {
- if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, insn->arch))
- as_warn (_("could not update architecture and machine"));
- }
- else if (bfd_get_mach (stdoutput) < insn->arch)
- {
- match = FALSE;
- goto failed;
- }
+ goto failed;
/* Build the opcode, checking as we go to make
sure that the operands match. */
@@ -3962,6 +3950,16 @@ pa_ip (str)
break;
}
+ /* If this instruction is specific to a particular architecture,
+ then set a new architecture. This automatic promotion crud is
+ for compatibility with HP's old assemblers only. */
+ if (match == TRUE
+ && bfd_get_mach (stdoutput) < insn->arch)
+ {
+ if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, insn->arch))
+ as_warn (_("could not update architecture and machine"));
+ }
+
failed:
/* Check if the args matched. */
if (!match)
More information about the Binutils
mailing list