s5u1c33000c Epson Electronics America, Inc., s5u1c33000c Datasheet - Page 110

no-image

s5u1c33000c

Manufacturer Part Number
s5u1c33000c
Description
Cmos 32-bit Single Chip Microcomputer S5u1c33000c Manual
Manufacturer
Epson Electronics America, Inc.
Datasheet
CHAPTER 7: EMULATION LIBRARY
Chapter 7 Emulation Library
This chapter explains the emulation library of the S1C33 Family C Compiler Package, including floating-point
number and integral remainder calculating functions.
7.1 Overview
The S1C33 Family C Compiler Package contains a floating-point calculation library (fp.lib) that supports the
arithmetic operation, comparison, and type conversion of single-precision (32-bit) and double-precision (64-bit)
floating-point numbers which conforms to IEEE format, and an integral remainder calculation library (idiv.lib)
that supports the remainder calculation of integers.
The C Compiler gcc33 calls up functions from these libraries when a floating-point number or integral remainder
calculation is performed.
Since library functions exchange data via a designated general-purpose register, they can be called from an
assembly source.
To use emulation library functions, specify fp.lib and idiv.lib as libraries during linkage. Be sure to specify these
libraries in the order of fp.lib and idiv.lib.
All emulation library functions have been created and tuned by an assembly source.
7.2 Floating-point Calculation Library (fp.lib)
7.2.1 Function List
Table 7.2.1.1 below lists the floating-point calculation library (fp.lib) functions.
Double-precision
floating-point
calculation
Single-precision
floating-point
calculation
Type conversion
Floating-point
comparison
94
If the operation resulted in an overflow or underflow, infinity or negative infinity (see next section) is
returned.
The comparison function changes the C, V, Z or N flag of the PSR depending on the result of op1 - op2, as
shown below. Other flags are not changed.
During type conversion, values are rounded.
Classification
_ _ adddf3
_ _ subdf3
_ _ muldf3
_ _ divdf3
_ _ negdf2
_ _ addsf3
_ _ subsf3
_ _ mulsf3
_ _ divsf3
_ _ negsf2
_ _ fixunsdfsi
_ _ fixdfsi
_ _ floatsidf
_ _ fixunssfsi
_ _ fixsfsi
_ _ floatsisf
_ _ truncdfsf2
_ _ extendsfdf2
_ _ fcmpd
_ _ fcmps
Function name
Table 7.2.1.1 Floating-point calculation library (fp.lib) functions
Comparison result
Addition
Subtraction
Multiplication
Division
Sign inversion
Addition
Subtraction
Multiplication
Division
Sign inversion
double
double
int
float
float
int
double
float
Comparison of double type
Comparison of float type
op1 > op2
op1 = op2
op1 < op2
double
float
unsigned int
int
double
Functionality
unsigned int
int
float
EPSON
C
0
0
1
V
0
0
0
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)
(%r11, %r10)
(%r11, %r10)
(%r11, %r10)
(%r11, %r10)
(%r11, %r10)
%r10
%r10
%r10
%r10
%r10
%r10
%r10
(%r11, %r10)
%r10
%r10
%r10
%r10
(%r11, %r10)
%psr change
%psr change
Z
0
1
0
N
0
0
1
%r12 + %r13
%r12 - %r13
%r12 * %r13
%r12 / %r13
-%r12
(unsigned int) (%r13, %r12)
(int) (%r13, %r12)
(unsigned int) %r12
(int) %r12
(float) %r12
(float) (%r13, %r12)
(%r13, %r12) - (%r15, %r14)
%r12 - %13
(%r13, %r12) + (%r15, %r14)
(%r13, %r12) - (%r15, %r14)
(%r13, %r12) * (%r15, %r14)
(%r13, %r12) / (%r15, %r14)
-(%r13, %r12)
(double) %r12
(double) %r12
S5U1C33000C MANUAL

Related parts for s5u1c33000c