GCC as a Cross Compiler for CPU32 target

Olivier Carmona olivier.carmona@di.epfl.ch
Tue Nov 25 07:11:00 GMT 1997


Thanks for your answers, I rebuilt GCC using the distrib 2.7.2.3. Some
problems are corrected but :

- I still cannot use the CPU32 special instructions. I have tried the
MIT and the
    MOTOROLA notation but GCC prints :

    Error: operands mismatch -- statement `tblu.l a2,d2' ignored

    I fixed it by using directly writing

    .long   0xF8122180

    but I would like to find a cleaner way.

- The generation of position independent code needs to setup a global
offset table.
    Did someone know how to setup it both in the ld script and the crt ?

- And last, I still search a"org" like directive for assembler. My goal
is not to modify
   definitively the location counter as "org" does in GAS but instead
generate
   and manipulate structure, like in the following example :

        org     0
  H.pc1   lo.l    1
  H.pc2   lo.l    1

        org     4
  S.a5    do.l    1 caller's a5
  S.a6    do.l    1 caller's a6
  S.func do.w    1 trap function code
  S.vect   do.w    1 vector number
  S.pc    do.l    1 return pc

  which would imply the following value :

  H.pc1 = 0
  H.pc2 = 4
  S.a5 = 4
  S.a6 = 0
  S.func = -4
  S.vect = -6
  S.pc = -8

Thanks in advance for your help,


--
Olivier Carmona
Assistant de Recherche au Laboratoire de Micro-Informatique
IN-F-132, LAMI-EPFL, 1015 Lausanne, Suisse
http://diwww.epfl.ch/lami/team/carmona






More information about the crossgcc mailing list