public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Michael Meissner <meissner@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work062)] Revert patches. Date: Mon, 2 Aug 2021 01:26:00 +0000 (GMT) [thread overview] Message-ID: <20210802012600.945ED385040A@sourceware.org> (raw) https://gcc.gnu.org/g:e0282d1af20af409ed79b2fbaf81092bf393904e commit e0282d1af20af409ed79b2fbaf81092bf393904e Author: Michael Meissner <meissner@linux.ibm.com> Date: Sun Aug 1 21:24:14 2021 -0400 Revert patches. 2021-07-31 Michael Meissner <meissner@linux.ibm.com> gcc/ Revert patch. * config/rs6000/rs6000.c (rs6000_asm_operand_p): New function. (TARGET_MD_ASM_OPERAND_P): Override md_asm_operand_p hook. * ChangeLog.meissner: Update. gcc/testsuite/ Revert patch. * gcc.target/powerpc/pr98519.c: New test. * ChangeLog.meissner: Update. gcc/ Rever patch. * doc/tm.texi (TARGET_MD_ASM_OPERAND_P): Document. * doc/tm.texi.in (TARGET_MD_ASM_OPERAND_P): Document. * target.def (md_asm_operand_p): New target hook. * targhooks.c (default_md_asm_operand_p): New default target hook. * targhooks.h (default_md_asm_operand_p): New declaration. * ChangeLog.meissner: Update. Diff: --- gcc/ChangeLog.meissner | 18 ------------------ gcc/config/rs6000/rs6000.c | 28 ---------------------------- gcc/doc/tm.texi | 11 ----------- gcc/doc/tm.texi.in | 2 -- gcc/recog.c | 4 ---- gcc/target.def | 15 --------------- gcc/targhooks.c | 7 ------- gcc/targhooks.h | 1 - gcc/testsuite/ChangeLog.meissner | 6 ------ gcc/testsuite/gcc.target/powerpc/pr98519.c | 20 -------------------- 10 files changed, 112 deletions(-) diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner index 2b59818d1e2..7aa07f294c9 100644 --- a/gcc/ChangeLog.meissner +++ b/gcc/ChangeLog.meissner @@ -1,21 +1,3 @@ -work062-patch002: -2021-07-31 Michael Meissner <meissner@linux.ibm.com> - - PR target/98519 - * config/rs6000/rs6000.c (rs6000_asm_operand_p): New function. - (TARGET_MD_ASM_OPERAND_P): Override md_asm_operand_p hook. - -work062-patch001: -2021-07-31 Michael Meissner <meissner@linux.ibm.com> - - PR target/98519 - * doc/tm.texi (TARGET_MD_ASM_OPERAND_P): Document. - * doc/tm.texi.in (TARGET_MD_ASM_OPERAND_P): Document. - * target.def (md_asm_operand_p): New target hook. - * targhooks.c (default_md_asm_operand_p): New default target - hook. - * targhooks.h (default_md_asm_operand_p): New declaration. - 2021-07-30 Michael Meissner <meissner@linux.ibm.com> Clone branch diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 73e87c3cbc6..2de5a96e1b6 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1196,8 +1196,6 @@ static bool rs6000_secondary_reload_move (enum rs6000_reg_type, bool); rtl_opt_pass *make_pass_analyze_swaps (gcc::context*); -static bool rs6000_asm_operand_p (rtx, const char *, const char **); - /* Hash table stuff for keeping track of TOC entries. */ struct GTY((for_user)) toc_hash_struct @@ -1641,9 +1639,6 @@ static const struct attribute_spec rs6000_attribute_table[] = #undef TARGET_LEGITIMATE_ADDRESS_P #define TARGET_LEGITIMATE_ADDRESS_P rs6000_legitimate_address_p -#undef TARGET_MD_ASM_OPERAND_P -#define TARGET_MD_ASM_OPERAND_P rs6000_asm_operand_p - #undef TARGET_MODE_DEPENDENT_ADDRESS_P #define TARGET_MODE_DEPENDENT_ADDRESS_P rs6000_mode_dependent_address_p @@ -9926,29 +9921,6 @@ rs6000_offsettable_memref_p (rtx op, machine_mode reg_mode, bool strict) strict, worst_case); } -/* Add additional constraints for asm operands. We use it to prevent - prefixed loads/stores from appearing in normal asm statements. - - At the moment, we just ban all prefixed loads/stores. If we add a - constraint specifically for prefixed loads/stores, we might need to scan the - constraint string for that constraint. */ - -static bool -rs6000_asm_operand_p (rtx op, - const char *constraint ATTRIBUTE_UNUSED, - const char **constraints ATTRIBUTE_UNUSED) -{ - if (TARGET_PREFIXED && MEM_P (op)) - { - rtx addr = XEXP (op, 0); - machine_mode mode = GET_MODE (op); - if (address_is_prefixed (addr, mode, NON_PREFIXED_DEFAULT)) - return false; - } - - return true; -} - /* Determine the reassociation width to be used in reassociate_bb. This takes into account how many parallel operations we can actually do of a given type, and also the latency. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index e95869152aa..cb015283237 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -5886,17 +5886,6 @@ Using the hook is usually simpler because it limits the number of files that are recompiled when changes are made. @end deftypefn -@deftypefn {Target Hook} bool TARGET_MD_ASM_OPERAND_P (rtx @var{op}, const char *@var{constraint}, const char **@var{constraints}) -This hook should return true if the operand is valid for being used in -an asm statement. The back end may impose additionsl constraints on -what operands are valid for an asm statement. The default behavior is -to return true always. - -For example, the PowerPC has normal memory instructions and prefixed -memory instructions. Prefixed memory instructions are not valid for -the normal @samp{%m} constraint. -@end deftypefn - @defmac TARGET_MEM_CONSTRAINT A single character to be used instead of the default @code{'m'} character for general memory addresses. This defines the constraint diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 21e013fa274..4a522ae7e2e 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -4066,8 +4066,6 @@ accept. @hook TARGET_LEGITIMATE_ADDRESS_P -@hook TARGET_MD_ASM_OPERAND_P - @defmac TARGET_MEM_CONSTRAINT A single character to be used instead of the default @code{'m'} character for general memory addresses. This defines the constraint diff --git a/gcc/recog.c b/gcc/recog.c index 04e52a71d3f..5a42c45361d 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2174,10 +2174,6 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints) /* Use constrain_operands after reload. */ gcc_assert (!reload_completed); - /* Allow the backend to impose additional constraints. */ - if (!targetm.md_asm_operand_p (op, constraint, constraints)) - return 0; - /* Empty constraint string is the same as "X,...,X", i.e. X for as many alternatives as required to match the other operands. */ if (*constraint == '\0') diff --git a/gcc/target.def b/gcc/target.def index 0cd4c786aa2..68a46aaa832 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -2940,21 +2940,6 @@ files that are recompiled when changes are made.", bool, (machine_mode mode, rtx x, bool strict), default_legitimate_address_p) -/* True if the given operand is a valid machine dependent assembler - operand. */ -DEFHOOK -(md_asm_operand_p, - "This hook should return true if the operand is valid for being used in\n\ -an asm statement. The back end may impose additionsl constraints on\n\ -what operands are valid for an asm statement. The default behavior is\n\ -to return true always.\n\ -\n\ -For example, the PowerPC has normal memory instructions and prefixed\n\ -memory instructions. Prefixed memory instructions are not valid for\n\ -the normal @samp{%m} constraint.", - bool, (rtx op, const char *constraint, const char **constraints), - default_md_asm_operand_p) - /* True if the given constant can be put into an object_block. */ DEFHOOK (use_blocks_for_constant_p, diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 7af4ef8660f..eb5190910dc 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -110,13 +110,6 @@ default_legitimate_address_p (machine_mode mode ATTRIBUTE_UNUSED, #endif } -bool default_md_asm_operand_p (rtx op ATTRIBUTE_UNUSED, - const char *constraint ATTRIBUTE_UNUSED, - const char **constraints ATTRIBUTE_UNUSED) -{ - return true; -} - void default_external_libcall (rtx fun ATTRIBUTE_UNUSED) { diff --git a/gcc/targhooks.h b/gcc/targhooks.h index 19f54d97df3..f92e102c450 100644 --- a/gcc/targhooks.h +++ b/gcc/targhooks.h @@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see #define GCC_TARGHOOKS_H extern bool default_legitimate_address_p (machine_mode, rtx, bool); -extern bool default_md_asm_operand_p (rtx, const char *, const char **); extern void default_external_libcall (rtx); extern rtx default_legitimize_address (rtx, rtx, machine_mode); diff --git a/gcc/testsuite/ChangeLog.meissner b/gcc/testsuite/ChangeLog.meissner index 9a16a87c508..d5351fa6088 100644 --- a/gcc/testsuite/ChangeLog.meissner +++ b/gcc/testsuite/ChangeLog.meissner @@ -1,9 +1,3 @@ -work062-patch002: -2021-07-31 Michael Meissner <meissner@linux.ibm.com> - - PR target/98519 - * gcc.target/powerpc/pr98519.c: New test. - 2021-07-30 Michael Meissner <meissner@linux.ibm.com> Clone branch diff --git a/gcc/testsuite/gcc.target/powerpc/pr98519.c b/gcc/testsuite/gcc.target/powerpc/pr98519.c deleted file mode 100644 index 25918bac3ed..00000000000 --- a/gcc/testsuite/gcc.target/powerpc/pr98519.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target powerpc_prefixed_addr } */ -/* { dg-options "-O2 -mdejagnu-cpu=power10" } */ - -/* Compile with -mcpu=power10. The lxsd instruction should not be replaced - with a plxsd. */ -typedef vector double vf64_t; - -static double test_f64[16]; - -vf64_t -bug (void) -{ - vf64_t j0; - __asm__("lxsd%X1 %0,%1;" : "=v" (j0) : "m" (test_f64)); - return j0; -} - -/* { dg-final { scan-assembler {\mlxsd\M} } } */ -/* { dg-final { scan-assembler-not {\mplxsd\M} } } */
next reply other threads:[~2021-08-02 1:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-02 1:26 Michael Meissner [this message] -- strict thread matches above, loose matches on Subject: below -- 2021-07-31 3:58 Michael Meissner
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=20210802012600.945ED385040A@sourceware.org \ --to=meissner@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).