EasyManuals Logo

Intel ARCHITECTURE IA-32 User Manual

Intel ARCHITECTURE IA-32
568 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #139 background imageLoading...
Page #139 background image
General Optimization Guidelines 2
2-67
Assembly/Compiler Coding Rule 32. (H impact, L generality) Minimize the
number of changes to the rounding mode. Do not use changes in the rounding
mode to implement the floor and ceiling functions if this involves a total of
more than two values of the set of rounding, precision and infinity bits.
Precision
If single precision is adequate, use it instead of double precision. This is
true because:
Single precision operations allow the use of longer SIMD vectors,
since more single precision data elements can fit in a register.
If the precision control (PC) field in the x87 FPU control word is set
to “Single Precision,” the floating-point divider can complete a
single-precision computation much faster than either a
double-precision computation or an extended double-precision
computation. If the PC field is set to “Double Precision,” this will
enable those x87 FPU operations on double-precision data to
complete faster than extended double-precision computation. These
characteristics affect computations including floating-point divide
and square root.
positive:
fstp dword ptr[ecx] ; 17-18 result of subtraction
mov ecx,[ecx] ; dword of diff(single precision)
add esp,16
add ecx,7fffffffh ; if diff<0 then decrement integer
sbb eax,0 ; dec eax (subtract CARRY flag)
ret
integer_QnaN_or_zero:
test edx,7fffffffh
jnz arg_is_not_integer_QnaN
add esp,16
ret
Example 2-23 Algorithm to Avoid Changing the Rounding Mode (continued)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Intel ARCHITECTURE IA-32 and is the answer not in the manual?

Intel ARCHITECTURE IA-32 Specifications

General IconGeneral
Instruction Setx86
Instruction Set TypeCISC
Memory SegmentationSupported
Operating ModesReal mode, Protected mode, Virtual 8086 mode
Max Physical Address Size36 bits (with PAE)
Max Virtual Address Size32 bits
ArchitectureIA-32 (Intel Architecture 32-bit)
Addressable Memory4 GB (with Physical Address Extension up to 64 GB)
Floating Point Registers8 x 80-bit
MMX Registers8 x 64-bit
SSE Registers8 x 128-bit
RegistersGeneral-purpose registers (EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP), Segment registers (CS, DS, SS, ES, FS, GS), Instruction pointer (EIP), Flags register (EFLAGS)
Floating Point UnitYes (x87)

Related product manuals