Commit graph

26 commits

Author SHA1 Message Date
Jeff Law
2598939269 * config/tc-hppa.h (SEG_DIFF_ALLOWED): Delete definition.
* config/tc-hppa.c (fix_new_hppa): If the subtract symbol for
        a fixup is $global$ change it to NULL as $global$ is really only
        needed long enough to determine the base type of relocation to use.
1993-11-07 20:07:51 +00:00
Jeff Law
240cbc571f * config/tc-hppa.c (create_new_subspace): Initialize subspace_defined. 1993-11-07 09:15:13 +00:00
Jeff Law
163aac84be * config/tc-hppa.c (pa-ip, case 'z'): Make field selectors work
for 'z' operands (target of ble branch).
1993-11-07 09:03:59 +00:00
Jeff Law
18c4f112b4 * config/tc-hppa.c: (update_subspace): Fix type and name of last
parameter.  All callers fixed.
        (md_begin, pa_chk_field_selector, pa_entry): Lint.
1993-11-07 07:23:52 +00:00
Jeff Law
1cc248d263 * config/tc-hppa.c (cons_fix_new_hppa): Reset field selector
to default state after it's been used.
1993-11-07 06:43:24 +00:00
Jeff Law
d6e524f308 * tc-hppa.c: Add %dp and %rp as synonyms for %r27 and %r2 in the
predefined register table.
	(pa_parse_number): Handle %rp in common register shortcut code.
	Consistently set return value to -1 for an error.  Clean up error
	messages and only print them when "print_errors" is true.  Handle
	empty string case like the HP assembler -- assume a value of
	zero.
1993-11-03 06:21:14 +00:00
Jeff Law
ff852e1177 * config/obj-som.h (obj_attach_unwind_info): Define as a hook
so GAS can attach unwind descriptor information to a BFD symbol.
	* config/tc-hppa.c (fix_new_hppa): If necessary attach unwind
	descriptor information to the BFD symbol.
	(md_apply_fix): R_HPPA_ENTRY and R_HPPA_EXIT can never be "applied",
	they are simply markers.  Make R_HPPA_UNWIND_* handling OBJ_ELF
	dependent.
	(pa_build_unwind_subspace): Whole function is OBJ_ELF dependent.
	(pa_entry): Build a R_HPPA_ENTRY relocation when configured for SOM.
	(pa_exit): Likewise, but built a R_HPPA_EXIT relocation.  Do not
	build "end-of-function" symbols for SOM, they are not needed.
1993-11-02 08:06:23 +00:00
Jeff Law
a50e9b5506 * config/tc-hppa.c (process_exit): Create temporary symbols with
correct prefixes so they can be eliminated later.
1993-11-02 06:43:11 +00:00
Jeff Law
49fc68a13f * config/tc-hppa.c (call_info struct): Delete unused "frame" field.
(pa_callinfo): Insert framesize into the unwind information as
	soon as it's available.
	(pa_build_unwind_subspace): Do not insert framesize into the unwind
	information here.
1993-11-02 06:38:20 +00:00
Jeff Law
47f45d6636 * config/tc-hppa.c (subspace_dictionary_chain): Add new ssd_defined
field.  Define SUBSPACE_DEFINED accessor macro.
	(pa_subspace): Allow user to override subspace attributes for
	built-in subspaces.  Set ssd_defined at the end of fcn -- that
	way the attributes can only be changed once.  Pass newly allocated
	name to is_defined_subspace, not a pointer to the input line.
	Fix typo in space/subspace rework.
	(is_defined_subspace): Delete unused 2nd arg.  All callers changed.

	* config/tc-hppa.c (pa_import): If currently in the text segment
	and a symbol is imported without type information, set BSF_FUNCTION
	for the symbol.
1993-10-31 18:49:26 +00:00
Jeff Law
e75acd689b * config/obj-som.h (obj_set_symbol_type): Define a hook so GAS
can properly set all the SOM symbol types.
	* config/tc-hppa.c (pa_symbol_type): New enum to represent the
	symbol types which can be set from an IMPORT/EXPORT statement.
	(pa_export_args): Set the pa_symbol_type type based on arguments.
	If defined, call obj_set_symbol_type to pass this information on
	to the BFD backend.
1993-10-31 07:48:41 +00:00
Jeff Law
3b9a72c53c Rework space/subspace handling in PA code to fully support
SOM spaces/subspaces.
	* config/tc-hppa.c (USE_ALIASES): New object-format dependent define
	to control the use of space/subspace name aliases.
	(update_subspace): Accept space chain entry for containing space
	as a new parameter.  All callers changed.
	(pa_get_label): Use current_space rather than pa_segment_to_space.
	(pa_define_label): Likewise.
	(pa_undefine_label): Likewise.
	(md_begin): Change into the (possibly modified) text_section.
	(pa_parse_space_stmt): Create a new segment/space if create_flag
	is true, and the space name is not one of the two predefined spaces.
	(pa_subspace): Use current_space rather than a lookup via
	pa_segment_to_space.  Reset BFD section flags as required by
	the .subspace directive.  Likewise for the section alignment.
	Pass the current space to update_subspace and create_new_subspace.
	(pa_spaces_begin): Only use space/subspace aliases if USE_ALIASES
	is true.  When not using aliases, create a BFD section for each
	subspace encountered.  When not using aliases replace the default
	text, data, and bss segments with new ones.
	(create_new_subspace): When not using aliases each subspace has a
	section/segment and subsegments are not needed, so set the subsegment
	to zero.
1993-10-31 01:53:01 +00:00
Jeff Law
548ea75baa * config/tc-hppa.c (pa_parse_space_stmt): If needed, call
obj_set_section_attributes to pass space attributes to the
        BFD backend.
        (create_new_space): Likewise.
        (create_new_subspace): Likewise for subspace attributes using
        obj_set_subsection_attributes.
        (update_subspace): Likewise for subspace attributes using
        obj_set_subsection_attributes.
1993-10-30 23:11:31 +00:00
Jeff Law
0f3b419c4c * config/tc-hppa.c (pa_parse_space_stmt): Get segment and sort key
for $TEXT$ and $PRIVATE$ from the default space structure.
1993-10-30 23:00:34 +00:00
Jeff Law
9a182533aa * config/tc-hppa.c (pa_export_args): Always set BSF_FUNCTION
as appropriate for the given type.
1993-10-30 22:55:19 +00:00
Jeff Law
62f0841b9d * config/tc-hppa.c (tc_gen_reloc): Preliminary stab at handling
SOM relocations.
1993-10-30 22:35:49 +00:00
Jeff Law
d56f45f5bc * config/tc-hppa.c (pa_comm): Delete incorrect check for symbol
redefinition.
1993-10-30 22:02:53 +00:00
Jeff Law
13925cef35 * config/tc-hppa.c (md_begin): Disable "-R" option to fold
text and data segments.  Warn user "-R" is unsupported on the
        PA.
1993-10-29 21:09:43 +00:00
Jeff Law
d33ace2e25 * config/tc-hppa.c (md_pseudo_table): Default alignment is 8 for
.align and .ALIGN directives.
1993-10-29 01:01:35 +00:00
Jeff Law
3515a504aa * config/tc-hppa.c (pa_parse_space_stmt): Advance
input_line_pointer when an invalid argument is encountered.
1993-10-28 23:14:33 +00:00
Jeff Law
aa8b30edeb Merge with current Utah code:
* config/tc-hppa.c (pa_space): Do not report an error for a .space
        directive which does not define a "well-known" space and does
        not include a space number as an argument.

        * config/tc-hppa.c (pa_def_subspaces): Correct initialization of the
        "defined", "loadable", "code_only" and "space_index" fields.
        (pa_def_spaces): Correct initialization of the "spnum", "defined",
        and "private" fields.

	* config/tc-hppa.c (hppa_fix_struct): Delete unnecessary fix_fixP and
        fx_next fields.
        (hppa_find_hppa_fix): Delete unnecessary function.  Fix all
        callers to get HPPA fixup information from the tc_fix_data field
        in the GAS fixup.
        (hppa_fix_root): Delete unnecessary variable.
        (fix_new_hppa): Attach HPPA fixup data to the GAS fixup.

        * config/tc-hppa.c (pa_set_start_symbol); Delete unwanted
        function.  Fix all callers.
        (subspace_dictionary_chain): Delete unused ssd_start_sym field.

        * config/tc-hppa.c (hppa_fix_adjustable): New function to determine
        if a particular fixup is adjustable.

        * config/tc-hppa.c (log2): Renamed from is_power_of_2.  Fix all
        callers. Now returns log2 (N) for positive N which are an exact
        power of two or -1 for an error.

        * config/tc-hppa.c (pa_callinfo): Range check values provided for
        ENTRY_GR, ENTRY_FR and ENTRY_SR.  Properly adjust vaues before
        inserting them into the unwind table.

        * config/tc-hppa.c (NEEDS_FIXUP): Delete definition and all references.
        (hppa_gen_reloc_type): New object format dependent macro.
        (pa_ip): Delete tons of code which was either OBJ_SOM or OBJ_ELF
        conditional.  The code can (and will) be shared between SOM & ELF
        formats in the near future.
        (cons_fix_new_hppa, md_apply_fix_1): Likewise.
        (pa_build_unwind_subspace, process_exit, pa_exit): Likewise.
        (tc_gen_reloc): Use hppa_gen_reloc rather than an object format
        specific call.

        * config/tc-hppa.c (pa_comm): Set the segment for a common symbol
        to bfd_und_section.

        * config/tc-hppa.c (pa_big_cons): Delete function and its
        declaration.  All callers changed to use pa_cons.

        From Pete Hoogenboom:
        * config/tc-hppa.c (md_atof): Return a NULL on success rather than
        an empty string.
1993-10-28 20:41:49 +00:00
Ken Raeburn
8f78d0e9dc (tc_gen_reloc): ELF32_HPPA_R_ADDEND -> HPPA_R_ADDEND. 1993-10-26 17:26:23 +00:00
Ian Lance Taylor
80aab57939 Changes to let cons handle bignums like general expressions.
* expr.h (expressionS): New field X_unsigned.
	* expr.c (operand): Initialize X_unsigned to 1.  Set it to 0 for
	unary minus case.
	(expr) Fix typo resultP to right if missing operand.  Set
	X_unsigned to 1 when building new expression.
	* read.c (potable): Make "octa" and "quad" call cons, not
	big_cons.
	(cons): Handle bignums.  If given an O_constant (small integer) to
	fill a big space, turn it into a bignum.
	(parse_bitfield_cons): Set X_unsigned field.
	(bignum_low, bignum_limit, bignum_high, grow_bignum, big_cons):
	Removed.
	* read.h (big_cons): Remove prototype.
	* symbols.c (resolve_symbol_value): Don't give a warning if a
	symbol in expr_section can not be resolved.
	(S_SET_VALUE): Clear X_unsigned.
	* write.c (write_object_file): If resolve_symbol_value failed on a
	symbol we are writing out, give a warning.
	* config/tc-h8500.c (parse_reglist): Set X_unsigned.
	* config/tc-hppa.c (md_pseudo_table): Change "octa" and "quad" to
	call pa_cons, not pa_big_cons.
	(pa_big_cons): Remove.
	* config/tc-hppa.h (pa_big_cons): Remove declaration.
	* config/tc-i960.c (md_pseudo_table): Change "quad" to call cons,
	not big_cons.
1993-10-06 17:31:31 +00:00
Ken Raeburn
892a3ff190 gcc -Wall cleanups from Utah 1993-09-09 21:53:03 +00:00
Ken Raeburn
5cf4cd1b8b more Utah changes, some cleanup of mine 1993-09-03 22:36:26 +00:00
Mark Eichin
025b030243 fix definitions of md_create_long_jump, md_create_short_jump,
md_number_to_chars, and md_section_align to correctly use valueT and addressT
1993-07-12 19:42:32 +00:00