building l4 for mips64

Antoine Amirault antoineamirault at gmail.com
Mon Jul 9 04:52:50 CEST 2007


HI!
I'm always trying to build l4 for mips64. I've decided to try to correct
errors i obtain during the compilation. I've repaired some of them but now
I'm stuck.
I think I've understand the problem, but I don't know how to solve it.
When compiling, I got this error :

/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc: In function
`threadid_t sys_exchange_registers(threadid_t, word_t, word_t, word_t,
word_t, word_t, threadid_t, bool)':
/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:333: error: data
type of 'pgr' isn't suitable for a register
/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:333: error:
register name given for non-register variable 'pgr'
/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:333: confused by
earlier errors, bailing out
make[1]: *** [src/api/v4/exregs.o] Error 1

I've found in syscall.h where this function is declared. I got this code :

#define return_exchange_registers(result, control, sp, ip, flags, pager,
handle)    \
{                                \
    register word_t ctrl asm("$4") = control;    /* a0 */    \
    register word_t sp_r asm("$5") = sp;    /* a1 */    \
    register word_t ip_r asm("$6") = ip;    /* a2 */    \
    register word_t flg asm("$7") = flags;    /* a3 */    \
    register threadid_t pgr asm("$8") = pager;    /* t0 */    \
    register word_t hdl asm("$9") = handle;    /* t1 */    \
\
    __asm__ __volatile__ (                    \
    "" : : "r" (ctrl), "r" (sp_r), "r" (ip_r),        \
    "r" (flg), "r" (pgr), "r" (hdl)                \
    );                                \
    return (result);                        \
}

I think that it's impossible to store a threadid_t in a register so i tried
to cast it to word_t but after i got this error message :

/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc: In function
`threadid_t sys_exchange_registers(threadid_t, word_t, word_t, word_t,
word_t, word_t, threadid_t, bool)':
/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:333: error:
expected primary-expression before "register"
/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:333: error:
expected `;' before "register"
/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:333: error: `pgr'
undeclared (first use this function)
/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:333: error: (Each
undeclared identifier is reported only once for each function it appears
in.)
/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:352: error:
expected primary-expression before "register"
/home/antoine/Final/pistachio/kernel/src/api/v4/exregs.cc:352: error:
expected `;' before "register"
make[1]: *** [src/api/v4/exregs.o] Error 1

Maybe my idea is not good or I haven't really understand the problem.
Any ideas?
Thanks
Antoine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20070709/2054d1ea/attachment.html>


More information about the l4-hackers mailing list