i960 Processor Compiler User's Guide
3-42
3
Position Independence Arguments (pc, pd, and pr): If you select
pc, the compiler generates position-independent code and predefines the
__PIC macro.
NOTE. Applications built using the pc option cannot be linked with
assembly sources that contain
callx or balx instructions, since these
instructions are not position-independent.
If you select
pd, the compiler generates position-independent data and
predefines the
__PID macro. Register g12 contains the bias value for the
data sections; its contents cannot be modified, even during the saving or
restoring process.
If you select
pr, the compiler reserves register g12. Use this option for
position-dependent modules to be combined with position-independent
data modules. Chapter 7 describes position-independent code and data.
Extended Call Argument (xc): Use the Extended Call argument when
your code calls external functions outside the range of the
call or bal
opcodes. When you use this argument, the compiler emits the calljx
pseudo-opcode, which the linker translates to either of the MEM format
opcodes
callx or balx. The linker decides which translation to perform
based on the symbol table entry for the defined function. The extended
call opcodes can address the entire 2
32
address range. The extended call
instructions occupy two words of code space. The single word CTRL
format
call instructions occupy one word.
The compiler emits the CTRL format
callj pseudo-opcode when calling
any function defined outside the current compilation module.