Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
31 user(s) are online (16 user(s) are browsing Forums)

Members: 1
Guests: 30

vagappc, more...

Support us!

Headlines

 
  Register To Post  

« 1 (2)
Re: X5000 optimized code compile
Just popping in
Just popping in


See User information
Sadly, the X5000 options do not work for E-UAE.

I used these flags:
CFLAGS="-O3 -mcpu=e5500 -mno-altivec -mno-powerpc64 -gstabs"

At the end I got these error messages:
/T/cc1PpXo7.sAssembler messages:
/
T/cc1PpXo7.s:28739Errorunrecognized opcode: `mcrxr'
/T/cc1PpXo7.s:28997: Error: unrecognized opcode: 
`mcrxr'
...


Any ideas what else is needed to make the assembler work?

Thanks,
Josef

Go to top
Re: X5000 optimized code compile
Quite a regular
Quite a regular


See User information
@FlynnTheAvatar
maybe: -mno-mfcrf
but it should be setted correctly with -mcpu

AmigaOS3: Amiga 1200
AmigaOS4: Micro A1-C, AmigaOne XE, Pegasos II, Sam440ep, Sam440ep-flex, AmigaOne X1000
MorphOS: Efika 5200b, Pegasos I, Pegasos II, Powerbook, Mac Mini, iMac, Powermac Quad
Go to top
Re: X5000 optimized code compile
Amigans Defender
Amigans Defender


See User information
@FlynnTheAvatar

If you are not using the latest gcc11 we provide in AmigaLabs with fixed cpu switches most probably that could be the problem

i'm really tired...
Go to top
Re: X5000 optimized code compile
Just popping in
Just popping in


See User information
@afxgroup

I am using the lastest gcc (native) version provided by Walkero:
gcc -v
Using built
-in specs.
COLLECT_GCC=/Work/Cubic IDE/ide/devkits/sdk/amigaos4/54.16/gcc/ppc-amigaos/bin/11.3.0/gcc
COLLECT_LTO_WRAPPER
=/Work/Cubic\ IDE/ide/devkits/sdk/amigaos4/54.16/gcc/ppc-amigaos/bin/11.3.0/../libexec/gcc/ppc-amigaos/11.3.0/lto-wrapper
Target
ppc-amigaos
Configured with
: /opt/adtools/gcc/repo/configure --with-bugurl=https://github.com/sba1/adtools/issues --with-pkgversion='adtools build 11.3.0' --host=ppc-amigaos --target=ppc-amigaos --disable-nls --prefix=/gcc --with-gmp=/opt/adtools/native-build/root-cross --with-mpfr=/opt/adtools/native-build/root-cross --with-mpc=/opt/adtools/native-build/root-cross --program-prefix=ppc-amigaos- --program-suffix=-11 --libexecdir=/gcc/libexec --enable-languages=c,c++ --enable-haifa --enable-sjlj-exceptions --disable-libstdcxx-pch --disable-tls --enable-threads=amigaos --enable-lto --disable-c++tools
Thread modelamigaos
Supported LTO compression algorithms
zlib
gcc version 11.3.0 
(adtools build 11.3.0)

Go to top
Re: X5000 optimized code compile
Site Builder
Site Builder


See User information
@FlynnTheAvatar
We need to check if there are changes in adtools that were not part of the build you are using.

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: X5000 optimized code compile
Site Builder
Site Builder


See User information
@rjd324
I am sorry I missed your message about the pinned post and the optimisations.

We have the articles. So maybe we can have an article that has all the information gathered there. Anyone can create articles.

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: X5000 optimized code compile
Not too shy to talk
Not too shy to talk


See User information
@rjd324Quote:
rjd324 wrote:@walkero
Should we make a pinned thread / guide for optimised gcc flags for the different targets?


No, please, we have to stop multiplying unnecessary tweaks that will possibly raise problems, or in any case will bring nothing or almost.
Let's be careful about supposed optimizations or real micro-optimizations (that possibly make things negative on other targets).

As usual, let's make things simple and it will be better.

Go to top
Re: X5000 optimized code compile
Just popping in
Just popping in


See User information
@walkero

Thinking about it, it might be more likely that this is an issue with GNU as. It is part of binutils that is rather old. Maybe the old version does not support all PPC assembler commands?

Go to top
Re: X5000 optimized code compile
Just popping in
Just popping in


See User information
@flash (and others)

Thanks for the recommendations. I asked the question more for others than for myself, as my projects aren't ones that need the kind of speed that requires CPU-specific optimization. It's more important to me that my programs run on any PPC Amiga, so I stick with the default CPU selection (which I assume is the generic "-mcpu=powerpc"). And of course, no altivec.

The "-mtune=" option is potentially of use though, as it seems to reorder instructions to increase speed on a superscalar CPU while still working (with no change in speed) on one that isn't. If @sailor is able to run some tests to see which choice works best with the PA6T, that would be nice to know.

It would also be nice to know if there's a single "-mtune=" option that gives the best average performance increase across all the superscalar CPUs used in Amigas while not causing any problems with those that aren't superscalar; something that could be used as a default 'tune' for a program that wants to run on any PPC Amiga.

Go to top
Re: X5000 optimized code compile
Just popping in
Just popping in


See User information
@corto

Quote:
No, please, we have to stop multiplying unnecessary tweaks that will possibly raise problems, or in any case will bring nothing or almost.
Let's be careful about supposed optimizations or real micro-optimizations (that possibly make things negative on other targets).

Of course, someone who optimizes for a specific target has to expect that the program will run only on that target, and must be prepared to provide multiple versions of the program to run on each different target. For most programs you're right, they don't require that kind of optimization and should be kept generic, so they run on any Amiga.

But for some programs, such as action games and perhaps video players, where getting every possible bit of speed is important, it may be worth creating different versions for each different Amiga. In that case it would be useful to have an article that summarizes the best options for each different target, to use as a starting point.

Go to top
Re: X5000 optimized code compile
Just popping in
Just popping in


See User information
@FlynnTheAvatar

Quote:
Thinking about it, it might be more likely that this is an issue with GNU as. It is part of binutils that is rather old. Maybe the old version does not support all PPC assembler commands?

I did a quick search in the AS executable, and the string 'mcrxr' is present. Perhaps the error message means that the opcode isn't supported by the CPU option being passed to AS?

Go to top
Re: X5000 optimized code compile
Just popping in
Just popping in


See User information
@FlynnTheAvatar

Maybe e5500 does not recognize the instruction opcode simplify because it's not present.
Try with another CPU target just like -mcpu=604e
Some instructions are specific for PowerPC CPU families, other are derived from IBM Power ISA.
In Amigaland we have a to support a mix of CPU with a shared common base ISA and some specific peculiarities that are incompatibile each other.

Go to top
Re: X5000 optimized code compile
Quite a regular
Quite a regular


See User information
@msteedQuote:
msteed wrote:
It would also be nice to know if there's a single "-mtune=" option that gives the best average performance increase across all the superscalar CPUs used in Amigas while not causing any problems with those that aren't superscalar; something that could be used as a default 'tune' for a program that wants to run on any PPC Amiga.


All powerpc CPUs are superscalar. And even M68060 is superscalar CPU - first one on Amiga world.

But there are big difference between number of execution units, pipes parallelism and in many other parameters.
It varies from 5 execution pipelines (603e, 440ep and 460ex) to 10 (G5) and 11 (G4).
As corto said, probably the best solution is leave it to powerpc default.

One thing which from my point of view is important: extensions
AltiVec, SPE and MAC
But use it only for critical tasks like coding/decoding etc. and of course SPE also for FPU-heavy tasks.
Also isel should be considered, but only together with above three.
And only for code with this extensions we can play with -mtune. In real, all extensions are connected with certain CPU, so -mtune should be used only with PA6T for which gcc has no exact state machine. ( maybe also P1022, but e500v2 core is very close to e500v1 core in 8540 = SPE default cpu ).


Edited by sailor on 2025/3/1 10:47:32
AmigaOS3: Amiga 1200
AmigaOS4: Micro A1-C, AmigaOne XE, Pegasos II, Sam440ep, Sam440ep-flex, AmigaOne X1000
MorphOS: Efika 5200b, Pegasos I, Pegasos II, Powerbook, Mac Mini, iMac, Powermac Quad
Go to top
Re: X5000 optimized code compile
Quite a regular
Quite a regular


See User information
I tested -mtune option on X1000, PA6T CPU with
-mtune= 7400 | 7450 | G4 | 970 | G5 | power4 | power5 | power5+

if AltiVec is not used, best results are -mcpu=powerpc -mtune=power5+, but difference is <1%
if AltiVec is used, best results are -mcpu=powerpc with no mtune ( i.e. equal to -mtune=powerpc )

Conclusions:
1. for PA6T CPU the best option is -mcpu=powerpc
2. PA6T pipelines (except AltiVec) are closest to power5+
3. PA6T AltiVec pipelines are different than G4, G5, 7400, 7450, 970 pipelines. And of course different than power5+, as power5+ has no AltiVec.

P.S.: of course, results may vary with different algorithms

AmigaOS3: Amiga 1200
AmigaOS4: Micro A1-C, AmigaOne XE, Pegasos II, Sam440ep, Sam440ep-flex, AmigaOne X1000
MorphOS: Efika 5200b, Pegasos I, Pegasos II, Powerbook, Mac Mini, iMac, Powermac Quad
Go to top
Re: X5000 optimized code compile
Just popping in
Just popping in


See User information
@sailor

Thanks for running the tests. Sounds like I've been giving up little if anything in terms of speed -- on the X1000, anyway -- by using the default cpu option.

Quote:
All powerpc CPUs are superscalar.

Good to know. So possibly even the '-mtune=powerpc' option performs some degree of superscalar instruction scheduling.

Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project