[LLVMdev] .globl

reed kotler rkotler at mips.com
Thu Aug 29 14:25:04 PDT 2013


I need to be able to emit .globl for the soft float routines used by mips16.
The routines are called but there is no .globl definition for them.

How can I do this?

Background:

I have a strange issue that I encountered with mips16 hard float.

Part of mips16 hard float is to emit calls to runtime routines with the 
same signature as usual soft float routines, except that they are 
implemented using mips32 code which uses real floating point 
instructions (mips16 processor mode has no hardware floating point 
instructions).

These routines have the same names as the corresponding softfloat 
routines, except with the additional prefix __mips16_ . So for example, 
__mips16_floatsidf.

For these intrinsics, (and not others), gcc mips16 emits a .globl.

Without this .globl ( which llvm does not emit), then the program will 
run very slow if compiled in -fPIC and linked as C++. It seems to be 
stuck in the loader (probably doing dynamic binding over and over again).

I'm trying to understand why this happens but for now that's not 
important because it just works that way.

Tia.

Reed







More information about the llvm-dev mailing list