Find a file
Gaius Mulley 81d5ca0b9b PR 108143/modula2 LONGREAL and powerpc64le-linux
This patch introduces a configure for LONGREAL as float128 when
targetting or hosting cc1gm2 on ppc64le.  It fixes calls to builtins
and fixes the -fdebug-builtins option.

gcc/ChangeLog:

	* doc/gm2.texi (fdebug-builtins): Correct description.

gcc/m2/ChangeLog:

	* Make-lang.in (host_mc_longreal): Detect hosting on powerpc64le
	and if so use __float128 for longreal in mc.
	(MC_ARGS): Append host_mc_longreal.
	* config-make.in (TEST_TARGET_CPU_DEFAULT): New variable.
	(TEST_HOST_CPU_DEFAULT): New variable.
	* configure: Regenerate.
	* configure.ac (M2C_LONGREAL_FLOAT128): New define set if target
	is powerpc64le.
	(M2C_LONGREAL_PPC64LE): New define set if target is powerpc64le.
	* gm2-compiler/M2GCCDeclare.mod: Correct comment case.
	* gm2-compiler/M2GenGCC.mod (MaybeDebugBuiltinAlloca): Call
	SetLastFunction for the builtin function call.
	(MaybeDebugBuiltinMemcpy): Call SetLastFunction for the builtin
	function call.
	(MaybeDebugBuiltinMemset): New procedure function.
	(MakeCopyUse): Use GNU formatting.
	(UseBuiltin): Rewrite to check BuiltinExists.
	(CodeDirectCall): Rewrite to check BuiltinExists and call
	SetLastFunction.
	(CodeMakeAdr): Re-format.
	* gm2-compiler/M2Options.def (SetDebugBuiltins): New procedure.
	* gm2-compiler/M2Options.mod (SetUninitVariableChecking): Allow
	"cond" to switch UninitVariableConditionalChecking separately.
	(SetDebugBuiltins): New procedure.
	* gm2-compiler/M2Quads.def (BuildFunctionCall): Add parameter
	ConstExpr.
	* gm2-compiler/M2Quads.mod (BuildRealProcedureCall): Add parameter
	to BuildRealFuncProcCall.
	(BuildRealFuncProcCall): Add ConstExpr parameter.  Pass ConstExpr
	to BuildFunctionCall.
	(BuildFunctionCall): Add parameter ConstExpr.  Pass ConstExpr to
	BuildRealFunctionCall.
	(BuildConstFunctionCall): Add parameter ConstExpr.  Pass ConstExpr to
	BuildFunctionCall.
	(BuildRealFunctionCall): Add parameter ConstExpr.  Pass ConstExpr to
	BuildRealFuncProcCall.
	* gm2-compiler/P3Build.bnf (SetOrDesignatorOrFunction): Pass FALSE
	to BuildFunctionCall.
	(AssignmentOrProcedureCall): Pass FALSE to BuildFunctionCall.
	* gm2-compiler/SymbolTable.def (IsProcedureBuiltinAvailable): New
	procedure function.
	* gm2-compiler/SymbolTable.mod (CanUseBuiltin): New procedure
	function.
	(IsProcedureBuiltinAvailable): New procedure function.
	* gm2-gcc/m2builtins.cc (DEBUGGING): Undef.
	(bf_category): New enum type.
	(struct builtin_function_entry): New field function_avail.
	(m2builtins_BuiltInMemCopy): Rename from ...
	(m2builtins_BuiltinMemCopy): ... this.
	(DoBuiltinMemSet): New function.
	(m2builtins_BuiltinMemSet): New function.
	(do_target_support_exists): New function.
	(target_support_exists): New function.
	(m2builtins_BuiltinExists): Return true or false.
	(m2builtins_BuildBuiltinTree): Rename local variables.
	Replace long_double_type_node with GetM2LongRealType.
	(m2builtins_init): Use GetM2LongRealType rather than
	long_double_type_node.
	* gm2-gcc/m2builtins.def (BuiltInMemCopy): Rename to ...
	(BuiltinMemCopy): ... this.
	(BuiltinMemSet): New procedure function.
	* gm2-gcc/m2builtins.h (m2builtins_BuiltInMemCopy): Rename to ...
	(m2builtins_BuiltinMemCopy): ... this.
	(m2builtins_BuiltinMemSet): New procedure function.
	* gm2-gcc/m2configure.cc (m2configure_M2CLongRealFloat128): New
	procedure function.
	(m2configure_M2CLongRealIBM128): New procedure function.
	(m2configure_M2CLongRealLongDouble): New procedure function.
	(m2configure_M2CLongRealLongDoublePPC64LE): New procedure function.
	* gm2-gcc/m2configure.def (M2CLongRealFloat128): New procedure function.
	(M2CLongRealIBM128): New procedure function.
	(M2CLongRealLongDouble): New procedure function.
	(M2CLongRealLongDoublePPC64LE): New procedure function.
	* gm2-gcc/m2configure.h (m2configure_FullPathCPP): New procedure function.
	(m2configure_M2CLongRealFloat128): New procedure function.
	(m2configure_M2CLongRealIBM128): New procedure function.
	(m2configure_M2CLongRealLongDouble): New procedure function.
	(m2configure_M2CLongRealLongDoublePPC64LE): New procedure function.
	* gm2-gcc/m2convert.cc (m2convert_BuildConvert): Use convert_loc.
	* gm2-gcc/m2options.h (M2Options_SetDebugBuiltins): New function.
	* gm2-gcc/m2statement.cc (m2statement_BuildAssignmentTree): Set
	TREE_USED to true.
	(m2statement_BuildGoto):Set TREE_USED to true.
	(m2statement_BuildParam): Set TREE_USED to true.
	(m2statement_BuildBuiltinCallTree): New function.
	(m2statement_BuildFunctValue): Set TREE_USED to true.
	* gm2-gcc/m2statement.def (BuildBuiltinCallTree): New procedure function.
	* gm2-gcc/m2statement.h (m2statement_BuildBuiltinCallTree): New
	procedure function.
	* gm2-gcc/m2treelib.cc (m2treelib_DoCall0): Remove spacing.
	(m2treelib_DoCall1): Remove spacing.
	(m2treelib_DoCall2): Remove spacing.
	(m2treelib_DoCall3): Remove spacing.
	(add_stmt): Rename parameter.
	* gm2-gcc/m2type.cc (build_set_type): Remove spacing.
	(build_m2_specific_size_type): Remove spacing.
	(finish_build_pointer_type): Remove spacing.
	(m2type_BuildVariableArrayAndDeclare): Remove spacing.
	(build_m2_short_real_node): Remove spacing.
	(build_m2_real_node): Remove spacing.
	(build_m2_long_real_node): Use float128_type_node if
	M2CLongRealFloat128 is set.
	(build_m2_ztype_node): Remove spacing.
	(build_m2_long_int_node): Remove spacing.
	(build_m2_long_card_node): Remove spacing.
	(build_m2_short_int_node): Remove spacing.
	(build_m2_short_card_node): Remove spacing.
	(build_m2_iso_loc_node): Remove spacing.
	(m2type_SameRealType): New function.
	(m2type_InitBaseTypes): Create m2_c_type_node using
	m2_long_complex_type_node.
	(m2type_SetAlignment): Tidy up comment.
	* gm2-gcc/m2type.def (SameRealType):  New procedure function.
	* gm2-gcc/m2type.h (m2type_SameRealType): New procedure function.
	* gm2-lang.cc (gm2_langhook_type_for_mode): Build long complex
	node from m2 language specific long double node.
	* gm2-libs-log/RealConversions.mod (IsNan): New procedure
	function.
	(doPowerOfTen): Re-implement.
	* gm2-libs/Builtins.mod: Add newline.
	* gm2-libs/DynamicStrings.def (ReplaceChar): New procedure function.
	* gm2-libs/DynamicStrings.mod (ReplaceChar): New procedure function.
	* gm2config.aci.in (M2C_LONGREAL_FLOAT128): New config value.
	(M2C_LONGREAL_PPC64LE): New config value.
	* gm2spec.cc (lang_specific_driver): New local variable
	need_default_mabi set to default value depending upon
	M2C_LONGREAL_PPC64LE and M2C_LONGREAL_FLOAT128.
	* lang.opt (Wcase-enum): Moved to correct section.
	* m2pp.cc (m2pp_real_type): New function.
	(m2pp_type): Call m2pp_real_type.
	(m2pp_print_mode): New function.
	(m2pp_simple_type): Call m2pp_simple_type.
	(m2pp_float): New function.
	(m2pp_expression): Call m2pp_float.
	* mc-boot/GDynamicStrings.cc: Rebuild.
	* mc-boot/GDynamicStrings.h: Rebuild.
	* mc-boot/GFIO.cc: Rebuild.
	* mc-boot/GFIO.h: Rebuild.
	* mc-boot/GIO.cc: Rebuild.
	* mc-boot/GRTint.cc: Rebuild.
	* mc-boot/Gdecl.cc: Rebuild.
	* mc-boot/GmcOptions.cc: Rebuild.
	* mc-boot/GmcOptions.h: Rebuild.
	* mc/decl.mod: Rebuild.
	* mc/mcOptions.def (getCRealType): New procedure function.
	(getCLongRealType): New procedure function.
	(getCShortRealType): New procedure function.
	* mc/mcOptions.mod (getCRealType): New procedure function.
	(getCLongRealType): New procedure function.
	(getCShortRealType): New procedure function.

libgm2/ChangeLog:

	* Makefile.am (TARGET_LONGDOUBLE_ABI): New variable set to
	-mabi=ieeelongdouble if the target is powerpc64le.
	(AM_MAKEFLAGS): Append TARGET_LONGDOUBLE_ABI.
	* Makefile.in: Rebuild.
	* libm2cor/Makefile.am (AM_MAKEFLAGS): Add CFLAGS_LONGDOUBLE and
	TARGET_LONGDOUBLE_ABI.
	(libm2cor_la_CFLAGS): Add TARGET_LONGDOUBLE_ABI.
	(libm2cor_la_M2FLAGS): Add TARGET_LONGDOUBLE_ABI.
	* libm2cor/Makefile.in: Rebuild.
	* libm2iso/Makefile.am (AM_MAKEFLAGS): Add CFLAGS_LONGDOUBLE and
	TARGET_LONGDOUBLE_ABI.
	(libm2iso_la_CFLAGS): Add TARGET_LONGDOUBLE_ABI.
	(libm2iso_la_M2FLAGS): Add TARGET_LONGDOUBLE_ABI.
	* libm2iso/Makefile.in: Rebuild.
	* libm2log/Makefile.am (AM_MAKEFLAGS): Add CFLAGS_LONGDOUBLE and
	TARGET_LONGDOUBLE_ABI.
	(libm2log_la_CFLAGS): Add TARGET_LONGDOUBLE_ABI.
	(libm2log_la_M2FLAGS): Add TARGET_LONGDOUBLE_ABI.
	* libm2log/Makefile.in: Rebuild.
	* libm2min/Makefile.am (AM_MAKEFLAGS): Add CFLAGS_LONGDOUBLE and
	TARGET_LONGDOUBLE_ABI.
	(libm2min_la_CFLAGS): Add TARGET_LONGDOUBLE_ABI.
	(libm2min_la_M2FLAGS): Add TARGET_LONGDOUBLE_ABI.
	* libm2min/Makefile.in: Rebuild.
	* libm2pim/Makefile.am (AM_MAKEFLAGS): Add CFLAGS_LONGDOUBLE and
	TARGET_LONGDOUBLE_ABI.
	(libm2pim_la_CFLAGS): Add TARGET_LONGDOUBLE_ABI.
	(libm2pim_la_M2FLAGS): Add TARGET_LONGDOUBLE_ABI.
	* libm2pim/Makefile.in: Rebuild.

gcc/testsuite/ChangeLog:

	* gm2/extensions/pass/libc.def: Add spacing.
	* gm2/pimlib/logitech/run/pass/realconv.mod: Add debugging print.
	* gm2/switches/uninit-variable-checking/cascade/fail/switches-uninit-variable-checking-cascade-fail.exp:
	Add -fdebug-builtins flag.
	* lib/gm2.exp (gm2_target_compile_default): Add
	-mabi=ieeelongdouble if the target is powerpc.
	(gm2_link_flags): Add
	-mabi=ieeelongdouble if the target is powerpc.
	* gm2/pim/intrinsic/run/pass/cstub.c: New test.
	* gm2/pim/intrinsic/run/pass/cstub.def: New test.
	* gm2/pim/intrinsic/run/pass/pim-intrinsic-run-pass.exp: New test.
	* gm2/pim/intrinsic/run/pass/test.mod: New test.
	* gm2/pim/run/pass/builtins.mod: New test.
	* gm2/pim/run/pass/convert1.mod: New test.
	* gm2/pim/run/pass/longint1.mod: New test.
	* gm2/pim/run/pass/longint2.mod: New test.
	* gm2/pim/run/pass/longint3.mod: New test.
	* gm2/pim/run/pass/longint4.mod: New test.
	* gm2/pim/run/pass/longint5.mod: New test.
	* gm2/pim/run/pass/longint6.mod: New test.
	* gm2/pim/run/pass/longint7.mod: New test.
	* gm2/pim/run/pass/longint8.mod: New test.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-09-19 19:23:03 +01:00
c++tools Daily bump. 2023-06-23 00:16:38 +00:00
config Daily bump. 2023-09-16 00:17:55 +00:00
contrib Daily bump. 2023-09-13 00:18:00 +00:00
fixincludes Daily bump. 2023-08-18 00:16:52 +00:00
gcc PR 108143/modula2 LONGREAL and powerpc64le-linux 2023-09-19 19:23:03 +01:00
gnattools Daily bump. 2023-04-26 00:17:46 +00:00
gotools Daily bump. 2022-08-31 00:16:45 +00:00
include Daily bump. 2023-08-23 00:17:59 +00:00
INSTALL
intl Daily bump. 2023-08-08 00:17:37 +00:00
libada Daily bump. 2023-08-08 00:17:37 +00:00
libatomic Daily bump. 2023-08-08 00:17:37 +00:00
libbacktrace Daily bump. 2023-08-08 00:17:37 +00:00
libcc1 Daily bump. 2023-08-12 00:17:36 +00:00
libcody Daily bump. 2023-06-16 00:17:18 +00:00
libcpp Daily bump. 2023-09-07 00:17:36 +00:00
libdecnumber Daily bump. 2023-06-16 00:17:18 +00:00
libffi Daily bump. 2023-08-24 00:18:18 +00:00
libgcc Daily bump. 2023-09-07 00:17:36 +00:00
libgfortran Daily bump. 2023-08-08 00:17:37 +00:00
libgm2 PR 108143/modula2 LONGREAL and powerpc64le-linux 2023-09-19 19:23:03 +01:00
libgo libgo: fix DejaGNU testsuite compiler when using build sysroot 2023-09-12 13:19:42 -07:00
libgomp libgomp: Handle NULL environ like pointer to NULL pointer [PR111413] 2023-09-19 09:26:35 +02:00
libiberty Daily bump. 2023-08-23 00:17:59 +00:00
libitm Daily bump. 2023-08-08 00:17:37 +00:00
libobjc Daily bump. 2023-08-08 00:17:37 +00:00
libphobos Daily bump. 2023-08-21 00:17:21 +00:00
libquadmath Daily bump. 2023-08-08 00:17:37 +00:00
libsanitizer Daily bump. 2023-08-08 00:17:37 +00:00
libssp Daily bump. 2023-08-08 00:17:37 +00:00
libstdc++-v3 c++: Move consteval folding to cp_fold_r 2023-09-19 09:24:44 -04:00
libvtv Daily bump. 2023-08-08 00:17:37 +00:00
lto-plugin Daily bump. 2023-08-08 00:17:37 +00:00
maintainer-scripts Daily bump. 2023-07-08 00:16:53 +00:00
zlib Daily bump. 2023-08-08 00:17:37 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2023-09-19 00:17:49 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in LoongArch: Reimplement multilib build option handling. 2023-09-15 10:42:12 +08:00
config.guess
config.rpath
config.sub
configure LoongArch: Reimplement multilib build option handling. 2023-09-15 10:42:12 +08:00
configure.ac LoongArch: Reimplement multilib build option handling. 2023-09-15 10:42:12 +08:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 libtool.m4: augment symcode for Solaris 11 2023-08-07 22:59:41 +02:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Add myself to write after approval 2023-09-18 09:43:54 +00:00
Makefile.def toplevel: Makefile.def: add install-strip dependency on libsframe 2023-08-07 22:59:42 +02:00
Makefile.in Pass 'SYSROOT_CFLAGS_FOR_TARGET' down to target libraries [PR109951] 2023-09-12 11:30:37 +02:00
Makefile.tpl Pass 'SYSROOT_CFLAGS_FOR_TARGET' down to target libraries [PR109951] 2023-09-12 11:30:37 +02:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.