Intel NIOS II Owner Reference Manual page 20

Table of Contents

Advertisement

Related Information
Nios II Custom Instruction User Guide
2.3.3.1. Nios II Floating Point Hardware 2 Component
Table 3.
Floating Point Custom Instruction 2 Operation Summary
In this table, a and b are assumed to be single-precision floating-point values.
(3)
(4)
Operation
N
fdivs
255
fsubs
254
fadds
253
fmuls
252
fsqrts
251
floatis
250
fixsi
249
round
248
Reserved
234 to 247
fmins
233
fmaxs
232
fcmplts
231
fcmples
230
fcmpgts
229
fcmpges
228
fcmpeqs
227
fcmpnes
226
fnegs
225
fabss
224
(3)
These names match the names of the corresponding GCC command-line options except for
round, which GCC does not support.
(4)
Specifies the 8 bit fixed custom instruction for the operation.
(5)
Nios II GCC version 4.7.3 is not able to reliably replace calls to newlib floating-point functions
with the equivalent custom instruction even though it has Flush to 0
command-line options and pragma support for these operations. Instead, the custom
instruction must be invoked directly using the GCC
Floating Point Custom Instruction 2 component includes a C header file that provides the
required
#define
Nios II Processor Reference Guide
20
Cycles
16
a ÷ b
5
a – b
5
a + b
4
a x b
8
a
4
int_to_float(a)
2
float_to_int(a)
2
float_to_int(a)
Undefined
Undefined
1
(a < b) ? a : b
1
(a < b) ? b : a
1
(a < b) ? 1 : 0
1
(a ≤ b) ? 1 : 0
1
(a > b) ? 1 : 0
1
(a ≥ b) ? 1 : 0
1
(a = b) ? 1 : 0
1
(a ≠ b) ? 1 : 0
1
-a
1
|a|
macros to invoke the custom instruction directly.
Result
Subnormal
Flush to 0
Flush to 0
Flush to 0
Flush to 0
Not applicable
Flush to 0
Flush to 0
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
Supported
__builtin_custom_*
2. Processor Architecture
NII-PRG | 2018.04.18
Rounding
GCC
Inference
Nearest
a / b
Faithful
a – b
Faithful
a + b
Faithful
a * b
(5)
Faithful
sqrtf()
Not applicable
Casting
Truncation
Casting
(5)
Nearest
lroundf()
(5)
None
fminf()
(5)
None
fmaxf()
None
a < b
None
a <= b
None
a > b
None
a >= b
None
a == b
None
a != b
None
-a
None
fabsf()
<operation>
-mcustom-
facility. The

Advertisement

Table of Contents
loading

Table of Contents