Getting Assembly Listing from cc

Getting Assembly Listing from cc

Post by Peter K » Thu, 04 Feb 1993 02:40:15



Hi.

How can I get the assembly listing when compling
a C program using cc?
I thought "-S" would do it but my cc complains:

cc: 1501-214 command option S reserved for future use - ignored

Thanks.

 
 
 

Getting Assembly Listing from cc

Post by ja.. » Fri, 05 Feb 1993 09:15:30



> Subject: Getting Assembly Listing from cc

> Hi.

> How can I get the assembly listing when compling
> a C program using cc?

> cc: 1501-214 command option S reserved for future use - ignored

> Thanks.


The XL family of compilers do not generate assembly code.  They generate
machine
code directly and therefore do not call the assembler.  The -S flag was put
in for a possible future release where either the compiler will generate
assembler code or call a dis-assembler to generate the code from the compiled
object.  If you wish, you can compile with the -qlist option and get what some
call pseudo-assembler output.  This output will be in a file called *.lst.  
The output is a listing and can not be fed to the assembler.  However, it gives
a good enough insight as to what is happening, if you are interested in that
sort of thing.

Jaime Vazquez                  
AIX Technical Support          
IBM AWD-Austin/2830            

--------------------------------------------------------------------
<Standard disclaimers apply.>

 
 
 

Getting Assembly Listing from cc

Post by John Ger » Fri, 05 Feb 1993 00:21:01


|>
|> How can I get the assembly listing when compling
|> a C program using cc?
|>
   cc -qlist ...
--

 
 
 

Getting Assembly Listing from cc

Post by Gary R. Ho » Fri, 05 Feb 1993 07:20:18


|> How can I get the assembly listing when compling
|> a C program using cc?

You can't.

You can, however, generate a pseudo-assembly listing that will show the
instructions.  This is done with the -qlist option.  The generated
file can not be passed through the assembler as-is, however.

The XL family of compilers does not ride on top of the assembler; rather,
intermediate code is generated by each language processor, and then handed
to a common backend which performs the optimization and instruction
scheduling and the like.

--
________________________________________________________________________

AIX Benchmark & Conversion Services             who you compare yourself
IBM Corporation                                 with, don't you think?"
All opinions expressed are mine alone.         _________________________

 
 
 

Getting Assembly Listing from cc

Post by John Ferrei » Sat, 06 Feb 1993 06:40:58



>Hi.

>How can I get the assembly listing when compling
>a C program using cc?
>I thought "-S" would do it but my cc complains:

>cc: 1501-214 command option S reserved for future use - ignored

>Thanks.


The C compiler does not generate assembly code.
You can use the -qlist option and get a listing of the machine
instructions, if you care to see the code generated.  This is not assembly
code and can not be fed to an assembler.

John Ferreira

 
 
 

1. gcc to generate c and assembly list

I try to use gcc -c -g -Wa,-a,-ad bit.c > bit.lst to generate c and
assembly list, but I got eror msg:

143 > gcc -c -g -Wa,-a,-ad bit.c > bit.lst
/usr/ccs/bin/as: error: unknown option 'a'
/usr/ccs/bin/as: error: unknown option 'ad'
usage: /usr/ccs/bin/as [-V] [-Q{y,n}] [-f[O][if]#] [-q] [-s]
          [-S] [-K {pic,PIC}] [-o objfile] [-L] [-T]
          [-P [[-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
          [-m [-Ym,path]] [-n] [-xF] [-xarch=v7] [-xarch=v8]
[-xarch=v8a] [-xarch=v8plus] [-xarch=v8plusa] [-xarch=v8plusb]
[-xarch=v9] [-xarch=v9a] [-xarch=v9b]  [-xcode={pic13,pic32}] file.s...

Please help.

Thanks

2. Matrox and 3.2A

3. How can I Assembly Listing from C source code ??

4. What's so special about the first 1028 cylinders?

5. How to get Sun Sparc Assembly listing ?

6. using browser to ftp a binary file

7. Procmail and cc: craziness on lists

8. Integer calculations

9. list of defined constants from cc or cpp

10. STL and CC 4.0.1 -- Anyone gotten them to work?

11. Problem getting shared C++ library to load with CC

12. getting the lo interface to startup at boot time and is there a cc library error

13. make and cc/gcc compiler on SunOS 5.5.1; getting box up to speed