Commit Graph

65 Commits

Author SHA1 Message Date
Jakub Jelinek 8d9254fc8a Update copyright years.
From-SVN: r279813
2020-01-01 12:51:42 +01:00
Uros Bizjak d135eeb21d encoding.c (DFmode): #undef before #define.
* encoding.c (DFmode): #undef before #define.

From-SVN: r269429
2019-03-06 16:49:13 +01:00
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Jakub Jelinek 85ec4feb11 Update copyright years.
From-SVN: r256169
2018-01-03 11:03:58 +01:00
Richard Sandiford 4e10a5a74b [2/77] Add an E_ prefix to case statements
All case statements need to be updated to use the prefixed names,
since the unprefixed names will eventually not be integer constant
expressions.  This patch does a mechanical substitution over the whole
codebase.

2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
	Prefix mode names with E_ in case statements.
	* config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
	(aarch64_split_simd_move): Likewise.
	(aarch64_gen_storewb_pair): Likewise.
	(aarch64_gen_loadwb_pair): Likewise.
	(aarch64_gen_store_pair): Likewise.
	(aarch64_gen_load_pair): Likewise.
	(aarch64_get_condition_code_1): Likewise.
	(aarch64_constant_pool_reload_icode): Likewise.
	(get_rsqrte_type): Likewise.
	(get_rsqrts_type): Likewise.
	(get_recpe_type): Likewise.
	(get_recps_type): Likewise.
	(aarch64_gimplify_va_arg_expr): Likewise.
	(aarch64_simd_container_mode): Likewise.
	(aarch64_emit_load_exclusive): Likewise.
	(aarch64_emit_store_exclusive): Likewise.
	(aarch64_expand_compare_and_swap): Likewise.
	(aarch64_gen_atomic_cas): Likewise.
	(aarch64_emit_bic): Likewise.
	(aarch64_emit_atomic_swap): Likewise.
	(aarch64_emit_atomic_load_op): Likewise.
	(aarch64_evpc_trn): Likewise.
	(aarch64_evpc_uzp): Likewise.
	(aarch64_evpc_zip): Likewise.
	(aarch64_evpc_ext): Likewise.
	(aarch64_evpc_rev): Likewise.
	(aarch64_evpc_dup): Likewise.
	(aarch64_gen_ccmp_first): Likewise.
	(aarch64_gen_ccmp_next): Likewise.
	* config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
	(alpha_emit_xfloating_libcall): Likewise.
	(emit_insxl): Likewise.
	(alpha_arg_type): Likewise.
	* config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
	(arc_preferred_simd_mode): Likewise.
	(arc_secondary_reload): Likewise.
	(get_arc_condition_code): Likewise.
	(arc_print_operand): Likewise.
	(arc_legitimate_constant_p): Likewise.
	* config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/arc/arc.md (casesi_load): Likewise.
	(casesi_compact_jump): Likewise.
	* config/arc/predicates.md (proper_comparison_operator): Likewise.
	(cc_use_register): Likewise.
	* config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
	(arm_init_iwmmxt_builtins): Likewise.
	* config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
	(neon_expand_vector_init): Likewise.
	(arm_attr_length_move_neon): Likewise.
	(maybe_get_arm_condition_code): Likewise.
	(arm_emit_vector_const): Likewise.
	(arm_preferred_simd_mode): Likewise.
	(arm_output_iwmmxt_tinsr): Likewise.
	(thumb1_output_casesi): Likewise.
	(thumb2_output_casesi): Likewise.
	(arm_emit_load_exclusive): Likewise.
	(arm_emit_store_exclusive): Likewise.
	(arm_expand_compare_and_swap): Likewise.
	(arm_evpc_neon_vuzp): Likewise.
	(arm_evpc_neon_vzip): Likewise.
	(arm_evpc_neon_vrev): Likewise.
	(arm_evpc_neon_vtrn): Likewise.
	(arm_evpc_neon_vext): Likewise.
	(arm_validize_comparison): Likewise.
	* config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
	* config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
	* config/avr/avr.c (avr_rtx_costs_1): Likewise.
	* config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
	(c6x_preferred_simd_mode): Likewise.
	* config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
	(epiphany_rtx_costs): Likewise.
	* config/epiphany/predicates.md (proper_comparison_operator):
	Likewise.
	* config/frv/frv.c (condexec_memory_operand): Likewise.
	(frv_emit_move): Likewise.
	(output_move_single): Likewise.
	(output_condmove_single): Likewise.
	(frv_hard_regno_mode_ok): Likewise.
	(frv_matching_accg_mode): Likewise.
	* config/h8300/h8300.c (split_adds_subs): Likewise.
	(h8300_rtx_costs): Likewise.
	(h8300_print_operand): Likewise.
	(compute_mov_length): Likewise.
	(output_logical_op): Likewise.
	(compute_logical_op_length): Likewise.
	(compute_logical_op_cc): Likewise.
	(h8300_shift_needs_scratch_p): Likewise.
	(output_a_shift): Likewise.
	(compute_a_shift_length): Likewise.
	(compute_a_shift_cc): Likewise.
	(expand_a_rotate): Likewise.
	(output_a_rotate): Likewise.
	* config/i386/i386.c (classify_argument): Likewise.
	(function_arg_advance_32): Likewise.
	(function_arg_32): Likewise.
	(function_arg_64): Likewise.
	(function_value_64): Likewise.
	(ix86_gimplify_va_arg): Likewise.
	(ix86_legitimate_constant_p): Likewise.
	(put_condition_code): Likewise.
	(split_double_mode): Likewise.
	(ix86_avx256_split_vector_move_misalign): Likewise.
	(ix86_expand_vector_logical_operator): Likewise.
	(ix86_split_idivmod): Likewise.
	(ix86_expand_adjust_ufix_to_sfix_si): Likewise.
	(ix86_build_const_vector): Likewise.
	(ix86_build_signbit_mask): Likewise.
	(ix86_match_ccmode): Likewise.
	(ix86_cc_modes_compatible): Likewise.
	(ix86_expand_branch): Likewise.
	(ix86_expand_sse_cmp): Likewise.
	(ix86_expand_sse_movcc): Likewise.
	(ix86_expand_int_sse_cmp): Likewise.
	(ix86_expand_vec_perm_vpermi2): Likewise.
	(ix86_expand_vec_perm): Likewise.
	(ix86_expand_sse_unpack): Likewise.
	(ix86_expand_int_addcc): Likewise.
	(ix86_split_to_parts): Likewise.
	(ix86_vectorize_builtin_gather): Likewise.
	(ix86_vectorize_builtin_scatter): Likewise.
	(avx_vpermilp_parallel): Likewise.
	(inline_memory_move_cost): Likewise.
	(ix86_tieable_integer_mode_p): Likewise.
	(x86_maybe_negate_const_int): Likewise.
	(ix86_expand_vector_init_duplicate): Likewise.
	(ix86_expand_vector_init_one_nonzero): Likewise.
	(ix86_expand_vector_init_one_var): Likewise.
	(ix86_expand_vector_init_concat): Likewise.
	(ix86_expand_vector_init_interleave): Likewise.
	(ix86_expand_vector_init_general): Likewise.
	(ix86_expand_vector_set): Likewise.
	(ix86_expand_vector_extract): Likewise.
	(emit_reduc_half): Likewise.
	(ix86_emit_i387_round): Likewise.
	(ix86_mangle_type): Likewise.
	(ix86_expand_round_sse4): Likewise.
	(expand_vec_perm_blend): Likewise.
	(canonicalize_vector_int_perm): Likewise.
	(ix86_expand_vec_one_operand_perm_avx512): Likewise.
	(expand_vec_perm_1): Likewise.
	(expand_vec_perm_interleave3): Likewise.
	(expand_vec_perm_even_odd_pack): Likewise.
	(expand_vec_perm_even_odd_1): Likewise.
	(expand_vec_perm_broadcast_1): Likewise.
	(ix86_vectorize_vec_perm_const_ok): Likewise.
	(ix86_expand_vecop_qihi): Likewise.
	(ix86_expand_mul_widen_hilo): Likewise.
	(ix86_expand_sse2_abs): Likewise.
	(ix86_expand_pextr): Likewise.
	(ix86_expand_pinsr): Likewise.
	(ix86_preferred_simd_mode): Likewise.
	(ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
	* config/i386/sse.md (*andnot<mode>3): Likewise.
	(<mask_codefor><code><mode>3<mask_name>): Likewise.
	(*<code><mode>3): Likewise.
	* config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
	(ia64_expand_atomic_op): Likewise.
	(ia64_arg_type): Likewise.
	(ia64_mode_to_int): Likewise.
	(ia64_scalar_mode_supported_p): Likewise.
	(ia64_vector_mode_supported_p): Likewise.
	(expand_vec_perm_broadcast): Likewise.
	* config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
	(iq2000_function_arg_advance): Likewise.
	(iq2000_function_arg): Likewise.
	* config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
	* config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
	(m68k_libcall_value): Likewise.
	(m68k_function_value): Likewise.
	(sched_attr_op_type): Likewise.
	* config/mcore/mcore.c (mcore_output_move): Likewise.
	* config/microblaze/microblaze.c (microblaze_function_arg_advance):
	Likewise.
	(microblaze_function_arg): Likewise.
	* config/mips/mips.c (mips16_build_call_stub): Likewise.
	(mips_print_operand): Likewise.
	(mips_mode_ok_for_mov_fmt_p): Likewise.
	(mips_vector_mode_supported_p): Likewise.
	(mips_preferred_simd_mode): Likewise.
	(mips_expand_vpc_loongson_even_odd): Likewise.
	(mips_expand_vec_unpack): Likewise.
	(mips_expand_vi_broadcast): Likewise.
	(mips_expand_vector_init): Likewise.
	(mips_expand_vec_reduc): Likewise.
	(mips_expand_msa_cmp): Likewise.
	* config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
	* config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
	(cc_flags_for_mode): Likewise.
	* config/msp430/msp430.c (msp430_print_operand): Likewise.
	* config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
	(nds32_output_casesi_pc_relative): Likewise.
	* config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
	(nvptx_gen_unpack): Likewise.
	(nvptx_gen_pack): Likewise.
	(nvptx_gen_shuffle): Likewise.
	(nvptx_gen_wcast): Likewise.
	(nvptx_preferred_simd_mode): Likewise.
	* config/pa/pa.c (pa_secondary_reload): Likewise.
	* config/pa/predicates.md (base14_operand): Likewise.
	* config/powerpcspe/powerpcspe-c.c
	(altivec_resolve_overloaded_builtin): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
	Likewise.
	(rs6000_preferred_simd_mode): Likewise.
	(output_vec_const_move): Likewise.
	(rs6000_expand_vector_extract): Likewise.
	(rs6000_split_vec_extract_var): Likewise.
	(reg_offset_addressing_ok_p): Likewise.
	(rs6000_legitimate_offset_address_p): Likewise.
	(rs6000_legitimize_address): Likewise.
	(rs6000_emit_set_const): Likewise.
	(rs6000_const_vec): Likewise.
	(rs6000_emit_move): Likewise.
	(spe_build_register_parallel): Likewise.
	(rs6000_darwin64_record_arg_recurse): Likewise.
	(swap_selector_for_mode): Likewise.
	(spe_init_builtins): Likewise.
	(paired_init_builtins): Likewise.
	(altivec_init_builtins): Likewise.
	(do_load_for_compare): Likewise.
	(rs6000_generate_compare): Likewise.
	(rs6000_expand_float128_convert): Likewise.
	(emit_load_locked): Likewise.
	(emit_store_conditional): Likewise.
	(rs6000_output_function_epilogue): Likewise.
	(rs6000_handle_altivec_attribute): Likewise.
	(rs6000_function_value): Likewise.
	(emit_fusion_gpr_load): Likewise.
	(emit_fusion_p9_load): Likewise.
	(emit_fusion_p9_store): Likewise.
	* config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
	(fusion_gpr_mem_load): Likewise.
	(fusion_addis_mem_combo_load): Likewise.
	(fusion_addis_mem_combo_store): Likewise.
	* config/rs6000/predicates.md (easy_fp_constant): Likewise.
	(fusion_gpr_mem_load): Likewise.
	(fusion_addis_mem_combo_load): Likewise.
	(fusion_addis_mem_combo_store): Likewise.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Likewise.
	* config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
	* config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
	(rs6000_preferred_simd_mode): Likewise.
	(output_vec_const_move): Likewise.
	(rs6000_expand_vector_extract): Likewise.
	(rs6000_split_vec_extract_var): Likewise.
	(reg_offset_addressing_ok_p): Likewise.
	(rs6000_legitimate_offset_address_p): Likewise.
	(rs6000_legitimize_address): Likewise.
	(rs6000_emit_set_const): Likewise.
	(rs6000_const_vec): Likewise.
	(rs6000_emit_move): Likewise.
	(rs6000_darwin64_record_arg_recurse): Likewise.
	(swap_selector_for_mode): Likewise.
	(paired_init_builtins): Likewise.
	(altivec_init_builtins): Likewise.
	(rs6000_expand_float128_convert): Likewise.
	(emit_load_locked): Likewise.
	(emit_store_conditional): Likewise.
	(rs6000_output_function_epilogue): Likewise.
	(rs6000_handle_altivec_attribute): Likewise.
	(rs6000_function_value): Likewise.
	(emit_fusion_gpr_load): Likewise.
	(emit_fusion_p9_load): Likewise.
	(emit_fusion_p9_store): Likewise.
	* config/rx/rx.c (rx_gen_move_template): Likewise.
	(flags_from_mode): Likewise.
	* config/s390/predicates.md (s390_alc_comparison): Likewise.
	(s390_slb_comparison): Likewise.
	* config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
	(s390_vector_mode_supported_p): Likewise.
	(s390_cc_modes_compatible): Likewise.
	(s390_match_ccmode_set): Likewise.
	(s390_canonicalize_comparison): Likewise.
	(s390_emit_compare_and_swap): Likewise.
	(s390_branch_condition_mask): Likewise.
	(s390_rtx_costs): Likewise.
	(s390_secondary_reload): Likewise.
	(__SECONDARY_RELOAD_CASE): Likewise.
	(s390_expand_cs): Likewise.
	(s390_preferred_simd_mode): Likewise.
	* config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
	* config/sh/sh.c (sh_print_operand): Likewise.
	(dump_table): Likewise.
	(sh_secondary_reload): Likewise.
	* config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/sh/sh.md (casesi_worker_1): Likewise.
	(casesi_worker_2): Likewise.
	* config/sparc/predicates.md (icc_comparison_operator): Likewise.
	(fcc_comparison_operator): Likewise.
	* config/sparc/sparc.c (sparc_expand_move): Likewise.
	(emit_soft_tfmode_cvt): Likewise.
	(sparc_preferred_simd_mode): Likewise.
	(output_cbranch): Likewise.
	(sparc_print_operand): Likewise.
	(sparc_expand_vec_perm_bmask): Likewise.
	(vector_init_bshuffle): Likewise.
	* config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
	(spu_vector_mode_supported_p): Likewise.
	(spu_expand_insv): Likewise.
	(spu_emit_branch_or_set): Likewise.
	(spu_handle_vector_attribute): Likewise.
	(spu_builtin_splats): Likewise.
	(spu_builtin_extract): Likewise.
	(spu_builtin_promote): Likewise.
	(spu_expand_sign_extend): Likewise.
	* config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
	(tilegx_simd_int): Likewise.
	* config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
	(tilepro_simd_int): Likewise.
	* config/v850/v850.c (const_double_split): Likewise.
	(v850_print_operand): Likewise.
	(ep_memory_offset): Likewise.
	* config/vax/vax.c (vax_rtx_costs): Likewise.
	(vax_output_int_move): Likewise.
	(vax_output_int_add): Likewise.
	(vax_output_int_subtract): Likewise.
	* config/visium/predicates.md (visium_branch_operator): Likewise.
	* config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
	(visium_print_operand_address): Likewise.
	* config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
	(xtensa_expand_conditional_branch): Likewise.
	(xtensa_copy_incoming_a7): Likewise.
	(xtensa_output_literal): Likewise.
	* dfp.c (decimal_real_maxval): Likewise.
	* targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.

gcc/c-family/
	* c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
	case statements.

gcc/objc/
	* objc-encoding.c (encode_gnu_bitfield): Prefix mode names with E_ in
	case statements.

libobjc/
	* encoding.c (_darwin_rs6000_special_round_type_align): Prefix mode
	names with E_ in case statements.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r251453
2017-08-30 11:08:28 +00:00
Richard Biener a4cf4b647c re PR tree-optimization/79256 (FAIL: gcc.dg/vect/pr25413a.c execution test)
2017-02-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79256
	PR middle-end/79278
	* builtins.c (get_object_alignment_2): Use min_align_of_type
	to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
	and ADJUST_FIELD_ALIGN.

	* doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
	type parameter.
	* doc/tm.texi: Regenerate.
	* stor-layout.c (layout_decl): Adjust.
	(update_alignment_for_field): Likewise.
	(place_field): Likewise.
	(min_align_of_type): Likewise.
	* config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
	* config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
	* config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
	* config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
	* config/frv/frv.c (frv_adjust_field_align): Likewise.
	* config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
	* config/i386/i386.c (x86_field_alignment): Likewise.
	* config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
	* config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
	* config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
	* config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
	* config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
	* config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
	 Likewise.

	go/
	* go-backend.c (go_field_alignment): Adjust.

	libobjc/
	* encoding.c (objc_layout_structure_next_member): Adjust
	ADJUST_FIELD_ALIGN usage.

	Revert
	2017-01-30  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79256
	* targhooks.c (default_builtin_vector_alignment_reachable): Honor
	BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
	alignment on TYPE.

From-SVN: r245245
2017-02-07 11:29:06 +00:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Trevor Saunders a153644f75 replace BITS_PER_UNIT with __CHAR_BIT__ in target libs
libgcc/ChangeLog:

2015-11-07  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config/visium/lib2funcs.c (__set_trampoline_parity): Use
	__CHAR_BIT__ instead of BITS_PER_UNIT.
	* fixed-bit.h: Likewise.
	* fp-bit.h: Likewise.
	* libgcc2.c (__popcountSI2): Likewise.
	(__popcountDI2): Likewise.
	* libgcc2.h: Likewise.
	* libgcov.h: Likewise.

libobjc/ChangeLog:

2015-11-07  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	PR libobjc/24775
	* encoding.c (_darwin_rs6000_special_round_type_align): Use
	__CHAR_BIT__ instead of BITS_PER_UNIT.
	(objc_sizeof_type): Likewise.
	(objc_layout_structure): Likewise.
	(objc_layout_structure_next_member): Likewise.
	(objc_layout_finish_structure): Likewise.
	(objc_layout_structure_get_info): Likewise.

From-SVN: r229936
2015-11-07 19:36:26 +00:00
Trevor Saunders 4ee6515e83 remove usage of ROUND_TYPE_SIZE from encoding.c
gcc got rid of this target macro in 2003, so it seems safe to assume the
alternate path works fine on all targets.

libobjc/ChangeLog:

2015-11-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	PR libobjc/24775
	* encoding.c (objc_layout_finish_structure): Remove usage of
	ROUND_TYPE_SIZE.

From-SVN: r229727
2015-11-03 22:43:22 +00:00
Trevor Saunders 539280a8e8 fixup libobjc usage of PCC_BITFIELD_TYPE_MATTERS
libobjc/ChangeLog:

2015-05-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* acinclude.m4: Include bitfields.m4.
	* config.h.in: Regenerate.
	* configure: Likewise.
	* configure.ac: Invoke gt_BITFIELD_TYPE_MATTERS.
	* encoding.c: Check HAVE_BITFIELD_TYPE_MATTERS.

config/ChangeLog:

2015-05-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* bitfields.m4: New file.

From-SVN: r222715
2015-05-02 04:11:07 +00:00
Trevor Saunders e022edafa0 fixup libobjc's usage of PCC_BITFIELD_TYPE_MATTERS
libobjc/ChangeLog:

	* encoding.c (objc_layout_structure_next_member): check value of
	PCC_BITFIELD_TYPE_MATTERS instead of if it is defined.

From-SVN: r222605
2015-04-30 02:08:05 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Alan Modra 98b383e497 re PR libobjc/61920 (libobjc has undefined symbols on powerpc*-linux-gnu)
2014-07-27  Alan Modra  <amodra@gmail.com>
            Matthias Klose  <doko@ubuntu.com>

        PR libobjc/61920

        * encoding.c: Define rs6000_special_adjust_field_align_p.

Co-Authored-By: Matthias Klose <doko@ubuntu.com>

From-SVN: r213097
2014-07-27 13:15:17 +00:00
Richard Sandiford f82356d214 Update copyright years in libobjc/
From-SVN: r206299
2014-01-02 22:26:09 +00:00
Ondřej Bílka cad10e055f class.c: Fix typos.
2013-07-21   Ondřej Bílka  <neleai@seznam.cz>

	* class.c: Fix typos.
	* encoding.c: Likewise.
	* init.c: Likewise.
	* objc-private/runtime.h: Likewise.
	* objc/runtime.h: Likewise.
	* objc-sync.c: Likewise.

From-SVN: r201097
2013-07-21 15:38:21 +00:00
Richard Sandiford ad2466aee4 Update copyright years in libobjc.
From-SVN: r195693
2013-02-03 11:16:21 +00:00
Michael Meissner ad1a0853e6 rs6000-cpus.def (POWERPC_MASKS): Don't assume OPTION_MASK_STRICT_ALIGN is defined.
[gcc]
2012-10-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
	    Dominique Dhumieres  <dominiq@lps.ens.fr>

	* config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Don't assume
	OPTION_MASK_STRICT_ALIGN is defined.
	(MASK_STRICT_ALIGN): If OPTION_MASK_STRICT_ALIGN is not defined,
	define this to 0 for the 3 ports that use it.

	* config/rs6000/rs6000.c (OPTION_MASK_STRICT_ALIGN): Don't do
	check for ports not having -mstrict-align here, move test to
	rs6000-cpus.def.
	(MASK_STRICT_ALIGN): Likewise.
	(rs6000_debug_reg_global): Print out correct target flag words if
	-mdebug=reg.

[libobjc]
2012-10-19  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* encoding.c (TARGET_VSX): Provide definitions based on the
	current compilation options, and not based off the target options
	structure.
	(TARGET_ALTIVEC): Likewise.
	(TARGET_64BIT): Likewise.


Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>

From-SVN: r192623
2012-10-19 19:10:03 +00:00
Nicola Pero 338efe0d54 In libobjc/: 2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2011-06-07  Nicola Pero  <nicola.pero@meta-innovation.com>

	* encoding.c (method_get_number_of_arguments): Removed.
	(method_get_sizeof_arguments): Removed.

From-SVN: r174768
2011-06-07 21:36:57 +00:00
Nicola Pero 80e4b9e501 In libobjc/: 2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2011-06-07  Nicola Pero  <nicola.pero@meta-innovation.com>

	Removed the Traditional Objective-C runtime public API.
	* Makefile.in (OBJC_DEPRECATED_H): Variable removed.
	(install-headers): Do not create the objc/deprecated directory and
	do not install the deprecated headers.
	(OBJC_H): Removed encoding.h and objc-api.h.
	* Object.m: Removed all methods with the exception of -class and
	-isEqual:.  Updated includes.  ([-class]): Use Modern API.
	* objc/Object.h: Do not include deprecated/Object.h.
	* objc/deprecated/Object.h: Removed.
	* linking.m (__objc_linking): Call [Object class] instead of
	[Object name].
	* Protocol.m: Removed all methods with the exception of -isEqual:.
	Updated includes.
	* objc/Protocol.h: Do not include deprecated/Protocol.h.
	* objc/deprecated/Protocol.h: Removed.
	* objc/deprecated/struct_objc_symtab.h: Removed.
	* objc/deprecated/struct_objc_module.h: Removed.
	* objc/deprecated/struct_objc_ivar.h: Removed.
	* objc/deprecated/struct_objc_ivar_list.h: Removed.
	* objc/deprecated/struct_objc_method.h: Removed.
	* objc/deprecated/struct_objc_method_list.h: Removed.
	* objc/deprecated/struct_objc_protocol_list.h: Removed.
	* objc/deprecated/struct_objc_category.h: Removed.
	* objc/deprecated/MetaClass.h: Removed.
	* objc/deprecated/objc_msg_sendv.h: Removed.  
	* objc/deprecated/README: Removed.
	* objc/deprecated/struct_objc_class.h: Removed.
	* objc/deprecated/struct_objc_protocol.h: Removed.
	* objc/deprecated/struct_objc_selector.h: Removed.
	* objc/encoding.h: Removed.
	* objc/message.h (struct objc_super): Removed the definition for
	the Traditional Objective-C runtime API.
	* objc/objc.h: Do not include objc/objc-decls.h.
	deprecated/struct_objc_selector.h, deprecated/MetaClass.h,
	deprecated/struct_objc_class.h, deprecated/struct_objc_protocol.h
	and deprecated/objc_msg_sendv.h.  Uncommented new definition of
	Protocol *.
	* objc/objc-api.h: Removed.
	* objc/runtime.h: Updated comments.  Removed check to detect
	concurrent usage of Traditional and Modern APIs.
	* objc-private/module-abi-8.h: Always define struct objc_class and
	struct objc_protocol.  (struct objc_protocol_list): Changed type
	of 'list' argument from 'Protocol *' to 'struct objc_protocol *'.
	(class_get_instance_size): Added.
	* objc-private/protocols.h (__objc_protocols_add_protocol): Take a
	'struct objc_protocol *' as argument, not a 'Protocol *'.
	* objc-private/runtime.h: Updated comments.
	* objc-private/selector.h (struct objc_selector, sel_eq): Added.
	* class.c: Include objc-private/selector.h.
	(objc_get_meta_class): Return a Class instead of a MetaClass.
	* encoding.c (method_get_next_argument): Removed.
	(method_get_first_argument): Removed.
	(method_get_nth_argument): Removed.
	* gc.c: Include objc/runtime.h instead of objc/encoding.h.
	Include objc-private/module-abi-8.h and ctype.h.
	* protocols.c (__objc_protocols_add_protocol): Take a 'struct
	objc_protocl *' as argument, not a 'Protocol *'.
	(class_addProtocol): Added casts to 'struct objc_protocol *' and
	'Protocol *'.
	(class_copyProtocolList): Likewise.
	(protocol_conformsToProtocol): Likewise.
	(protocol_copyProtocolList): Likewise.
	* sarray.c: Include objc-private/module-abi-8.h.
	* sendmsg.c (method_get_next_argument): Removed.
	(method_get_first_argument): Removed.
	(method_get_nth_argument): Removed.
	(objc_msg_sendv): Removed.
	(arglist_t, retval_t): New.  (class_get_class_method): Take a
	'Class', not 'MetaClass', argument.
	* thr.c: Include module-abi-8.h.

From-SVN: r174765
2011-06-07 19:37:35 +00:00
Jakub Jelinek d652f226fc Update Copyright years for files modified in 2010.
From-SVN: r168438
2011-01-03 21:52:22 +01:00
Iain Sandoe f436d2ff95 encoding.c (_darwin_rs6000_special_round_type_align): New.
libobjc:

	* encoding.c (_darwin_rs6000_special_round_type_align): New.
	(darwin_rs6000_special_round_type_align): Adjust to use new routine.

testsuite:

	* objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c: Adjust XFAILs.

From-SVN: r167741
2010-12-13 08:36:06 +00:00
Nicola Pero ad49efbd54 In libobjc/: 2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-13  Nicola Pero  <nicola.pero@meta-innovation.com>

        * encoding.c (method_copyReturnType): New.
        (method_copyArgumentType): New.
        (method_getReturnType): New.
        (method_getArgumentType): New.
        * methods.c (method_getDescription): New.
        * objc/runtime.h (method_copyReturnType): New.
        (method_copyArgumentType): New.
        (method_getReturnType): New.
        (method_getArgumentType): New.
        (method_getDescription): New.

From-SVN: r165404
2010-10-13 00:15:43 +00:00
Nicola Pero c994cc85bd In libobjc/: 2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-12  Nicola Pero  <nicola.pero@meta-innovation.com>

        * encoding.c: Tidied up comments.
        (objc_skip_variable_name): New static inline function.
        (objc_sizeof_type): Use objc_skip_variable_name instead of copying
        the same code over and over.
        (objc_alignof_type): Same.
        (objc_aligned_size): Same.
        (objc_promoted_size): Same.
        (objc_skip_typespec): Same.
        (objc_layout_structure_next_member): Same.
        (objc_skip_offset): Skip a '-' before the digits (if any).  Fixed
        historical bug where objc_skip_offset would skip one byte even if
        there is no offset: check that the first offset digit is actually
        a digit before skipping it.
        (objc_skip_type_qualifiers): Mark as inline.
        (objc_skip_typespec): Mark as inline.

From-SVN: r165403
2010-10-12 22:57:57 +00:00
Nicola Pero ad9eef11df Makefile.in (C_SOURCE_FILES): Added methods.c.
2010-10-12  Nicola Pero  <nicola.pero@meta-innovation.com>

        * Makefile.in (C_SOURCE_FILES): Added methods.c.
        * encoding.c (method_getNumberOfArguments): New.
        (method_get_number_of_arguments): Call
        method_getNumberOfArguments.
        * ivars.c (ivar_getName): Check for NULL variable argument.
        (ivar_getOffset): Check for NULL variable argument.
        (ivar_getTypeEncoding): Check for NULL variable argument.
        (class_copyIvarList): New.
        * methods.c: New.
        * protocols.c (class_copyProtocolList): Check for Nil class_
        argument.
        * sendmsg.c: Use 'struct objc_method *' instead of Method_t, and
        'struct objc_method_list *' instead of MethodList_t.
        (class_getMethodImplementation): New.
        (class_respondsToSelector): New.
        (class_getInstanceMethod): New.
        (class_getClassMethod): New.
        * objc/runtime.h: Updated comments.
        (class_copyIvarList): New.
        (class_getInstanceMethod): New.
        (class_getClassMethod): New.
        (class_getMethodImplementation): New.
        (class_respondsToSelector): New.
        (method_getName): New.
        (method_getImplementation): New.
        (method_getTypeEncoding): New.
        (class_copyMethodList): New.
        (method_getNumberOfArguments): New.

From-SVN: r165400
2010-10-12 22:00:01 +00:00
Nicola Pero 718a8e53dc archive.c: Do not include objc/objc.h.
2010-10-12  Nicola Pero  <nicola.pero@meta-innovation.com>

        * archive.c: Do not include objc/objc.h.
        * class.c: Do not include objc/objc.h.
        * encoding.c: Include objc/runtime.h, ctype.h and
        objc-private/module-abi-8.h instead of objc/objc-api.h and
        objc/encoding.h.
        * error.c: Do not include objc/objc.h.
        * gc.c: Include tconfig.h and objc/encoding.h only if
        OBJC_WITH_GC.
        * hash.c: Include objc/runtime.h and objc/thr.h instead of
        objc/objc-api.h.  Do not include objc/objc.h.
        * init.c: Do not include objc/objc.h.
        * ivars.c: Include objc/runtime.h, objc-private/module-abi-8.h and
        objc/thr.h instead of objc/objc-api.h.  Do not include
        objc/objc.h.
        * linking.m: Tidied comment.
        * memory.c: Include objc/runtime.h instead of objc/objc-api.h.
        Do not include objc/objc.h.
        * objects.c: Do not include objc/objc.h.
        * objc-sync.c: Include objc/runtime.h instead of objc/objc-api.h.
        * protocols.c: Do not include objc/objc.h.
        * sarray.c: Include objc/runtime.h instead of objc/objc-api.h.  Do
        not include objc/objc.h.
        * selector.c: Do not include objc/objc.h.
        * sendmsg.c: Do not include objc/objc.h.
        * thr.c: Include objc/runtime.h instead of objc/objc-api.h.
        Do not include objc/objc.h.
        * objc/objc-decls.h: Reindented code.
        * objc/runtime.h Include objc-decls.h.  Updated comments.
        (objc_malloc): New.
        (objc_atomic_malloc): New.
        (objc_calloc): New.
        (objc_realloc): New.
        (objc_free): New.
        * objc-private/runtime.h: Updated comments.

From-SVN: r165386
2010-10-12 16:17:18 +00:00
Nicola Pero 177b48f930 In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * doc/objc.texi (Type encoding): Added the new 'long double' (D)
        code.  Added byref, which was missing in the list of codes.
        Explain that enumeration values are encoded as the integer type
        that the compiler uses to store them.  Explain and make examples
        of how 'const' interacts with pointers, and the complication of
        the encoding of 'const char *'.
        (Legacy type encoding): New subsection, explaining that GCC emits
        incorrect type encodings for the NeXT runtime for compatibility
        reasons.
        (@@encode): New subsection, explaining @encode and particularly
        that protocol qualifiers are not recognized inside an @encode()
        expression.
        (Method signatures): New subsection, explaining how method
        signatures are encoded.

In gcc/objc/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/45763
        PR objc/25450
        PR objc/25464
        * objc-act.c: Improved comments for encoding functions.
        (encode_aggregate_within): For the GNU runtime, rewritten some
        obsfuscated code to clarify the various cases.
        (encode_aggregate): Function removed.
        (encode_array): Generate an error if asked to encode an incomplete
        array as part of generating instance variables.  Else, when
        encoding an incomplete array inside a structure, encode it as an
        array of zero size.
        (encode_pointer): For the GNU runtime, fixed encoding 'BOOL *' as
        '^c' instead of '*'.
        (encode_gnu_bitfield): Encode enumerated types exactly in the same
        type as integer types instead of using a hardcoded 'i'.  If asked
        to encode a non-integer type as a bitfield, do not abort
        compilation immediately; instead generate an error, then skip the
        type.
        (encode_type): Use a 'switch' instead of a sequence of 'if's.
        Added a 'default' clause that gets executed if the type can not be
        matched, and that encodes it as '?' (unknown) and produces a
        warning.  For the GNU runtime, encode enumerated types exactly in
        the same way as integer types instead of using a hardcoded 'i'.
        Encode long double as 'D'.  Encode 128-bit integers as 'T' or 't'.
        Encode C++ reference types as pointers.  Call encode_vector to
        encode vectors.
        (encode_vector): New function.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  I modified the
        changes to be used only when compiling for the NeXT runtime.

        2005-10-10  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4301047

        * objc-act.c (encode_type): Remove the hack.

        2005-07-20  Ziemowit Laski  <zlaski@apple.com>

        Radar 4136935
        * objc-act.c (pointee_is_readonly): New function.
        (encode_pointer, encode_aggregate_within, encode_type):
        Attempt to emulate GCC 3.3 when generating type encodings.

In gcc/testsuite/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/25464
        * objc.dg/type-size-3.m: New test.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/45763
        * objc.dg/encode-1.m: Execute the test with the GNU runtime as
        well.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/25450
        * objc.dg/encode-3.m: Updated for fix of encoding of enums.
        * objc.dg/type-size-2.m: Same change.
        * obj-c++.dg/encode-5.mm: Same change.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  The original
        Changelogs are below.

        * objc.dg/encode-6.m: Execute the test only with the GNU runtime.
        * objc.dg/encode-6-next.m: New file (from encode-6.m in the
        branch).
        * objc.dg/encode-7-next.m: New file (from encode-7.m in the
        branch).
        * objc.dg/encode-7-next-64bit.m: New file (from encode-7-64bit.m
        in the branch).
        * objc.dg/proto-qual-1.m: Test the 3.3 ABI on NeXT (from
        proto-qual-1.m in the branch) and the normal ABI on GNU.
        * objc.dg/threedotthree-abi-1.m: New file (from the branch).  Run
        the test only with the NeXT runtime.
        * obj-c++/encode-1.mm: Execute the test only with the GNU runtime.
        * obj-c++/encode-1-next.mm: New file (from encode-1.mm in the
        branch).
        * obj-c++.dg/threedotthree-abi-1.mm: New file (from the branch).
        Run the test only with the NeXT runtime.

        2006-03-30 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4492973
        * objc.dg/encode-7-64bit.m: New.
        * objc.dg/encode-7.m: Skip if -m64.

        2005-10-19  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4301047
        * objc.dg/proto-qual-1.m: Fix test to match 3.3 ABI
        * obj-c++.dg/threedotthree-abi-1.mm: New
        * objc.dg/threedotthree-abi-1.m: New

        2005-07-20  Ziemowit Laski  <zlaski@apple.com>

        Radar 4136935
        * obj-c++.dg/encode-1.mm: Tweak encodings to match fix.
        * objc.dg/encode-6.m: Likewise.
        * objc.dg/encode-7.m: New test case.

In libobjc/:
2010-09-26  Nicola Pero  <nicola.pero@meta-innovation.com>

        * encoding.c (objc_sizeof_type): Added support for vector type and
        for double long types.
        (objc_alignof_type): Same change.
        (objc_skip_typespec): Same change.
        * objc/encoding.h (_C_GCINVISIBLE): Use '|' for _C_GCINVISIBLE
        instead of '!' since '!' is already used for _C_VECTOR.
        * objc/objc-api.h (_C_LNG_DBL): Added.

From-SVN: r164659
2010-09-27 19:22:13 +00:00
Kai Tietz 7116b6ea5c sendmsg.c (get_imp): Remove inline.
2010-09-26  Kai Tietz  <kai.tietz@onevision.com>

	* sendmsg.c (get_imp):  Remove inline.
	(objc_msg_lookup): Likewise.
	(objc_get_uninstalled_dtable): Likewise.
	* encoding.c (objc_skip_type_qualifiers): Likewise.
	(objc_skip_offset): Likewise.
	* archive.c (__objc_write_object): Likewise
	(__objc_write_class):
	(__objc_write_selector):
	(objc_read_char):
	(objc_read_unsigned_char):
	(objc_read_short):
	(objc_read_unsigned_short):
	(objc_read_int):
	(objc_read_long):
	(__objc_read_nbyte_uint):
	(objc_read_unsigned_int):
	(objc_read_unsigned_long):
	* objc/objc-decls.h (obc_EXPORT): Remove dllexport for DLL_EXPORT case.
	(objc_EXPORT): Likewise.
	* objc/message.h (objc-decls.h): Add include.
	* objc/objc-api.h: Mark API by objc_EXPORT.
	* libobjc.def (__objc_responds_to): Removed.

From-SVN: r164632
2010-09-26 16:32:45 +02:00
Nicola Pero 7b86998664 In libobjc/:
* objc/deprecated/objc_error.h: New file.
        * objc/objc-api.h: Include deprecated/objc_error.h instead of
        defining objc_error and related.
        * error.c: New file.  Added _objc_abort function which replaces
        objc_error.  No change in functionality as they both print an
        error and abort.
        * misc.c: File removed.  Code moved into memory.c and error.c.
        * memory.c: New file.
        * objc-private/error.h: New file.
        * archive.c: Include objc-private/error.h and use _objc_abort
        instead of objc_error everywhere.
        * class.c: Same change.
        * encoding.c: Same change.
        * init.c: Same change, and simplified init_check_module_version.
        * memory.c: Same change.
        * sendmsg.c:  Same change.
        * thr.c: Same change.
        * Makefile.in (OBJ_DEPRECATED_H): Added objc_error.h.
        (OBJ_H): Reordered list.
        (OBJS): Removed misc.lo, added memory.lo and error.lo.
        (OBJS_GC): Removed misc_gc.lo, added memory_gc.lo and error_gc.lo.
        (misc_gc.lo): Rule removed.
        (error_gc.lo): Rule added.
        (memory_gc.lo): Rule added.

From-SVN: r164223
2010-09-12 00:43:15 +00:00
Nicola Pero 6dead247c9 In libobjc/:
* objc/objc.h (__GNU_LIBOBJC__): New #define providing an easy way
        to check the API version.  Added some comments.

        * objc-private/common.h: New file.
        * NXConstStr.m: Include objc-private/common.h.
        * Object.m: Same change.
        * Protocol.m: Same change.
        * archive.c: Same change.
        * class.c: Same change.
        * encoding.c: Same change.
        * exception.c: Same change.
        * gc.c: Same change.
        * hash.c: Same change.
        * init.c: Same change.
        * libobjc_entry.c: Same change.
        * linking.m: Same change.
        * misc.c: Same change (and added a comment).
        * nil_method.c: Same change.
        * objects.c: Same change.
        * sarray.c: Same change.
        * selector.c: Same change.
        * sendmsg.c: Same change.
        * thr.c: Same change.

From-SVN: r164218
2010-09-11 22:47:14 +00:00
Iain Sandoe 265a000dbb fix libobjc ppc64 abi for darwin.
libobjc:

	* encoding.c: Add TARGET_ALIGN_NATURAL definition for m64 powerpc darwin.
	Add a comment as to why, update FIXME comments.

testsuite:

	* objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c:
	Update XFAILs.

From-SVN: r163906
2010-09-06 09:27:55 +00:00
Jakub Jelinek 288d6a77c3 sarray.c (sarray_free): Use old_buckets variable.
* sarray.c (sarray_free): Use old_buckets variable.
	* encoding.c (objc_layout_structure_next_member): Remove unused
	bfld_type_size variable.

	* decContext.c (decContextTestEndian): Move adj definition into
	#if DECCHECK guarded code.

From-SVN: r154730
2009-11-28 21:31:39 +01:00
Jakub Jelinek 748086b7b2 Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
From-SVN: r145841
2009-04-09 17:00:19 +02:00
Alan Modra dd25a747c9 Delete get_inner_array_type. Use strip_array_types instead.
From-SVN: r135858
2008-05-25 13:28:15 +09:30
Geoffrey Keating 58182de357 In gcc/: PR 23067
In gcc/:
	PR 23067
	* c-decl.c (start_struct): Don't create self-containing
	structures.
	* config/rs6000/rs6000.c (darwin_rs6000_special_round_type_align):
	New.
	* config/rs6000/rs6000-protos.h
	(darwin_rs6000_special_round_type_align): New.
	* config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Rewrite.
	(ROUND_TYPE_ALIGN): Use darwin_rs6000_special_round_type_align.
In gcc/testsuite/:
	PR 23067
	* gcc.target/powerpc/darwin-abi-3.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-6.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-7.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-8.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-9.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-10.c: Remove XFAIL.
	* gcc.target/powerpc/darwin-abi-11.c: Remove XFAIL.
In libobjc/:
	* encoding.c (darwin_rs6000_special_round_type_align): New.
In libffi/:
	* src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
	(ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
	Darwin.
	* testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
	* testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.

From-SVN: r118365
2006-11-01 05:28:41 +00:00
Andrew Pinski 06b1145579 re PR objc/25360 (Complex types are not encoded)
2005-12-14  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/25360
        * objc/objc-act.c (encode_type): Encode Complex types as 'j' followed
        by the inner type.

2005-12-14  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/25360
        * objc/objc-api.c (_C_COMPLEX): New define.
        * encoding.c (objc_sizeof_type): Handle _C_Complex.
        (objc_alignof_type): Likewise.
        (objc_skip_typespec): Likewise.

From-SVN: r108675
2005-12-16 12:19:37 -08:00
Andrew Pinski 761c0d29cb re PR libobjc/25354 (There should be an automated testsuite for objc_sizeof_type and objc_alignof_type)
2005-12-12  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libobjc/25354
        * objc.dg/gnu-encoding: New directory.
        * objc.dg/gnu-encoding/compat-common.h: New file.
        * objc.dg/gnu-encoding/struct-layout-1.h: New file.
        * objc.dg/gnu-encoding/struct-layout-1_test.h: New file.
        * objc.dg/gnu-encoding/vector-defs.h: New file.
        * objc.dg/gnu-encoding/gnu-encoding.exp: New file.
        * objc.dg/gnu-encoding/generate-random.c: New file.
        * objc.dg/gnu-encoding/generate-random_r.c: New file.
        * objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c: New file.
        * objc.dg/gnu-encoding/generate-random.h: New file.


2005-12-12  Andrew Pinski  <pinskia@physics.uc.edu>

        * encoding.c (TYPE_FIELDS): Fix to skip over just _C_STRUCT_B and        the name.
        (get_inner_array_type): Fix to skip over _C_ARY_B and size.
        (rs6000_special_round_type_align): Update for the ABI fix.
        (objc_layout_finish_structure): Correct the encoding which is passed to
        ROUND_TYPE_ALIGN.

From-SVN: r108398
2005-12-11 21:47:52 -08:00
Andrew Pinski 4540a3ade1 re PR libobjc/25347 (objc_alignof_type gets the wrong alignment for unions (objc_sizeof_type is wrong also too))
2005-12-11  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libobjc/25347
        * encoding.c (objc_sizeof_type): Don't handle _C_UNION_B special
        but use the struct layout functions.
        (objc_alignof_type): Likewise.
        (objc_layout_structure): Handle _C_UNION_B also.
        (objc_layout_structure_next_member): Likewise.
        (objc_layout_finish_structure): Likewise.

2005-12-11  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libobjc/25347
        * objc.dg/encode-8.m: New test.

From-SVN: r108379
2005-12-10 22:59:12 -08:00
Andrew Pinski 153b4898d2 re PR libobjc/25346 (objc_sizeof_type does not handle _Bool at all)
2005-12-11  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libobjc/25346
        * objc/objc-api.h (_C_BOOL): New define.
        * encoding.c (objc_sizeof_type): Handle _C_BOOL.
        (objc_alignof_type): Likewise.
        (objc_skip_typespec): Likewise.

2005-12-11  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libobjc/25346
        * objc.dg/encode-7.m: New test.

From-SVN: r108378
2005-12-10 22:28:35 -08:00
Kelley Cook f9d09c4359 All files: Update FSF address.
2005-08-17  Kelley Cook  <kcook@gcc.gnu.org>

	* All files: Update FSF address.

From-SVN: r103197
2005-08-17 03:21:42 +00:00
David Ayers 348a344520 archive.c, [...]: Include hash.h.
2005-06-07  David Ayers  <d.ayers@inode.at>

	* archive.c, init.c, selector.c: Include hash.h.
	* archive.c, class.c, encoding.c, gc.c, hash.c, hash_compat.c,
	init.c, misc.c, nil_method.c, objects.c, sarray.c, selector.c,
	sendmsg.c, thr-dce.c, thr-decosf1.c, thr-irix.c, thr-mach.c,
	thr-objc.c, thr-os2.c, thr-posix.c, thr-pthreads.c, thr-rtems.c,
	thr-single.c, thr-solaris.c, thr-vxworks.c, thr-win32.c, thr.c:
	Include Objective-C headers with quotes and objc/ directory
	prefix.

From-SVN: r100723
2005-06-07 21:04:19 +00:00
Andrew Pinski 45f1796923 encoding.c (ALTIVEC_VECTOR_MODE): Define a bogus macro.
2004-09-16  Andrew Pinski  <apinski@apple.com>

        * encoding.c (ALTIVEC_VECTOR_MODE): Define a bogus macro.

From-SVN: r87591
2004-09-16 01:35:01 -07:00
Zack Weinberg 0cf614012f cp-demangle.h: Declare cplus_demangle_operators...
libiberty:
	* cp-demangle.h: Declare cplus_demangle_operators,
	cplus_demangle_builtin_types, cplus_demangle_mangled_name, and
	cplus_demangle_type as static if IN_GLIBCPP_V3.
libobjc:
	* encoding.c: Rename target_flags with a #define to avoid
	conflict with a prior declaration.

From-SVN: r83800
2004-06-28 17:52:45 +00:00
Nick Clifton e7ebc32a80 * encoding.c (BITS_PER_UNIT): Define if a definition is not provided.
From-SVN: r83438
2004-06-21 16:39:21 +00:00
Andrew Pinski 435317e25c [multiple changes]
2004-05-25  Andrew Pinski  <pinskia@physics.uc.edu>

	Merge from the libobjc-branch
	2004-02-09  Andrew Pinski  <pinskia@physics.uc.edu>

		* Makefile.in (OBJC_H): Change objc-deps.h to objc-decls.h.

	2004-02-03  Andrew Pinski  <pinskia@physics.uc.edu>

		* Makefile.in (OBJC_H): Add objc-deps.h.

	2004-01-27  Nicola Pero  <n.pero@mi.flashnet.it>

		* Protocol.m ([-conformsTo:]): If the argument is nil, return NO.
		([-hash], [-isEqual:]): New methods.

	2004-01-27  Richard Frith-Macdonald <rfm@gnu.org>

		* sarray.c (sarray_free): Add a better comment.

	2004-01-27  Adam Fedor  <fedor@gnu.org>

		* hash.c (hash_add): Cast cachep to int.
		* selector.c (__sel_register_typed_name): Cast
		soffset_decode to int.

	2004-01-27  Alexander Malmberg  <alexander@malmberg.org>

		* selector.c: Rename register_selectors_from_list to
		__objc_register_selectors_from_list. Update caller.
		(__objc_register_selectors_from_list): Lock __objc_runtime_mutex
		while registering selectors. Use __sel_register_typed_name instead
		of sel_register_typed_name. Check for NULL method_name:s.
		(pool_alloc_selector): New function.
		(__sel_register_typed_name): Use pool_alloc_selector to allocate
		selector structures.
		* sendmsg.c (class_add_method_list): Use
		__objc_register_selectors_from_list.
		* objc/runtime.h: Add __objc_register_selectors_from_list.

	2004-01-25  Adam Fedor  <fedor@gnu.org>
	            Nicola Pero  <n.pero@mi.flashnet.it>
	            Andrew Pinski  <pinskia@physics.uc.edu>

		* objc/objc-decls.h: New file.
		* objc/objc-api.h (_objc_lookup_class): Mark as export.
		(_objc_load_callback): Likewise.
		(_objc_object_alloc): Likewise.
		(_objc_object_copy): Likewise.
		(_objc_object_dispose): Likewise.

	2004-01-25  Andrew Pinski  <pinskia@physics.uc.edu>

		* archive.c: s/__inline__/inline
		* sendmsg.c: Likewise.

		* encoding.c: Remove FIXME about the warning
		about unused variable.
		* sendmsg.c: Add a FIXME comment saying that
		this should be using libffi.

		* Makefile.in (LIBTOOL): Use @LIBTOOL@ now as it works.

From-SVN: r82253
2004-05-25 12:10:54 -07:00
Andrew Pinski 95727fb877 re PR target/10781 (wrong class size and alignment with static class member)
2004-01-17  Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/10781
        * config/rs6000/rs6000-protos.h (rs6000_special_round_type_align):
        Prototype.
        * config/rs6000/rs6000.c (rs6000_special_round_type_align):
        New function.
        * config/rs6000/linux64.h (ROUND_TYPE_ALIGN): Use it.
        * config/rs6000/aix.h (ROUND_TYPE_ALIGN): Likewise.
        * config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Likewise.

2004-01-17  Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/10781
        * encoding.c (rs6000_special_round_type_align): Define.

From-SVN: r76043
2004-01-17 11:48:50 -08:00
Nathanael Nerode 6c82ad2561 Makefile.in, [...]: Replace "GNU CC" with "GCC".
2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>

	* Makefile.in, NXConstStr.m, Object.m, Protocol.m, archive.c,
	class.c, encoding.c, gc.c, objc/NXConstStr.h, objc/Object.h,
	objc/Protocol.h, objc/encoding.h, objc/hash.h, objc/objc-api.h,
	objc/objc-list.h, objc/objc.h, ocjc/runtime.h, objc/sarray.h,
	objc/thr.h, objc/typedstream.h: Replace "GNU CC" with "GCC".

From-SVN: r67131
2003-05-23 20:04:58 +00:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Rodney Brown 40165636b5 encoding.h: Fix formatting.
2002-07-02  Rodney Brown  <rbrown64@csc.com.au>

	* objc/encoding.h: Fix formatting.
	* objc/hash.h: Likewise.
	* objc/objc-api.h: Likewise.
	* objc/runtime.h: Likewise.
	* objc/thr.h: Likewise.
	* archive.c: Likewise.
	* class.c: Likewise.
	* encoding.c: Likewise.
	* gc.c: Likewise.
	* hash.c: Likewise.
	* init.c: Likewise.
	* misc.c: Likewise.
	* nil_method.c: Likewise.
	* objects.c: Likewise.
	* sarray.c: Likewise.
	* selector.c: Likewise.
	* sendmsg.c: Likewise.
	* thr-mach.c: Likewise.
	* thr.c: Likewise.

From-SVN: r55190
2002-07-02 19:43:03 +00:00
Kaveh R. Ghazi b62cc13a20 Object.m (forward, [...]): Fix unused parameter warnings.
* Object.m (forward, read, write): Fix unused parameter warnings.
	* encoding.c: Include <stdlib.h>.
	(target_flags): Mark with attribute unused.
	(atoi): Delete.
	* runtime.h (__objc_selector_max_index): Change to unsigned int.
	(__objc_generate_gc_type_description): Prototype.
	* selector.c (__objc_selector_max_index): Change to unsigned int.

From-SVN: r54884
2002-06-21 14:36:37 +00:00