View previous topic :: View next topic |
Author |
Message |
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2609
|
Posted: Tue Aug 09, 2022 11:25 pm Post subject: Intel i7-12800H and march=alderlake |
|
|
Hello,
I have a laptop with an Intel i7-12800H processor, which should be Alder Lake. During the base system installation, though, I had to go with "march=native" instead of "march=alderlake" as the latter resulted in even basic utilities like pciutils throwing "Illegal instruction" errors. Does anyone have GCC documentation that might explain the problem, or a way to see the specific differences between the two arch declarations?
Thank you.
Cheers,
Nathan Zachary _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2892
|
Posted: Wed Aug 10, 2022 12:03 am Post subject: |
|
|
Not familiar with Adler Lake's situation, but -march=exact is the generic definition of it, and the cpu may not necessarily support every instructions from that (it could also potentially support more).
like, -march=haswell enables -mavx2 (haswell was the first to support that), but forget avx2, my haswell minipc has not even avx1 support due to using a gimped laptop cpu (grep avx /proc/cpuinfo returns nothing)
That's why if cross-compiling / distcc or so, you're better off using app-misc/resolve-march-native to get the exact set, for my haswell that's roughly a simplified: -march=haswell -mabm -mno-avx -mno-bmi -mno-f16c -mno-fma -mno-xsave -mno-xsaveopt. And if not cross-compiling, just stick to -march=native on arches that allow it. |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Wed Aug 10, 2022 12:41 am Post subject: |
|
|
Run the commands below on your laptop to see the specific differences between the two arch declarations:
Code: | gcc -Q --help=target -march=native > native.txt
gcc -Q --help=target -march=alderlake > alderlake.txt
diff native.txt alderlake.txt |
|
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2609
|
Posted: Thu Aug 11, 2022 3:13 pm Post subject: |
|
|
Thank you mike155 for the recommendation. I didn't expect to see such a difference between 'native' and 'alderlake' considering this is a i7-12800H processor:
Code: |
$ diff -Nut native alderlake
--- native 2022-08-10 14:02:48.000000000 -0500
+++ alderlake 2022-08-10 14:03:00.000000000 -0500
@@ -9,10 +9,10 @@
-m8bit-idiv [disabled]
-m96bit-long-double [disabled]
-mabi= sysv
- -mabm [enabled]
+ -mabm [disabled]
-maccumulate-outgoing-args [disabled]
-maddress-mode= long
- -madx [disabled]
+ -madx [enabled]
-maes [enabled]
-malign-data= compat
-malign-double [disabled]
@@ -48,17 +48,17 @@
-mavx512vnni [disabled]
-mavx512vp2intersect [disabled]
-mavx512vpopcntdq [disabled]
- -mavxvnni [disabled]
+ -mavxvnni [enabled]
-mbionic [disabled]
- -mbmi [disabled]
- -mbmi2 [disabled]
+ -mbmi [enabled]
+ -mbmi2 [enabled]
-mbranch-cost=<0,5> 3
-mcall-ms2sysv-xlogues [disabled]
-mcet-switch [disabled]
-mcld [disabled]
- -mcldemote [disabled]
+ -mcldemote [enabled]
-mclflushopt [enabled]
- -mclwb [disabled]
+ -mclwb [enabled]
-mclzero [disabled]
-mcmodel= [default]
-mcpu=
@@ -68,12 +68,12 @@
-mdispatch-scheduler [disabled]
-mdump-tune-features [disabled]
-menqcmd [disabled]
- -mf16c [disabled]
+ -mf16c [enabled]
-mfancy-math-387 [enabled]
-mfentry [disabled]
-mfentry-name=
-mfentry-section=
- -mfma [disabled]
+ -mfma [enabled]
-mfma4 [disabled]
-mforce-drap [disabled]
-mforce-indirect-call [disabled]
@@ -84,12 +84,12 @@
-mfused-madd -ffp-contract=fast
-mfxsr [enabled]
-mgeneral-regs-only [disabled]
- -mgfni [disabled]
+ -mgfni [enabled]
-mglibc [enabled]
-mhard-float [enabled]
-mharden-sls= none
-mhle [disabled]
- -mhreset [disabled]
+ -mhreset [enabled]
-miamcu [disabled]
-mieee-fp [enabled]
-mincoming-stack-boundary= 0
@@ -100,7 +100,7 @@
-minline-stringops-dynamically [disabled]
-minstrument-return= none
-mintel-syntax -masm=intel
- -mkl [disabled]
+ -mkl [enabled]
-mlarge-data-threshold=<number> 65536
-mlong-double-128 [disabled]
-mlong-double-64 [disabled]
@@ -113,8 +113,8 @@
-mmitigate-rop [disabled]
-mmmx [enabled]
-mmovbe [enabled]
- -mmovdir64b [disabled]
- -mmovdiri [disabled]
+ -mmovdir64b [enabled]
+ -mmovdiri [enabled]
-mmove-max= 128
-mmpx [disabled]
-mms-bitfields [disabled]
@@ -135,17 +135,17 @@
-mpc80 [disabled]
-mpclmul [enabled]
-mpcommit [disabled]
- -mpconfig [disabled]
- -mpku [disabled]
+ -mpconfig [enabled]
+ -mpku [enabled]
-mpopcnt [enabled]
-mprefer-avx128 -mprefer-vector-width=128
-mprefer-vector-width= none
-mpreferred-stack-boundary= 0
-mprefetchwt1 [disabled]
-mprfchw [enabled]
- -mptwrite [disabled]
+ -mptwrite [enabled]
-mpush-args [enabled]
- -mrdpid [disabled]
+ -mrdpid [enabled]
-mrdrnd [enabled]
-mrdseed [enabled]
-mrecip [disabled]
@@ -158,9 +158,9 @@
-mrtd [disabled]
-mrtm [disabled]
-msahf [enabled]
- -mserialize [disabled]
- -msgx [disabled]
- -msha [disabled]
+ -mserialize [enabled]
+ -msgx [enabled]
+ -msha [enabled]
-mshstk [disabled]
-mskip-rax-setup [disabled]
-msoft-float [disabled]
@@ -192,20 +192,20 @@
-mtune= alderlake
-muclibc [disabled]
-muintr [disabled]
- -mvaes [disabled]
+ -mvaes [enabled]
-mveclibabi= [default]
-mvect8-ret-in-mem [disabled]
- -mvpclmulqdq [disabled]
+ -mvpclmulqdq [enabled]
-mvzeroupper [enabled]
- -mwaitpkg [disabled]
+ -mwaitpkg [enabled]
-mwbnoinvd [disabled]
- -mwidekl [disabled]
+ -mwidekl [enabled]
-mx32 [disabled]
-mxop [disabled]
-mxsave [enabled]
- -mxsavec [disabled]
- -mxsaveopt [disabled]
- -mxsaves [disabled]
+ -mxsavec [enabled]
+ -mxsaveopt [enabled]
+ -mxsaves [enabled]
Known assembler dialects (for use with the -masm= option):
att intel
|
_________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|