
122
Evaluating and Programming the 29K RISC Family
sub
sub
add
gr99,rfb,rab
rab,tav,gr99
rfb,tav,0
;gr99 has WindowSize
;rab = lr2address–WindowSize
;rfb = lr2address
$1: ;}
load
jmpi
asgeu
0,0,lr0,gr97
lr0
V_FILL,rfb,lr1 ;if (rfb < lr1) raise V_FILL;
; may fill from rfb to lr1
;lr0 = env–>lr0
;return
2.4.3 Support Libraries
The GNU tool chain is supported with a single library, libc.a. However the High
C 29K tool chain is supported with a range of library options. It is best to use the com-
piler driver,
hc29
, to select the appropriate library. This avoids having to master the
library naming rules and build linker command files.
The GNU libraries do not support word–sized–access–only memory systems.
Originally, the Am29000 processor could not support byte–sized accesses and all
memory accesses were performed on word sized objects. This required read–
modify–write access sequences to manipulate byte sized objects located in memory.
Because all current 29K processors support byte–size access directly, there is no need
to have specialized libraries for accessing bytes. However, the High C 29K tool chain
still ships the
old
libraries to support existing (pre–Rev D, 1990) Am29000 proces-
sors.
The
hc29
driver normally links with three libraries: the ANSI standard C sup-
port library (libs*.lib), the IEEE floating–point routine library (libieee.lib), and the
HIF system call interface library (libos.lib). There are actually eight ANSI libraries.
The driver selects the appropriate library depending on the selected switches. The
reason for so many libraries is due to the support of the old word–only memory sys-
tems, the option to talk with an Am29027 coprocessor directly, and finally, the option
to select Am29050 processor optimized code.
The ANSI library includes transcendental routines (
sin()
,
cos()
, etc.) which
were developed by Kulus Inc. These routines are generally faster than the transcen-
dental routines developed by QTC Inc., which were at one time shipped with High C
29K. The QTC transcendentals are still supplied as the libq*.lib libraries, and must
now be explicitly linked. The Kulus transcendentals also have the advantage in that
they support double and single floating–point precision. The routines are named
slightly differently, and the compiler automatically selects the correct routine de-
pending on parameter type. The GNU libraries (version 2.1) include the QTC tran-
scendental routines.
Most 29K processors do not support floating–point instructions directly (see
section 3.1.7). When a non–implemented floating–point instruction is encountered,
the processor takes a trap, and operating system routines emulate the operation in
trapware code. If a system has an Am29027 floating–point coprocessor available,