home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!benjii!suresh
- From: suresh@pi.COM (Suresh Kumar)
- Newsgroups: gnu.gcc.help
- Subject: gcc for 68332 and Position Independent Code/data
- Keywords: 68332, PIC
- Message-ID: <113@benjii.UUCP>
- Date: 16 Aug 92 00:13:48 GMT
- Organization: Pi Systems Corp., Portland, OR 97223, USA
- Lines: 36
-
-
- I am planning to use gcc to cross compile code for a Motorola
- 68332 based hardware. It was not clear from the documentation
- whether gcc-2.2.2 supports the following features.
-
- 1. Has anybody on the net used gcc to generate Motorola 68332
- instructions? 68332 instruction set is a superset of 68010
- but a subset of 68020.
-
- 2. Can gcc generate PIC (Position Independent Code/Data) such that
- all instructions are PC-relative with 32bit offset and global/static
- data is Ax register indirect with 32 bit offset? (Ax is one of the
- address registers). Before I execute the code, I would set up the
- Ax register to the data segment and then jump to the first instruction
- in the text segment.
-
- As I understand from the documentation, gcc can generate PIC code
- but puts the globals/static in a table and addresses them via
- a 16-bit offset from the base address loaded into a register. I would
- like to setup this Ax register once and the compiler should generate
- code to address global/static data as a 32bit offset from the Ax register.
- The compiler should not generate code to load the Ax register everytime
- global/static data is accessed.
-
-
- Thanks in advance for any info.
-
-
- Suresh Kumar
- Pi Systems Corporation
- (503) 293-9585
-
- email : suresh@pi.com (internet)
- uunet!benjii!suresh (uucp)
-
-
-