public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug modula2/108143] LONGREAL and powerpc64le-linux
Date: Tue, 19 Sep 2023 18:24:30 +0000	[thread overview]
Message-ID: <bug-108143-4-9qaUpISwLd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108143-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108143

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:81d5ca0b9b8431f1bd7a5ec8a2c94f04bb0cf032

commit r14-4149-g81d5ca0b9b8431f1bd7a5ec8a2c94f04bb0cf032
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Tue Sep 19 19:23:03 2023 +0100

    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>

  parent reply	other threads:[~2023-09-19 18:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 10:09 [Bug modula2/108143] New: " jakub at gcc dot gnu.org
2022-12-16 11:03 ` [Bug modula2/108143] " rguenth at gcc dot gnu.org
2022-12-16 11:07 ` jakub at gcc dot gnu.org
2022-12-16 15:08 ` gaius at gcc dot gnu.org
2022-12-16 15:46 ` segher at gcc dot gnu.org
2023-08-20 22:28 ` cvs-commit at gcc dot gnu.org
2023-08-21 23:16 ` gaius at gcc dot gnu.org
2023-08-21 23:17 ` gaius at gcc dot gnu.org
2023-08-22  0:05 ` gaius at gcc dot gnu.org
2023-08-22  3:46 ` gaius at gcc dot gnu.org
2023-09-17 18:35 ` gaius at gcc dot gnu.org
2023-09-19 13:51 ` gaius at gcc dot gnu.org
2023-09-19 18:24 ` cvs-commit at gcc dot gnu.org [this message]
2023-09-19 18:35 ` gaius at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108143-4-9qaUpISwLd@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).