View previous topic :: View next topic |
Author |
Message |
e-d0uble n00b
Joined: 15 Nov 2002 Posts: 1
|
Posted: Fri Nov 15, 2002 5:26 pm Post subject: Altivec, -fsigned-char CFLAGS |
|
|
I'm just curious:
Isn't it foolish to add `-maltivec -mabi=altivec' to global CFLAGS on G4 ppc's (uging gcc>3.1) ?!? Only applications that are coded to use altivec in the first place will utilize them... Correct? I don't think gcc is generating these instructions from scratch? What software (GNU or otherwise) has altivec instructions in it?? I have seen none so far.. So isn't this kind of useless? Or am I completely wrong here?
Also, does `fsigned-char' always need to be added?? AFAIK, certain programs need it:
#include <stdio.h>
int main() {
char a = -3;
if(a > 0)
printf("Ooops!\n");
return 0;
}
will say Ooops! Unless compiled with -fsigned-char, but I'm certain there are cases where declaring char as signed is a performance hit.
what do you think?
Ethan |
|
Back to top |
|
|
Stummel n00b
Joined: 26 May 2002 Posts: 7 Location: Munic / Germany
|
Posted: Sat Nov 16, 2002 7:14 pm Post subject: |
|
|
Well,
there is altivec enabled software: Ogle e.g. and i think mol can use it to. Ogle runs a lot faster using altivec.
I think, but I'm not shure, that you have to compile your base system with altivec support, to enable it. But I might be wrong with that.
My first gentoo was compiled with 2.95 and O3 optimisation - and nautilus started quite fast. But now, on my gcc 3.2 system, with altivec and O3 optimisation, nautilus is a lot faster than the old one. Maybe, thats because of gcc 3.2. I don't know.
There is a benchmark programm arround - hint I think - there have also a altivec optimized versition. Try it out.
CU Stummel |
|
Back to top |
|
|
Gerk Retired Dev
Joined: 07 May 2002 Posts: 435
|
Posted: Mon Nov 18, 2002 6:11 pm Post subject: |
|
|
there are quite a few emerging pieces of software using altivec code.
mplayer, xine, lame, mol just to name a few off the top of my head
gcc also does use some small internal altive references when using these options at compile time. Setting -fsigned-char should be harmless and in fact save cycles for apps that constantly try to evaluate if its needed or not (and sadly there are a few) |
|
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
|
|