home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / gcc / help / 1759 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.9 KB  |  48 lines

  1. Xref: sparky gnu.gcc.help:1759 comp.sys.sun.hardware:3487 comp.sys.sun.misc:3279 comp.unix.solaris:105
  2. Newsgroups: gnu.gcc.help,comp.sys.sun.hardware,comp.sys.sun.misc,comp.unix.solaris
  3. Path: sparky!uunet!gatech!destroyer!caen!nic.umass.edu!amherst!amhux1.amherst.edu!twpierce
  4. From: twpierce@amhux1.amherst.edu (Tim Pierce)
  5. Subject: SPARC assember directive ".text" generated by GCC 1.40
  6. Message-ID: <1992Jul22.194602.17372@amhux2.amherst.edu>
  7. Sender: usenet@amhux2.amherst.edu (USENET News System)
  8. Nntp-Posting-Host: amhux1.amherst.edu
  9. Organization: Amherst College, Amherst MA
  10. Date: Wed, 22 Jul 1992 19:46:02 GMT
  11. Lines: 35
  12.  
  13. My apologies if the crossposting (gnu.gcc.help, comp.sys.sun.hardware,
  14. comp.sys.sun.misc, comp.unix.solaris) is inappropriate, but I'm not
  15. sure whether my question relates to my compiler, my assembler, or my
  16. hardware.
  17.  
  18. My senior thesis is in compiler design and code generation for RISC
  19. architectures.  I'm working with GCC 1.40 on a SPARCstation ELC
  20. running SunOS 4.1.2 (and Sun-supplied as), and examining the assembler
  21. output from GCC's -S switch to get a handle on code generation
  22. techniques.
  23.  
  24. GCC generates a ".text" assembler directive at the beginning of
  25. programs that utilize constant strings, apparently to inform the
  26. assembler that the following section of the program stores text.
  27. Example, from a program that includes the statement
  28. "printf ("%d\n", i)":
  29.  
  30. gcc_compiled.:
  31. .text
  32. LC0:
  33.     .ascii "%d\12\0"
  34.     .align 4
  35. .global _main
  36.     .proc 1
  37.     ...
  38.  
  39. I cannot find mention of the .text directive anywhere in the Sun-4
  40. assembler manual, nor in the SPARC Architecture Manual from SPARC
  41. international (a less likely place, I admit).  Can anyone enlighten me
  42. on the care and feeding of this mysterious assembler pseudo-op?
  43.  
  44. -- 
  45. ____ Tim Pierce                / "You mean there are TWO of you, Pierce?
  46. \  / twpierce@amherst.edu      /  God help us all."
  47.  \/ (BITnet: TWPIERCE@AMHERST) /   -- Major Charles Emerson Winchester III
  48.