home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / gcc / help / 1916 < prev    next >
Encoding:
Internet Message Format  |  1992-08-15  |  1.6 KB

  1. Path: sparky!uunet!benjii!suresh
  2. From: suresh@pi.COM (Suresh Kumar)
  3. Newsgroups: gnu.gcc.help
  4. Subject: gcc for 68332 and Position Independent Code/data
  5. Keywords: 68332, PIC
  6. Message-ID: <113@benjii.UUCP>
  7. Date: 16 Aug 92 00:13:48 GMT
  8. Organization: Pi Systems Corp., Portland, OR 97223, USA
  9. Lines: 36
  10.  
  11.  
  12. I am planning to use gcc to cross compile code for a Motorola
  13. 68332 based hardware.  It was not clear from the documentation
  14. whether gcc-2.2.2  supports the following features.
  15.  
  16. 1.  Has anybody on the net used gcc to generate Motorola 68332
  17.     instructions? 68332 instruction set is a superset of 68010
  18.     but a subset of 68020.
  19.  
  20. 2.  Can gcc generate PIC (Position Independent Code/Data) such that
  21.     all instructions are PC-relative with 32bit offset  and global/static
  22.     data is Ax register indirect with 32 bit offset? (Ax is one of the
  23.     address registers). Before I execute the code, I would set up the
  24.     Ax register to the data segment and then jump to the first instruction
  25.     in the text segment.
  26.  
  27.     As I understand from the documentation, gcc can generate PIC code
  28.     but puts the globals/static in a table and addresses them via
  29.     a 16-bit offset from the base address loaded into a register. I would
  30.     like to setup this Ax register once and the compiler should generate
  31.     code to address global/static data as a 32bit offset from the Ax register.
  32.     The compiler should not generate code to load the Ax register everytime
  33.     global/static data is accessed.
  34.  
  35.  
  36.     Thanks in advance for any info.
  37.  
  38.  
  39. Suresh Kumar
  40. Pi Systems Corporation
  41. (503) 293-9585
  42.  
  43. email :  suresh@pi.com       (internet)
  44.          uunet!benjii!suresh (uucp)
  45.  
  46.  
  47.