altivec-optimisation and compilers for mac g4

Jump to First Reply
nbdnbd
Posted:
in macOS edited January 2014
the altivec-registers and processing-unit on the g4-processors are adressed via special instructions. those are assembler-instructions.

if i got a c-sourcefile, i have to have a special compiler that is equipped with this special-instruction-set. otherwise my compiler (and my programm) wont use the altivec at all.



which compilers for macosx are altivec-capable ? codewarrior ? gcc ?



or has the altivec-optimisation always to be done in assembler ?



thank you !



andreas

Comments

  • Reply 1 of 2
    franckfranck Posts: 135member
    AFAIK, both Codewarrior ang GCC 3+ are altivec-capable.

    With Codewarrior it's only a checkbox to enable altivec.

    With GCC, use this <a href="http://gcc.gnu.org/onlinedocs/gcc/PowerPC-AltiVec-Built-in-Functions.html"; target="_blank">page</a>.
     0Likes 0Dislikes 0Informatives
  • Reply 2 of 2
    Codewarrior is very buggy when it comes to altivec code. Altivec is something that really needs to be coded for by hand. Compliers can do some optimizations, but barely any compared to what can be done by a programmer who is proficient in optimizing for Altivec.
     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.