Problem compiling Kaffe-1.0.5 on a MIPS (Irix 6.5)

Sasikanth Avancha savanc1 at
Sat Mar 4 12:55:37 PST 2000


I am facing the following problem while trying to compile Kaffe on a mips
system. I simply used the "make" command at the top level directory and
the gnu compiler, assembler, linker etc are all invoked appropriately. 


The following inline assembly code snippet is in
#if defined(TRAMPOLINE_FUNCTION)  /*
 * If we have an explit function defined then use that.

#else /*
 * Otherwise we'll try to construct one.
 */ #if !defined(START_ASM_FUNC)
#define START_ASM_FUNC() ".text\n\t.align 4\n\t.globl "
#if !defined(END_ASM_FUNC)
#define END_ASM_FUNC() ""
#define C_FUNC_NAME(FUNC) "_" #FUNC

        .text \n
        .align 4 \n
        sw $31, 0($sp)  \n
l1:     .word " C_FUNC_NAME(soft_fixup_trampoline)"  \n ***PROBLEM**
        .globl mips_do_fixup_trampoline \n
        .ent mips_do_fixup_trampoline \n mips_do_fixup_trampoline:  \n

trampolines.c is "#include"d in kaffe/kaffevm/jit3/machine.c. When gcc
is compiling machine.c and finds the inline assembly code, it calls the
assembler "as" to assemble this code, "as" returns the following error:

as: Error: /var/tmp/cca01k2z.s, line 12173: Cannot use data-generating
directives in the .text section.: .word
as: Error: /var/tmp/cca01k2z.s,line 12173: Cannot use data-generating
in the .text section.:.word
*** Error code 1 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)

I tracked down the source of the error to the fourth line of assembly code
in the above snippet (which I've marked "PROBLEM"). I am unable to
understand how to fix this code. Looking at the same assembly code in
other architectures (sparc, i386 etc), I found that the function
soft_fixup_trampoline() is being called using the call opcode. So, I guess that 
the ".word" directive in the above mips code is setting up to call the function, 
but for some reason, the way it is being done is illegal.

I hope somebody can provide a solution to this problem.

Thanks for all help.

More information about the kaffe mailing list