aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHongyu Wang <hongyu.wang@intel.com>2024-01-09 15:00:21 +0800
committerHongyu Wang <hongyu.wang@intel.com>2024-01-10 16:02:36 +0800
commit7de5bb642c1265ff57a009dd889ab435b098bfca (patch)
tree90c04abe30769232d6722453d2ef686d2d1bbbe9
parent0141ee79d72a3bccf040e02cd047fe585b96fa8d (diff)
downloadgcc-7de5bb642c1265ff57a009dd889ab435b098bfca.zip
gcc-7de5bb642c1265ff57a009dd889ab435b098bfca.tar.gz
gcc-7de5bb642c1265ff57a009dd889ab435b098bfca.tar.bz2
i386: [APX] Document inline asm behavior and new switch for APX
For APX, the inline asm behavior was not mentioned in any document before. Add description for it. gcc/ChangeLog: * config/i386/i386.opt: Adjust document. * doc/invoke.texi: Add description for -mapx-inline-asm-use-gpr32.
-rw-r--r--gcc/config/i386/i386.opt3
-rw-r--r--gcc/doc/invoke.texi8
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index a38e92b..5b4f1bf 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 a494420..216e2f5 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -35272,6 +35272,14 @@ 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
+For inline asm support with APX, by default the EGPR feature was
+disabled to prevent potential illegal instruction with EGPR occurs.
+To invoke egpr usage in inline asm, use new compiler option
+-mapx-inline-asm-use-gpr32 and user should ensure the instruction
+supports EGPR.
+
@end table
These @samp{-m} switches are supported in addition to the above