AMD Typewriter x86 사용자 설명서

다운로드
페이지 256
22007E/0—November 1999
AMD Athlon™ Processor x86 Code Optimization 
Ensure Floating-Point Variables and Expressions are of Type Float
13
3
C Source Level Optimizations
This chapter details C programming practices for optimizing
code for the AMD Athlon™ processor. Guidelines are listed in
order of importance.
Ensure Floating-Point Variables and Expressions are of 
Type Float
For compilers that generate 3DNow!™ instructions, make sure
that all floating-point variables and expressions are of type
float. Pay special attention to floating-point constants. These
require a suffix of “F” or “f” (for example, 3.14f) in order to be
of type float, otherwise they default to type double. To avoid
automatic promotion of float arguments to double, always use
function proto types for all functions that acce pt float
arguments.
Use 32-Bit Data Types for Integer Code
U s e   3 2 -b i t   d a t a   t y p e s   f o r   i n t e g e r   c o d e .   C o m p i l e r
implementations vary, but typically the following data types are
included — int, signed, signed int, unsigned, unsigned int, long,
signed long, long int, signed long int, unsigned long, 
and unsigned
long int
.