Age | Commit message (Collapse) | Author | Files | Lines |
|
* ginclude/stdfix.h: New file.
* Makefile.in (USER_H): Add $(srcdir)/ginclude/stdfix.h.
(convert.o): Add dependence on fixed-value.h.
* c-convert.c (convert): Support FIXED_POINT_TYPE.
* c-cppbuiltin.c (builtin_define_fixed_point_constants): New function
to define fixed-point constants.
(c_cpp_builtins): Define fixed-point constants.
* convert.c (fixed-value.h): New include.
(convert_to_real): Update comment to include fixed-point.
Support FIXED_POINT_TYPE.
(convert_to_integer): Update comment to include fixed-point.
Support FIXED_POINT_TYPE.
(convert_to_complex): Support FIXED_POINT_TYPE.
(convert_to_fixed): New function.
* convert.h (convert_to_fixed): Declare.
* genopinit.c: Add comment about $Q for only fixed-point modes.
(optabs): Add fract_optab, fractuns_optab, satfract_optab,
satfractuns_optab, add_optab, ssadd_optab, usadd_optab, sub_optab,
sssub_optab, ussub_optab, smul_optab, ssmul_optab, usmul_optab,
ssmadd_widen_optab, usmadd_widen_optab, ssdiv_optab, udiv_optab,
usdiv_optab, ssashl_optab, usashl_optab, neg_optab, ssneg_optab,
usneg_optab for fixed-point modes.
(gen_insn): Add force_fixed to track the $Q format for all fixed-point
modes.
* optabs.c (optab_for_tree_code): For *DIV_EXPR, LSHIFT_EXPR,
PLUS_EXPR, MINUS_EXPR, MULT_EXPR, NEGATE_EXPR, return signed or
unsigned saturation optabs, when type is saturating.
(shift_optab_p): Return true for SS_ASHIFT or US_ASHIFT.
(expand_fixed_convert): New function.
(gen_fixed_libfunc, gen_signed_fixed_libfunc,
gen_unsigned_fixed_libfunc, gen_int_fp_fixed_libfunc,
gen_int_fp_signed_fixed_libfunc, gen_int_fixed_libfunc,
gen_int_signed_fixed_libfunc, gen_int_unsigned_fixed_libfunc,
gen_fract_conv_libfunc, gen_fractuns_conv_libfunc,
gen_satfract_conv_libfunc, gen_satfractuns_conv_libfunc): New
functions.
(init_optabs): Initialize ssadd_optab, usadd_optab, sssub_optab,
ussub_optab, ssmul_optab, usmul_optab, ssmadd_widen_optab,
usmadd_widen_optab, ssmsub_widen_optab, usmsub_widen_optab,
ssdiv_optab, usdiv_optab, ssashl_optab, usashl_optab, ssneg_optab,
usneg_optab, fract_optab, fractuns_optab, satfract_optab,
satfractuns_optab.
Initialize fixed-point libraries, including add, ssadd, usadd, sub,
sssub, ussub, mul, ssmul, usmul, div, ssdiv, udiv, usdiv, ashl,
ssashl, usashl, ashr, lshr, neg, ssneg, usneg, cmp, fract, satfract,
fractuns, satfractuns.
* optabs.h (enum optab_index): Add OTI_ssadd, OTI_usadd, OTI_sssub,
OTI_ussub, OTI_ssmul, OTI_usmul, OTI_ssdiv, OTI_usdiv, OTI_ssneg,
OTI_usneg, OTI_ssashl, OTI_usashl, OTI_ssmadd_widen, OTI_usmadd_widen,
OTI_ssmsub_widen, OTI_usmsub_widen.
(ssadd_optab, usadd_optab, sssub_optab, ussub_optab, ssmul_optab,
usmul_optab, ssdiv_optab, usdiv_optab, ssneg_optab, usneg_optab,
ssashl_optab, usashl_optab, ssmadd_widen_optab, usmadd_widen_optab,
umsub_widen_optab, usmsub_widen_optab): Define.
(enum convert_optab_index): Add COI_fract, COI_fractuns, COI_satfract,
COI_satfractuns.
(fract_optab, fractuns_optab, satfract_optab, satfractuns_optab):
Define.
(expand_fixed_convert): Declare.
* expr.c (convert_move): Support the move of fixed-point modes.
(emit_move_insn_1): Handle fixed-point mode to move via integer.
(categorize_ctor_elements_1): Handle FIXED_CST.
(count_type_elements): Handle FIXED_POINT_TYPE.
(expand_expr_real_1): For VECTOR_CST, check MODE_VECTOR_FRACT,
MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
Support FIXED_CST.
For PLUS_EXPR and MINUS_EXPR, support saturating and non-saturating
multiply and add/subtract for fixed-point types.
For MULT_EXPR, *DIV_EXPR, *SHIFT_EXPR, if the mode if a fixed-point
mode, we jump to binop directly.
Support FIXED_CONVERT_EXPR.
(do_store_flag): Check FIXED_CST to put a constant second.
(vector_mode_valid_p): Handle MODE_VECTOR_FRACT,
MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
(const_vector_from_tree): Support FIXED_CST.
* doc/extend.texi (Fixed-Point): New node.
* doc/md.texi (ssadd, usadd, sssub, ussub, ssmul, usmul, ssdiv, usdiv,
ssmadd, usmadd, ssmsub, usmsub, ssashl, usashl, ssneg, usneg, fract,
satfract, fractuns, satfractuns): Document them.
From-SVN: r128218
|
|
* config/arm/arm.c, config/rs6000/ppu_intrinsics.h,
config/spu/spu.c, df-scan.c, fixed-value.c, fold-const.c,
ginclude/tgmath.h, haifa-sched.c, optabs.c, recog.c,
sched-deps.c, sched-int.h, system.h, target.h,
tree-ssa-live.c, tree-vect-transform.c, tree-vectorizer.c,
tree.def: Fix comment typos.
From-SVN: r128016
|
|
2007-07-12 Geoffrey Keating <geoffk@apple.com>
* ginclude/tgmath.h: New.
* config.gcc: Use GCC's tgmath.h on non-glibc systems.
* doc/sourcebuild.texi (Headers): Document use_gcc_tgmath.
* configure.ac (STMP_FIXPROTO): Honor use_gcc_tgmath.
* configure: Regenerate.
Index: gcc/testsuite/ChangeLog
2007-07-11 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/c99-tgmath-1.c: New.
* gcc.dg/c99-tgmath-2.c: New.
* gcc.dg/c99-tgmath-3.c: New.
* gcc.dg/c99-tgmath-4.c: New.
From-SVN: r126613
|
|
* ginclude/float.h: Check that __STDC_WANT_DEC_FP__ is defined,
not that it is 1.
From-SVN: r123974
|
|
gcc/
* Makefile.in (USER_H): Remove decfloat.h.
* ginclude/decfloat.h: Delete, moving contents to ...
* ginclude/float.h: Add support for decimal floating point,
guarded by __STDC_WANT_DEC_FP__.
gcc/testsuite/
* gcc.dg/dfp/dec-eval-method.c: Replace decfloat.h with float.h.
* gcc.dg/dfp/decfloat-constants.c: Ditto.
* gcc.dg/dfp/convert-dfp.c: Ditto.
* gcc.dg/dfp/convert-int-saturate.c: Ditto.
From-SVN: r121308
|
|
gcc:
* ginclude/decfloat.h (DEC*_DEN): Define using the correct builtins.
testsuite:
* gcc.dg/dfp/decfloat-constants.c: Remove 'dg-do compile', fix typo.
From-SVN: r117115
|
|
2005-12-16 Jon Grimm <jgrimm2@us.ibm.com>
Janis Johnson <janis187@us.ibm.com>
Ben Elliston <bje@au.ibm.com>
* target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): New.
(TARGET_INITIALIZER): Add TARGET_DECIMAL_FLOAT_P.
* target.h (struct gcc_target): Add decimal_float_supported_p.
* targhooks.c (default_scalar_mode_supported_p): Handle
MODE_DECIMAL_FLOAT.
* builtins.def: Add new builtins for 32, 64 and 128 bit variants
of inf, nan, finite, isinf and isnan.
* builtin-types.def (BT_DFLOAT32, BT_DFLOAT64, BT_DFLOAT128,
BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR,
BT_FN_DFLOAT32, BT_FN_DFLOAT64, BT_FN_DFLOAT128,
BT_FN_INT_DFLOAT32, BT_FN_INT_DFLOAT64, BT_FN_INT_DFLOAT128,
BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT64_CONST_STRING,
BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT32_DFLOAT32,
BT_FN_DFLOAT64_DFLOAT64, BT_FN_DFLOAT128_DFLOAT128): New.
* c-decl.c (declspecs_add_type): Verify combos on type qualifiers.
Pedwarn if decimal floating point types are used. Error if
decimal floating point is not supported by the target.
(finish_declspecs): Return type from DFP typespec_word.
* c-typeck.c (c_common_type): Choose the decimal floating point
type with the greater precision when determining a common type.
(convert_arguments): Warn if there is a mismatch between argument
and prototype for decimal float types. Warn of conversions with
binary float types and of precision narrowing due to prototype.
* c-parser.c (reswords): Add _Decimal32, _Decimal64, _Decimal128.
(c_token_starts_typename): Handle RID_DFLOAT32/64/128.
(c_token_starts_declspecs): Likewise.
(c_parser_attributes): Likewise.
* c-common.h (enum rid): Add new enumeration values RID_DFLOAT32,
RID_DFLOAT64, RID_DFLOAT128.
(T_D32, TEX_D32, T_D64, TEX_D64, T_D128, TEX_D128): New macros.
* c-common.c (c_common_type_for_mode): Handle decimal float modes.
(shorten_compare): Convert DFP/BFP operands to a common type.
(c_common_modes_and_builtins): Register built-in decimal float
types if the target supports them.
(handle_mode_addtribute): Handle MODE_DECIMAL_FLOAT.
* builtins.c (fold_builtin_1): Handle 32, 64 and 128 bit cases of
inf, nan, finite, isinf and isnan builtins.
* c-cppbuiltin.c (builtin_define_decimal_float_constants): New.
(builtin_define_float_constants): Assert non-decimal radix.
(c_cpp_builtins): Register built-in __DEC_EVAL_METHOD__ define.
Call builtin_define_decimal_float_constants for each type.
* c-lex.c (interpret_float): Decode decimal float types from CPP_N
flags. Use real_from_string3, which can handle binary or decimal
floats.
* c-tree.h (enum c_typespec_keyword): Add cts_dfloat32,
cts_dfloat64, cts_dfloat128.
* tree.c (build_common_tree_nodes_2): Add decimal float types.
* tree.h (enum tree_index): Add new enumeration values
TI_DFLOAT32_TYPE, TI_DFLOAT64_TYPE, TI_DFLOAT128_TYPE,
TI_DFLOAT32_PTR_TYPE, TI_DFLOAT64_PTR_TYPE, TI_DFLOAT128_PTR_TYPE.
(dfloat32_type_node): New macro.
(dfloat64_type_node, dfloat128_type_node): Likewise.
(dfloat32_ptr_type_node, dfloat64_ptr_type_node): Likewise.
(dfloat128_ptr_type_node): Likewise.
* c-pretty-print.c (pp_c_floating_constant): Append 32, 64 and 128
bit decimal floating point types with "df", "dd" and "dl".
* c-format.h (enum format_lengths): Add new enumeration values
FMT_LEN_H, FMT_LEN_D and FMT_LEN_DD.
* c-format.c (printf_length_specs, scanf_length_specs): Add
entries for H, D, DD.
(print_char_table, scan_char_table): Use new entries.
(asm_fprintf_char_table, gcc_diag_char_table,
gcc_cdiag_char_table, gcc_cxxdiag_char_table): Adjust for longer
length arrays.
* defaults.h (DECIMAL32_TYPE_SIZE): Define.
(DECIMAL64_TYPE_SIZE): Likewise.
(DECIMAL128_TYPE_SIZE): Likewise.
(TARGET_DEC_EVAL_METHOD): Likewise.
* doc/extend.texi (Decimal Float): New node.
(Constructing Calls): Document decimal float built-ins.
* doc/tm.texi: Document TARGET_DECIMAL_FLOAT_SUPPORTED_P hook.
* Makefile.in (USER_H): Add $(srcdir)/ginclude/decfloat.h.
* ginclude/decfloat.h: New file.
Co-Authored-By: Ben Elliston <bje@au.ibm.com>
Co-Authored-By: Janis Johnson <janis187@us.ibm.com>
From-SVN: r108629
|
|
From-SVN: r101313
|
|
From-SVN: r88445
|
|
* c-parse.in (OFFSETOF, offsetof_member_designator): New.
(primary): Handle offsetof. Add error productions for faux functions.
Move component_ref objc checking to build_component_ref.
(reswords): Add offsetof.
(rid_to_yy): Add offsetof.
* c-tree.h (build_offsetof): Declare.
* c-common.h (objc_is_public): Declare.
* c-typeck.c (build_component_ref): Check objc_is_public.
(build_offsetof): New.
* stub-objc.c (objc_is_public): New.
* objc/objc-act.c, objc/objc-act.h (objc_is_public): Rename
from is_public.
* ginclude/stddef.h (offsetof): Use __builtin_offsetof.
* doc/extend.texi (Offsetof): Move from C++ section to C section
and rewrite for __builtin_offsetof.
cp/
* lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
* parser.c (struct cp_parser): Remove in_offsetof.
(cp_parser_new): Don't set it.
(cp_parser_unary_expression): Don't check it.
(cp_parser_postfix_open_square_expression): Split out from ...
(cp_parser_postfix_expression): ... here.
(cp_parser_postfix_dot_deref_expression): Likewise.
(cp_parser_builtin_offsetof): New.
(cp_parser_primary_expression): Use it.
testsuite/
* g++.dg/template/dependent-expr4.C: Use __builtin_offsetof.
From-SVN: r82549
|
|
PR c++/13275
* c-common.h (enum rid): Add RID_OFFSETOF.
* c-parser.in (rid_to_yy): Ignore RID_OFFSETOF.
* ginclude/stddef.h (offsetof): Reimplement for C++, using
__offsetof__.
* doc/extend.texi: Document __offsetof__.
PR c++/13275
* lex.c (reswords): Add "__offsetof" and "__offsetof__".
* parser.c (cp_parser): Add in_offsetof_p.
(cp_parser_new): Initialize it.
(cp_parser_primary_expression): Handle __offsetof__ (...).
(cp_parser_postfix_expression): Allow casts to pointer type and
uses of "->" in a constant expression if implementing offsetof.
(cp_parser_unary_expression): Allow the use of "&" in a constant
expression if implementing offsetof.
PR c++/13275
* g++.dg/other/offsetof2.C: Remove XFAIL.
* g++.dg/parse/offsetof1.C: New test.
* g++.gd/parse/offsetof2.C: Likewise.
From-SVN: r74702
|
|
PR c++/11072
* ginclude/stddef.h (offsetof): Remove cast to 'char &'. Explain why.
testsuite:
PR c++/11072
* g++.dg/other/offsetof2.C: XFAIL.
* g++.dg/other/offsetof5.C: New.
From-SVN: r68831
|
|
.: * ginclude/stddef.h: Provide C++ safe offsetof.
testsuite:
* g++.dg/other/offsetof2.C: New test.
From-SVN: r65936
|
|
* ginclude/float.h, ginclude/iso646.h, ginclude/stdarg.h,
ginclude/stdbool.h, ginclude/stddef.h: GCC, not GNU CC.
From-SVN: r64291
|
|
From-SVN: r57830
|
|
* ChangeLog: Follow spelling conventions.
* ChangeLog.0: Likewise.
* ChangeLog.1: Likewise.
* ChangeLog.2: Likewise.
* ChangeLog.4: Likewise.
* ChangeLog.6: Likewise.
* config.gcc: Likewise.
* dwarfout.c: Likewise.
* reload1.c: Likewise.
* simplify-rtx.c: Likewise.
* unwind-sjlj.c: Likewise.
* config/avr/avr.h: Likewise.
* config/d30v/d30v.h: Likewise.
* config/frv/frv.c: Likewise.
* config/frv/frv.h: Likewise.
* config/ip2k/ip2k.h: Likewise.
* config/m88k/m88k-move.sh: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/stormy16/stormy16.h: Likewise.
* doc/extend.texi: Likewise.
* doc/interface.texi: Likewise.
* doc/invoke.texi: Likewise.
* doc/md.texi: Likewise.
* doc/rtl.texi: Likewise.
* doc/tm.texi: Likewise.
* doc/trouble.texi: Likewise.
* ginclude/float.h: Likewise.
* treelang/treelang.texi: Likewise.
From-SVN: r57179
|
|
* Makefile.in (USER_H): Add ginclude/float.h.
(FLOAT_H): Remove.
(stmp-int-hdrs, install-mkheaders): Don't handle FLOAT_H.
(mostlyclean): Don't remove float.h intermediate files.
(distclean): Don't remove float.h.
* config.gcc: Remove all float_format references.
* configure.in (float_format, float_h_file): Remove.
* c-common.c: Include tree-inline.h.
(builtin_define_with_int_value): New.
(builtin_define_type_precision): Use it.
(builtin_define_float_constants): New.
(cb_register_builtins): Use it. Define __FLT_RADIX__ and
__FLT_EVAL_METHOD__.
* defaults.h (TARGET_FLT_EVAL_METHOD): New.
* config/i386/i386.h (TARGET_FLT_EVAL_METHOD): New.
* config/m68k/m68k.h (TARGET_FLT_EVAL_METHOD): New.
* doc/tm.texi (INTEL_EXTENDED_IEEE_FORMAT): Mention moto 96-bit format.
(TARGET_FLT_EVAL_METHOD): New.
* config/float-c4x.h, config/float-i128.h, config/float-i32.h,
config/float-i386.h, config/float-i64.h, config/float-m68k.h,
config/float-sh.h, config/float-sparc.h, config/float-vax.h: Remove.
* ginclude/float.h: New.
From-SVN: r56769
|
|
Darwin headers.
* ginclude/stddef.h (_BSD_SIZE_T_DEFINED_): Define if not defined,
plays nice with Darwin headers.
(_BSD_RUNE_T_DEFINED_): Likewise. (from Andr
Co-Authored-By: Andreas Tobler <toa@pop.agri.ch>
From-SVN: r55971
|
|
* ginclude/varargs.h: Replace with stub which issues #error.
* ginclude/stdarg.h: __builtin_stdarg_start is renamed
__builtin_va_start.
* builtins.def (BUILT_IN_VARARGS_START): Delete.
(BUILT_IN_VA_START): New.
* builtins.c (expand_builtin_va_start): Eliminate first
argument and code to implement pre-ISO varargs.
(std_expand_builtin_va_start): Ignore first argument; it is
always 1.
(expand_builtin): Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* function.c (assign_parms): Delete hide_last_arg and all
its uses.
(mark_varargs): Delete function.
* function.h (struct function): Delete 'varargs' bit.
(current_function_varargs): Delete macro.
* tree.h: Don't declare mark_varargs.
* c-decl.c (c_function_varargs, c_mark_varargs): Delete.
(c_expand_body): Don't call mark_varargs.
* c-objc-common.c: Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* c-tree.h: Don't declare c_mark_varargs.
* c-parse.in: Remove grammar rules for '&...' (which has been
commented out since before 2.7.2) and for '...' in K+R
argument declarations.
* builtins.c, function.c, integrate.c, sibcall.c,
config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h,
config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c,
config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c,
config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h,
config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h,
config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c,
config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16.c: Delete all references to
current_function_varargs, and code predicated on that flag.
* config/alpha/alpha.c (alpha_va_start),
config/arc/arc.c (arc_va_start),
config/i386/i386.c (ix86_va_start),
config/mips/mips.c (mips_va_start),
config/mn10300/mn10300.c (mn10300_va_start),
config/rs6000/rs6000.c (rs6000_va_start),
config/s390/s390.c (s390_va_start),
config/sh/sh.c (sh_va_start),
Ignore first argument; it is always 1.
* config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start.
* config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start.
* config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c:
Delete m68hc11_va_start.
* config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h:
No need to define EXPAND_BUILTIN_VA_START.
* doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi,
doc/trouble.texi: Remove references to GCC-provided <varargs.h>.
testsuite:
* c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c,
c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c,
c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c,
c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c:
Convert to use <stdarg.h>.
* c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x:
Delete.
* gcc.dg/va-arg-2.c: New.
* lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS.
From-SVN: r55472
|
|
* ginclude/stddef.h: Define _BSD_WCHAR_T_DEFINED_ if _BSD_WCHAR_T_
gets undefined. For Darwin.
From-SVN: r48672
|
|
${srcdir}/ginclude/ to every...
* configure.in: Prepend ${srcdir}/config/${cpu_type}/ instead of
${srcdir}/ginclude/ to every entry in extra_headers.
* configure: Regenerate.
* ginclude/math-3300.h: Rename to config/m68k/math-3300.h.
* ginclude/math-68881.h: Rename to config/m68k/math-68881.h.
* ginclude/ppc-asm.h: Rename to config/rs6000/ppc-asm.h.
* ginclude/proto.h: Rename to config/convex/proto.h.
From-SVN: r48454
|
|
2001-12-01 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* ginclude/ppc-asm.h (JUMP_TARGET): New macro.
* config/rs6000/tramp.asm: Use it.
From-SVN: r47509
|
|
From-SVN: r45539
|
|
From-SVN: r45209
|
|
* config/rs6000/eabi.asm: Define 64-bit versions of FPR
save/restore routines.
* ginclude/ppc-asm.h: Define 64-bit FUNC_* macros.
From-SVN: r44862
|
|
* config.gcc (powerpc-*-darwin*): Add native bits.
* config/darwin.c: New file, generic Darwin support functions.
* config/darwin.h: New file, generic Darwin definitions.
* config/darwin-protos.h: New file, generic Darwin prototypes.
* rs6000/darwin.h: New file, Darwin for PowerPC.
* rs6000/t-darwin: New file, Darwin makefile fragment.
* rs6000/rs6000.h (OBJECT_MACHO): New macro.
(TARGET_MACHO): Ditto.
(rs6000_abi): Add ABI_DARWIN.
(RS6000_REG_SAVE): Add ABI_DARWIN case.
(RS6000_SAVE_AREA): Ditto.
(FP_ARG_MAX_REG): Ditto.
(RETURN_ADDRESS_OFFSET): Ditto.
* rs6000/rs6000.c (rs6000_legitimize_address): Add TARGET_MACHO
cases.
(rs6000_emit_move): Add ABI_DARWIN cases.
(print_operand): Ditto.
(first_reg_to_save): Ditto.
(rs6000_stack_info): Ditto, also align stack by 16 instead of 8.
(debug_stack_info): Ditto.
(rs6000_emit_prologue): Ditto.
(rs6000_emit_epilogue): Ditto.
(output_profiler_hook): Ditto.
(output_function_profiler): Ditto.
(rs6000_add_gc_roots): Call machopic_add_gc_roots if TARGET_MACHO.
(output_mi_thunk): Add TARGET_MACHO case.
(add_compiler_stub): Ditto.
(output_compiler_stub): Ditto.
(no_previous_def): Ditto.
(output_call): Ditto.
(machopic_output_stub): Ditto.
(rs6000_machopic_legitimize_pic_address): Ditto.
(toc_section): Ditto.
* rs6000/rs6000.md (addsi3_high): New TARGET_MACHO pattern.
(macho_high): Ditto.
(macho_low): Ditto.
(movsi_low): Ditto.
(load_macho_picbase): Ditto.
(call): Add TARGET_MACHO case to modify function.
(call_value): Ditto.
(call_nonlocal_sysv): Add ABI_DARWIN case.
(call_value_nonlocal_sysv): Ditto.
* rs6000/rs6000-protos.h (rs6000_machopic_legitimize_pic_address):
Add prototype.
(machopic_output_stub): Ditto.
* ginclude/stddef.h: Test _BSD_WCHAR_T_DEFINED_.
From-SVN: r41277
|
|
* c-common.c (boolean_increment): New function.
* c-common.h (enum c_tree_index): Add CTI_C_BOOL_TYPE,
CTI_C_BOOL_TRUE and CTI_C_BOOL_FALSE.
(c_bool_type_node, c_bool_true_node, c_bool_false_node): Define.
(boolean_increment): Declare.
* c-convert.c (convert): Allow for BOOLEAN_TYPE.
* c-decl.c (init_decl_processing): Create boolean nodes.
(finish_struct): Allow for _Bool bitfields.
* c-parse.in (reswords): Add _Bool.
(rid_to_yy): Allow for RID_BOOL.
* c-typeck.c (default_conversion): Make booleans promote to int.
(convert_arguments, build_unary_op, build_modify_expr,
convert_for_assignment): Allow for booleans.
* ginclude/stdbool.h: Make conforming to C99.
cp:
* typeck.c (build_unary_op): Use boolean_increment from
c-common.c, moving the relevant code there.
testsuite:
* gcc.dg/c99-bool-1.c: New test.
From-SVN: r37428
|
|
* ginclude/stddef.h: Don't declare wint_t unless __need_wint_t.
* c-common.h (enum c_tree_index): Add CTI_WINT_TYPE.
(wint_type_node): Define.
* c-decl.c (WINT_TYPE): Define.
(init_decl_processing): Create the wint_type_node type.
* c-common.c (T_WI): Define.
(print_char_table): Use T_WI for %lc format.
From-SVN: r35481
|
|
* collect2.c (resolve_lib_name): Move '/' check to more rational place.
* ginclude/stddef.h (NULL): define for non-gnu C++ parsers as 0.
From-SVN: r34687
|
|
__builtin_va_start and __builtin_va_copy is now either a...
* c-common.c (c_common_nodes_and_builtins): The first parameter to
__builtin_va_start and __builtin_va_copy is now either a 'va_list'
or a reference to a va_list.
* builtins.c (stabilize_va_list): Simplify now we don't have to
work around C array address decay.
* c-typeck.c (convert_for_assignment): Handle assignment to
a reference parameter by taking the address of the RHS.
* ginclude/stdarg.h (va_start): Don't take address of first parameter.
(va_copy): Likewise.
(__va_copy): Likewise.
* ginclude/varargs.h (va_start): Likewise.
(__va_copy): Likewise.
From-SVN: r32821
|
|
From-SVN: r31988
|
|
* ginclude/ppc-asm.h (FUNC_START): Use USER_LABEL_PREFIX.
(FUNC_END): Likewise.
From-SVN: r31808
|
|
* configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* i386/t-beos, i386/x-beos, i386/xm-beos.h: New files.
* i386/beos-elf.h, i386/beos-pe.h: New files.
* Makefile.in (CROSS_SYSTEM_HEADER_DIR): New.
* cross-make (SYSTEM_HEADER_DIR): Define using
CROSS_SYSTEM_HEADER_DIR.
* gcc.c (LIBRARY_PATH_ENV): Provide default.
(process_command): Use it.
(main): Likewise. Kill trailing = from env vars.
(build_search_list): Put it back.
* collect2.c (main): Use LIBRARY_PATH_ENV.
* configure.in (GCC_NEED_DECLARATIONS): Add environ.
* toplev.c: Use NEED_DECLARATION_ENVIRON.
* tm.texi (Frame Layout): Document SMALL_STACK.
* c-common.c (c_common_nodes_and_builtins): Check it.
* system.h: Undef alloca after including glibc's <stdlib.h>,
if USE_C_ALLOCA is defined.
* gcc.c (set_input): New fn.
(main): After all input files are compiled, reset the input file
info to the first.
* aclocal.m4 (rindex, index): If already defined, don't attempt
to redefine.
* ginclude/varargs.h: (__va_list__): Define ifndef.
* ginclude/stdarg.h: Likewise.
* ginclude/stddef.h (__WCHAR_TYPE__) [BEOS]: Use int
instead of unsigned char.
* hash.h (true, false, boolean): Undef before enum.
From-SVN: r31366
|
|
From-SVN: r31201
|
|
* cccp.c (main): Define __STDC_VERSION__ as necessary.
* cppinit.c (cpp_handle_option): Likewise.
* ginclude/stdarg.h (va_copy): Use __STDC_VERSION__ to
determine when to define.
From-SVN: r31022
|
|
-lang-c89 and -std=*.
* cppp.c (main): Set trigraphs and __STRICT_ANSI__ as
appropriate for -lang-c89 and -std=*.
* cppinit.c (cpp_handle_option): Likewise.
(new_pending_define): New, split out from cpp_handle_option.
* gcc.c (default_compilers): Don't define __STRICT_ANSI__
or enable trigraphs for -ansi/-std=*.
* ginclude/stdarg.h (__va_copy): New.
(va_copy): Don't define for C89.
From-SVN: r30921
|
|
* config/t-freebsd: Do not override USER_H.
* ginclude/stddef.h: Generalize check for _MACHINE_ANSI_H_.
From-SVN: r30017
|
|
1999-09-23 10:56 -0700 Zack Weinberg <zack@bitmover.com>
* iso646.h, stdarg.h, stdbool.h, stddef.h, varargs.h: Add
copyright notice and special exception to GPL.
From-SVN: r29624
|
|
* Makefile.in (USER_H): Remove va-foo.h.
* ginclude/{va-alpha.h,va-arc.h,va-c4x.h,va-clipper.h,va-h8300.h,
va-i860.h,va-i960.h,va-m32r.h,va-m88k.h,va-mips.h,va-mn10200.h,
va-mn10300.h,va-pa.h,va-ppc.h,va-pyr.h,va-sh.h,va-sparc.h,
va-spur.h,va-v850.h}: Remove.
From-SVN: r29424
|
|
* ginclude/stdarg.h, ginclude/varargs.h: Implement in
terms of builtin functions and types.
From-SVN: r29416
|
|
1999-08-29 08:38 -0700 Zack Weinberg <zack@bitmover.com>
* stdbool.h: Make the typedef name _Bool, with bool a #defined
alias.
From-SVN: r28972
|
|
From-SVN: r28311
|
|
* rs6000.h (struct rs6000_args): Add sysv_gregno.
* rs6000.c (init_cumulative_args): Init sysv_gregno.
(function_arg_boundary): Align DFmode.
(function_arg_advance): Restructure for ABI_V4; use sysv_gregno
to get fp reg and stack overflow correct.
(function_arg): Likewise.
(function_arg_pass_by_reference): True for TFmode for ABI_V4.
(setup_incoming_varargs): Restructure for ABI_V4; use
function_arg_advance to skip final named argument.
(expand_builtin_saveregs): Properly unskip the last integer arg
when doing varargs. Adjust overflow location calculation.
* ginclude/va-ppc.h (struct __va_list_tag): Make gpr and fpr
explicitly unsigned.
(__VA_FP_REGSAVE): Use new OFS argument instead of AP->fpr directly.
(__VA_GP_REGSAVE): Similarly.
(__va_longlong_p): Delete.
(__va_arg_type_violation): New declaration.
(va_arg): Restructure. Flag promotion errors. Align double.
TFmode passed by reference.
* rs6000.md (movdi_32+1): Use GEN_INT after arithmetic
in the HOST_BITS_PER_WIDE_INT > 32 case.
From-SVN: r28199
|
|
X
* ginclude/varargs.h (__builtin_va_alist_t): New typedef.
(va_dcl): Use __builtin_va_alist_t.
From-SVN: r27971
|
|
* ginclude/varargs.h (va_dcl): Use word_mode for type of
__builtin_va_list.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r27911
|
|
David Edelsohn <edelsohn@gnu.org>
* ginclude/stdarg.h (__va_rounded_size): Use long type for
rounding on AIX.
* ginclude/varargs.h: Likewise.
From-SVN: r26837
|
|
* va-ppc.h (__va_start_common): Let __builtin_saveregs do the work.
* rs6000.c (expand_builtin_saveregs): For V4, initialize a private
va_list struct, and return a pointer to it.
(setup_incoming_varargs): V4 save area based off virtual_stack_vars
instead of frame_pointer.
From-SVN: r26710
|
|
* sh.h (PASS_IN_REG_P): For TARGET_HITACHI, don't pass structures
in registers.
* expr.h (PRETEND_OUTGOING_VARARGS_NAMED): Provide default definition.
* function.c (assign_parms): Honour PRETEND_OUTGOING_VARARGS_NAMED.
* calls.c (expand_call): Likewise.
* sh.c (sh_expand_prologue): For TARGET_HITACHI, don't push varargs /
stdarg arguments.
* sh.h (CPP_SPEC): Add -D__HITACHI__ for -mhitachi.
(FUNCTION_ARG): For TARGET_HITACHI, don't pass unnamed
arguments in registers.
(PRETEND_OUTGOING_VARARGS_NAMED): Define.
* va-sh.h (entire file): If __HITACHI__ is defined, use sh[123]
flavour varargs.
From-SVN: r25440
|
|
From-SVN: r24349
|
|
* config/sh/lib1funcs.asm (___movstr_i4_even, ___movstr_i4_odd): Define.
(___movstrSI12_i4, ___sdivsi3_i4, ___udivsi3_i4): Define.
* sh.c (reg_class_from_letter, regno_reg_class): Add DF_REGS.
(fp_reg_names, assembler_dialect): New variables.
(print_operand_address): Handle SUBREGs.
(print_operand): Added 'o' case.
Don't use adj_offsettable_operand on PRE_DEC / POST_INC.
Name of FP registers depends on mode.
(expand_block_move): Emit different code for SH4 hardware.
(prepare_scc_operands): Use emit_sf_insn / emit_df_insn as appropriate.
(from_compare): Likewise.
(add_constant): New argument last_value. Changed all callers.
(find_barrier): Don't try HImode load for FPUL_REG.
(machine_dependent_reorg): Likewise.
(sfunc_uses_reg): A CLOBBER cannot be the address register use.
(gen_far_branch): Emit a barrier after the new jump.
(barrier_align): Don't trust instruction lengths before
fixing up pcloads.
(machine_dependent_reorg): Add support for FIRST_XD_REG .. LAST_XD_REG.
Use auto-inc addressing for fp registers if doubles need to
be loaded in two steps.
Set sh_flag_remove_dead_before_cse.
(push): Support for TARGET_FMOVD. Use gen_push_fpul for fpul.
(pop): Support for TARGET_FMOVD. Use gen_pop_fpul for fpul.
(calc_live_regs): Support for TARGET_FMOVD. Don't save FPSCR.
Support for FIRST_XD_REG .. LAST_XD_REG.
(sh_expand_prologue): Support for FIRST_XD_REG .. LAST_XD_REG.
(sh_expand_epilogue): Likewise.
(sh_builtin_saveregs): Use DFmode moves for fp regs on SH4.
(initial_elimination_offset): Take TARGET_ALIGN_DOUBLE into account.
(arith_reg_operand): FPUL_REG is OK for SH4.
(fp_arith_reg_operand, fp_extended_operand) New functions.
(tertiary_reload_operand, fpscr_operand): Likewise.
(commutative_float_operator, noncommutative_float_operator): Likewise.
(binary_float_operator, get_fpscr_rtx, emit_sf_insn): Likewise.
(emit_df_insn, expand_sf_unop, expand_sf_binop): Likewise.
(expand_df_unop, expand_df_binop, expand_fp_branch): Likewise.
(emit_fpscr_use, mark_use, remove_dead_before_cse): Likewise.
* sh.h (CPP_SPEC): Add support for -m4, m4-single, m4-single-only.
(CONDITIONAL_REGISTER_USAGE): Likewise.
(HARD_SH4_BIT, FPU_SINGLE_BIT, SH4_BIT, FMOVD_BIT): Define.
(TARGET_CACHE32, TARGET_SUPERSCALAR, TARGET_HARWARD): Define.
(TARGET_HARD_SH4, TARGET_FPU_SINGLE, TARGET_SH4, TARGET_FMOVD): Define.
(target_flag): Add -m4, m4-single, m4-single-only, -mfmovd.
(OPTIMIZATION_OPTIONS): If optimizing, set flag_omit_frame_pointer
to -1 and sh_flag_remove_dead_before_cse to 1.
(ASSEMBLER_DIALECT): Define to assembler_dialect.
(assembler_dialect, fp_reg_names): Declare.
(OVERRIDE_OPTIONS): Add code for TARGET_SH4.
Hide names of registers that are not accessible.
(CACHE_LOG): Take TARGET_CACHE32 into account.
(LOOP_ALIGN): Take TARGET_HARWARD into account.
(FIRST_XD_REG, LAST_XD_REG, FPSCR_REG): Define.
(FIRST_PSEUDO_REGISTER: Now 49.
(FIXED_REGISTERS, CALL_USED_REGISTERS): Include values for registers.
(HARD_REGNO_NREGS): Special treatment of FIRST_XD_REG .. LAST_XD_REG.
(HARD_REGNO_MODE_OK): Update.
(enum reg_class): Add DF_REGS and FPSCR_REGS.
(REG_CLASS_NAMES, REG_CLASS_CONTENTS, REG_ALLOC_ORDER): Likewise.
(SECONDARY_OUTPUT_RELOAD_CLASS, SECONDARY_INPUT_RELOAD_CLASS): Update.
(CLASS_CANNOT_CHANGE_SIZE, DEBUG_REGISTER_NAMES): Define.
(NPARM_REGS): Eight floating point parameter registers on SH4.
(BASE_RETURN_VALUE_REG): SH4 also passes double values
in floating point registers.
(GET_SH_ARG_CLASS) Likewise.
Complex float types are also returned in float registers.
(BASE_ARG_REG): Complex float types are also passes in float registers.
(FUNCTION_VALUE): Change mode like PROMOTE_MODE does.
(LIBCALL_VALUE): Remove trailing semicolon.
(ROUND_REG): Round when double precision value is passed in floating
point register(s).
(FUNCTION_ARG_ADVANCE): No change wanted for SH4 when things are
passed on the stack.
(FUNCTION_ARG): Little endian adjustment for SH4 SFmode.
(FUNCTION_ARG_PARTIAL_NREGS): Zero for SH4.
(TRAMPOLINE_ALIGNMENT): Take TARGET_HARWARD into account.
(INITIALIZE_TRAMPOLINE): Emit ic_invalidate_line for TARGET_HARWARD.
(MODE_DISP_OK_8): Not for SH4 DFmode.
(GO_IF_LEGITIMATE_ADDRESS): No base reg + index reg for SH4 DFmode.
Allow indexed addressing for PSImode after reload.
(LEGITIMIZE_ADDRESS): Not for SH4 DFmode.
(LEGITIMIZE_RELOAD_ADDRESS): Handle SH3E SFmode.
Don't change SH4 DFmode nor PSImode RELOAD_FOR_INPUT_ADDRESS.
(DOUBLE_TYPE_SIZE): 64 for SH4.
(RTX_COSTS): Add PLUS case.
Increae cost of ASHIFT, ASHIFTRT, LSHIFTRT case.
(REGISTER_MOVE_COST): Add handling of R0_REGS, FPUL_REGS, T_REGS,
MAC_REGS, PR_REGS, DF_REGS.
(REGISTER_NAMES): Use fp_reg_names.
(enum processor_type): Add PROCESSOR_SH4.
(sh_flag_remove_dead_before_cse): Declare.
(rtx_equal_function_value_matters, fpscr_rtx, get_fpscr_rtx): Declare.
(PREDICATE_CODES): Add binary_float_operator,
commutative_float_operator, fp_arith_reg_operand, fp_extended_operand,
fpscr_operand, noncommutative_float_operator.
(ADJUST_COST): Use different scale for TARGET_SUPERSCALAR.
(SH_DYNAMIC_SHIFT_COST): Cheaper for SH4.
* sh.md (attribute cpu): Add value sh4.
(attrbutes fmovd, issues): Define.
(attribute type): Add values dfp_arith, dfp_cmp, dfp_conv, dfdiv.
(function units memory, int, mpy, fp): Make dependent on issue rate.
(function units issue, single_issue, load_si, load): Define.
(function units load_store, fdiv, gp_fpul): Define.
(attribute hit_stack): Provide proper default.
(use_sfunc_addr+1, udivsi3): Predicated on ! TARGET_SH4.
(udivsi3_i4, udivsi3_i4_single, divsi3_i4, divsi3_i4_single): New insns.
(udivsi3, divsi3): Emit special patterns for SH4 hardware,
(mulsi3_call): Now uses match_operand for function address.
(mulsi3): Also emit code for SH1 case. Wrap result in REG_LIBCALL /
REG_RETVAL notes.
(push, pop, push_e, pop_e): Now define_expands.
(push_fpul, push_4, pop_fpul, pop_4, ic_invalidate_line): New expanders.
(movsi_ie): Added y/i alternative.
(ic_invalidate_line_i, movdf_i4): New insns.
(movdf_i4+[123], reload_outdf+[12345], movsi_y+[12]): New splitters.
(reload_indf, reload_outdf, reload_outsf, reload_insi): New expanders.
(movdf): Add special code for SH4.
(movsf_ie, movsf_ie+1, reload_insf, calli): Make use of fpscr visible.
(call_valuei, calli, call_value): Likewise.
(movsf): Emit no-op move.
(mov_nop, movsi_y): New insns.
(blt, sge): generalize to handle DFmode.
(return predicate): Call emit_fpscr_use and remove_dead_before_cse.
(block_move_real, block_lump_real): Predicate on ! TARGET_HARD_SH4.
(block_move_real_i4, block_lump_real_i4, fpu_switch): New insns.
(fpu_switch0, fpu_switch1, movpsi): New expanders.
(fpu_switch+[12], fix_truncsfsi2_i4_2+1): New splitters.
(toggle_sz): New insn.
(addsf3, subsf3, mulsf3, divsf3): Now define_expands.
(addsf3_i, subsf3_i, mulsf3_i4, mulsf3_ie, divsf3_i): New insns.
(macsf3): Make use of fpscr visible. Disable for SH4.
(floatsisf2): Make use of fpscr visible.
(floatsisf2_i4): New insn.
(floatsisf2_ie, fixsfsi, cmpgtsf_t, cmpeqsf_t): Disable for SH4.
(ieee_ccmpeqsf_t): Likewise.
(fix_truncsfsi2): Emit different code for SH4.
(fix_truncsfsi2_i4, fix_truncsfsi2_i4_2, cmpgtsf_t_i4): New insns.
(cmpeqsf_t_i4, ieee_ccmpeqsf_t_4): New insns.
(negsf2, sqrtsf2, abssf2): Now expanders.
(adddf3, subdf3i, muldf2, divdf3, floatsidf2): New expanders.
(negsf2_i, sqrtsf2_i, abssf2_i, adddf3_i, subdf3_i): New insns.
(muldf3_i, divdf3_i, floatsidf2_i, fix_truncdfsi2_i): New insns.
(fix_truncdfsi2, cmpdf, negdf2, sqrtdf2, absdf2): New expanders.
(fix_truncdfsi2_i4, cmpgtdf_t, cmpeqdf_t, ieee_ccmpeqdf_t): New insns.
(fix_truncdfsi2_i4_2+1): New splitters.
(negdf2_i, sqrtdf2_i, absdf2_i, extendsfdf2_i4): New insns.
(extendsfdf2, truncdfsf2): New expanders.
(truncdfsf2_i4): New insn.
* t-sh (LIB1ASMFUNCS): Add _movstr_i4, _sdivsi3_i4, _udivsi3_i4.
(MULTILIB_OPTIONS): Add m4-single-only/m4-single/m4.
* float-sh.h: When testing for __SH3E__, also test for
__SH4_SINGLE_ONLY__ .
* va-sh.h (__va_freg): Define to float.
(__va_greg, __fa_freg, __gnuc_va_list, va_start):
Define for __SH4_SINGLE_ONLY__ like for __SH3E__ .
(__PASS_AS_FLOAT, __TARGET_SH4_P): Likewise.
(__PASS_AS_FLOAT): Use different definition for __SH4__ and
__SH4_SINGLE__.
(TARGET_SH4_P): Define.
(va_arg): Use it.
* sh.md (movdf_k, movsf_i): Tweak the condition so that
init_expr_once is satisfied about the existence of load / store insns.
* sh.md (movsi_i, movsi_ie, movsi_i_lowpart, movsf_i, movsf_ie):
change m constraint in source operand to mr / mf .
* va-sh.h (__va_arg_sh1): Use __asm instead of asm.
* (__VA_REEF): Define.
(__va_arg_sh1): Use it.
* va-sh.h (va_start, va_arg, va_copy): Add parenteses.
From-SVN: r23777
|