This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: elf32 support for IA64 (patch 3)
- To: sje at cup dot hp dot com
- Subject: Re: elf32 support for IA64 (patch 3)
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Tue, 31 Oct 2000 18:27:46 -0800
- cc: binutils at sources dot redhat dot com
+ Mon Oct 30 08:19:10 PST 2000 Steve Ellcey <sje@cup.hp.com>
+
+ * tc-ia64.c: (md_shortopts, md_parse_option, md_show_usage)
+ Change M to m for -milp32 or -mlp64 to match gcc.
+ (dot_endp) Modify various calls to change args based on
+ elf32 vs. elf64.
+ ...
The code you wrote doesn't follow the GNU style conventions. After all of Kazu
Hirata's formatting fixes, we should try not to mess that up again. This is
primarily a problem in ia64_hpux_init and ia64_target_format. There is also
a hunk of code in md_begin. The indentation needs to be two spaces instead of
tabs. Open/close braces should be on a line by themselves and indented.
Functions have to have a comment before them explaining what they do, and
what the arguments/return values mean if any.
The TE_HPUX stuff looks a little ugly to me, but it does seem to be the
right gas convention, so I guess I have to live with it.
In md_begin, the local variable ok is only used when TE_HPUX is true, so it
should only be defined when TE_HPUX is true.
There is a comment that needs updating:
/* ??? This overrides the -M options, but they aren't working anyways. */
There aren't any -M options anymore, they are -m, and the -m options do work.
By the way, the reason -M options are used here is because this is what is
specified in Intel's assembler documentation. Unfortunately, -M can't work
as a target dependent option because there is a target independent -M option
that takes precedence. So using -m instead is reasonable. Ideally, I think
the code in md_begin setting md.flags ABI should check to see if either ABI
option was used, and if not, then set a default. The code you added for hpux
looks like it might handle this right.
It looks like both ia64_hpux_init and ia64_target_format don't have to be
HPUX specific. ia64_hpux_init would be correct for linux also, except for
the default endianness, and there is already a TARGET_BYTES_BIG_ENDIAN macro
for that. Using this unconditionally would eliminate the need for hpux
specific code in md_begin, and would fix the bug documented by the comment I
mentioned above. Similarly, ia64_targert_format is correct for linux also.
This would eliminate all of the HPUX specific changes to tc-ia64.c, and thus
would make the changes a lot cleaner in my opinion. The only HPUX specific
changes we need are a couple of lines in tc-ia64.h to handle the different
default endianness.
I think I can make these cleanups myself, but I have no way to test them
under hpux, as I have no access to ia64-hpux machines.
Jim