From: Hongyu Wang <hongyu.wang@intel.com>
To: gcc-patches@gcc.gnu.org
Cc: hongtao.liu@intel.com
Subject: [PATCH] i386: [APX] Document inline asm behavior and new switch for APX
Date: Tue, 9 Jan 2024 15:07:02 +0800 [thread overview]
Message-ID: <20240109070702.413866-1-hongyu.wang@intel.com> (raw)
Hi,
For APX, the inline asm behavior was not mentioned in any document
before. Add description for it.
Ok for trunk?
gcc/ChangeLog:
* config/i386/i386.opt: Adjust document.
* doc/invoke.texi: Add description for
-mapx-inline-asm-use-gpr32.
---
gcc/config/i386/i386.opt | 3 +--
gcc/doc/invoke.texi | 7 +++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index a38e92baf92..5b4f1bff25f 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -1357,8 +1357,7 @@ Enum(apx_features) String(all) Value(apx_all) Set(1)
mapx-inline-asm-use-gpr32
Target Var(ix86_apx_inline_asm_use_gpr32) Init(0)
-Enable GPR32 in inline asm when APX_EGPR enabled, do not
-hook reg or mem constraint in inline asm to GPR16.
+Enable GPR32 in inline asm when APX_F enabled.
mevex512
Target Mask(ISA2_EVEX512) Var(ix86_isa_flags2) Save
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 68d1f364ac0..47fd96648d8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -35272,6 +35272,13 @@ r8-r15 registers so that the call and jmp instruction length is 6 bytes
to allow them to be replaced with @samp{lfence; call *%r8-r15} or
@samp{lfence; jmp *%r8-r15} at run-time.
+@opindex mapx-inline-asm-use-gpr32
+@item -mapx-inline-asm-use-gpr32
+When APX_F enabled, EGPR usage was by default disabled to prevent
+unexpected EGPR generation in instructions that does not support it.
+To invoke EGPR usage in inline asm, use this switch to allow EGPR in
+inline asm, while user should ensure the asm actually supports EGPR.
+
@end table
These @samp{-m} switches are supported in addition to the above
--
2.31.1
next reply other threads:[~2024-01-09 7:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 7:07 Hongyu Wang [this message]
2024-01-10 8:10 ` Hongtao Liu
2024-01-10 8:00 ` Hongyu Wang
2024-01-10 23:06 ` Andi Kleen
2024-01-11 3:28 ` Hongtao Liu
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=20240109070702.413866-1-hongyu.wang@intel.com \
--to=hongyu.wang@intel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hongtao.liu@intel.com \
/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).