Mail Archives: pgcc/1999/05/14/00:20:27
hi,
From: Joseph Yau <yauj AT comm DOT toronto DOT edu>
Subject: Using PGCC to compile C program together with modules in assembly language
Date: Thu, 13 May 1999 17:14:05 -0400 (EDT)
> Anyway, the reason i'm writing to you is that i would like to
> know if it's possible for me to write part of the code in C and some
> modules/procedures in assembly language, using both the normal Pentium
> instruction set as well as the new MMX instruction set, and compile all of
> these with PGCC.
i hope i'm not missing the point of your mail.
you want to make some part of you program with assembly, and
also want to optimise it with MMX instruction set, right?
you can do it with any version of GCC if you write assembly code
by yourself.
let's say you got main.c and func.c where func.c has function foo()
which need to be optimized.
$ gcc -O9 -mpentium -S func.c
gives you assembly code func.s. make some chage. save it.
(or you can just write entire func.s by yourself, of cause)
then,
$ gcc -c func.s
$ gcc -c main.c
$ gcc main.o func.o
have fun with a.out
--
yashi
- Raw text -