[patch] Remove magic constant from gas/tc-hppa.c
Jeff Bailey <[email protected]>
| Newsgroups | gmane.comp.gnu.binutils,gmane.linux.ports.hppa |
|---|---|
| Message-ID | <[email protected]> |
I was reading through the gas hppa bits trying to find something for the hppa64 port and wanted to clean this up. If these types of patches are acceptable, I'll probably feed a steady stream of them in. 2006-10-21 Jeff Bailey <[email protected]> * config/tc-hppa.c: Use defines from bfd.h instead of magic constants. -- Jeff Bailey - http://www.raspberryginger.com/jbailey/
tc-hppa.c.diff
(text/x-patch, 1.1 KB)
Index: tc-hppa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-hppa.c,v
retrieving revision 1.132
diff -u -p -r1.132 tc-hppa.c
--- tc-hppa.c 7 Jun 2006 11:27:57 -0000 1.132
+++ tc-hppa.c 21 Oct 2006 17:48:59 -0000
@@ -105,12 +105,6 @@ typedef som_symbol_type obj_symbol_type;
#endif
#endif /* OBJ_SOM */
-#if TARGET_ARCH_SIZE == 64
-#define DEFAULT_LEVEL 25
-#else
-#define DEFAULT_LEVEL 10
-#endif
-
/* Various structures and types used internally in tc-hppa.c. */
/* Unwind table and descriptor. FIXME: Sync this with GDB version. */
@@ -8259,7 +8253,11 @@ md_begin (void)
call_info_root = NULL;
/* Set the default machine type. */
- if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, DEFAULT_LEVEL))
+#if TARGET_ARCH_SIZE == 64
+ if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, bfd_mach_hppa10))
+#else
+ if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, bfd_mach_hppa20w))
+#endif
as_warn (_("could not set architecture and machine"));
/* Folding of text and data segments fails miserably on the PA.
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQBFOmQv5M5hmdCYCpkRAl0JAKCmdX12fv57CtWCoPA78aONk3odgwCfWSbo PPFUWpRjUTIf23zBGom1obA= =8xzd -----END PGP SIGNATURE-----