ColdFire C/C++ Compiler and Assembler User Guide
INTRODUCTION
C/C++ COMPILER
Running the Compiler from the Command Line
Compiler command line options
Compile Only (/c)
Generate Assembler Code (/Fa)
Generate Assembler Code Listing (/Fc)
Generate Debug Information (/DEBUG)
Define Identifier (/D)
Warning as Errors (/WX)
Warning Level 0 (/W0)
Warning Level 1 (/W1)
Warning Level 2 (/W2)
Warning Level 3 (/W3)
Warning Level 4 (/W4)
Use Register Keywords (/Or)
Global Register Allocation (/Og)
Enable Advanced Features (/Oc)
Use __cdecl Calling Convention (/Gd)
Use __fastcall Calling Conventions (/Gr)
Use __stdcall Calling Convention (/Gz)
Interrupt Vector Offset (/VO:)
Generate 5202 Code (/CF5202)
Generate 5203 Code (/CF5203)
Generate 5204 Code (/CF5204)
Generate 5206 Code (/CF5206)
Generate 5206e/5272 Code (/CF5206E)
Generate 5249 Code (/CF5249)
Generate 5282 Code (/CF5282)
Generate 5235 Code (/CF5235)
Generate 5307 Code (/CF5307)
Generate 5407 Code (/CF5407)
Generate CF5485 Code (/CF5485)
Structure and union packing (/Zp)
C Language Definition
ANSI C Support
1999 ANSI C Support
Additional Features
Data Sizes
Arithmetic Conversions
C++ Language Definition
Embedded C++
Data Types
Function Calling Conventions
Introduction
Traditional Calling Convention
CDecl Calling Convention
Fast Call Calling Convention
StdCall Calling Convention
Scratch Registers
Inline Functions
Pragmas
#pragma version
#pragma date
#pragma time
#pragma message
#pragma code_seg
#pragma const_seg
#pragma bss_seg
#pragma data_seg
#pragma optimize
#pragma pack
Interrupt Functions
Manual Coding of Interrupt Vector
Automatic Coding of Interrupt Vector
Runtime Modification of Interrupt Vectors
In-Line Assembler Code
Introducing In-Line Assembler Code
Accessing Global Variables
Accessing Static Variables
Accessing Automatic Variables and Function Parameters
Function Return Value
Predefined Macros
ANSI Predefined Macros
Compiler Specific Predefined Macros
Compiler Support Files
Introducing compiler support files
Startup Files
CROSS ASSEMBLER
Assembler Source Code Format
Introducing Assembler Source Code Format
Label Field
Operation Field
Opcode Extensions
Operand Field
Comment Field
Assembler Expressions
Assembler Expressions
Integer Numbers
Literals
Symbols
Examples
Assembly List Format
Introducing Assembly List Format
Page Header
Source and Object Code List
Field 1 Line Number or Sequence Number
Field 2 Program Counter Value or Value of Expression
Field 3 Program Code
Field 4 Label Field
Field 5 Operation Field
Field 6 Operand Field
Field 7 Comment Field
Page Width
Error Line
Symbol Table
Conditional Assembly
Assembler Macros
Introduction to Assembler Macros
Dummy Arguments
Dummy Labels
NARG Symbol
LINKER
Running the Linker from the Command Line
Default Filenames
Linker Response File
Linker Command Line Options
Generate S Record Output (/SREC)
Generate S19 Record Output (/S19)
Generate S28 Record Output (/S28)
Generate S37 Record Output (/S37)
Generate S29 Record Output (/S29)
Generate S39 Record Output (/S39)
Generate Intel Hex Output (/HEX)
Generate IEEE Binary Output (/IEEE)
Generate IEEE ASCII Output (/IEEEA)
Generate Plain Binary Output (/BIN)
Generate Relocatable Binary Output (/RBIN)
Generate Error File (/Fe)
Specify Object Code Filename (/Fo)
Specify Ram Limits (/RAM)
Specify ROM Limits (/ROM:)
Place Program Code in RAM (/NOROM)
Specify Segment Addresses and Order (/CODE /MIXED /RDATA /DATA)
Use Linker Script (/Ds:)
Translate Sections Names (/Ts)
Linker Scripts
Introduction
Linker Script Language
File Structure
Memory Block
Sections Block
Sections Block Contents
Assignments
Output Section Definition
Section Definition Content
Storage Address
Run-time Address
Alignment
Type Specification
Memory Region Name
Groups
Assignment Statements
Expressions
Drag And Drop Scripting
Introduction
C COMPILER LIBRARY FUNCTIONS
Introduction to Compiler Library Functions
Detailed Descriptions
Introducing Detailed Descriptions
abs() absl()
acos() acosl()
asctime()
asin() asinl()
atan() atanl()
atoi() atol() atof()atolf()
calloc()
ceil() ceill()
clearerr()
cos() cosl()
cosh() coshl()
difftime()
_ecvt() _ecvtl
exit()
exp() expl()
fabs() fabsl()
_fcvt() _fcvtl
ferror()
fgetc()
fgets()
fileno()
floor() floorl()
fprintf()
fputs()
free()
frexp() frexpl()
fscanf()
getc()
getch()
getchar()
getche()
gets()
_getvect()
gmtime()
isalnum()
isalpha()
isascii()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
itoa()
ldexp() ldexpl()
log() logl()
log10() log10l()
ltoa()
malloc()
memchr()
memcmp()
memcpy()
memmove()
memset()
mktime()
pow() powl()
printf()
putc()
putch()
putchar()
puts()
rand()
realloc()
sbrk()
scanf()
_setvect()
sprintf()
sin() sinl()
sinh() sinhl()
sqrt() sqrtl()
srand()
sscanf()
strcspn()
strcat()
strchr()
strcmp()
strcpy()
_stricmp()
strlen()
strncat()
strncmp()
strncpy()
strpbrk()
strrchr()
strspn()
strstr()
tan() tanl()
tanh() tanhl()
time()
toascii()
tolower()
toupper()
ultoa()
ungetc()
ungetch()
vprintf()
vsprintf()
vfprintf()
C++ COMPILER LIBRARY FUNCTIONS
String Class Functions
Member Functions
Constructors
Destructors
Assignment Operators
Iterator Access
Size and Capacity Operations
Element Access
operator+=
append
assign
insert
erase
replace
Data Access
Copy
Swap
find
rfind
find_first_of
find_last_of
find_first_not_of
find_last_not_of
substr
compare
Non-Member Functions
Addition
Relational
Swap
new and delete
ASSEMBLER DIRECTIVES
Introducing Assembler Directives
Assembly Options
Introducing Assembly Options
CF5202
CF5203
CF5204
CF5206
CF5206E
CF5307
CF5407
CF5249
CF5282
CF5235
CF5485
CLIST/NOCLIST
LIST/NOLIST
LISTF
MC/NOMC
MD/NOMD
MEX/NOMEX
OBJ/NOOBJ
PAGE/NOPAGE
SYM
UNA/NOUNA
Other Assembler Directives
Introducing Other Assembler Directives
COMMON Specify Common Section
DC Define Constant Data
DS Define Storage
END Specifies End of Source Code
ENDC Specifies the End of Conditional Assembly
ENDM Specifies the End of a Macro Definition
EQU Define Symbol Value (Invariable)
FAIL Generate Assembly Warning
FIELDS Set Object Listing Field Widths
IFC IFNC IFIC IFINC Conditional Assembly with String Comparison
IFcc Conditional Assembly with Numerical Comparison
INCLUDE Include Another Source Code File
INCLUDELIB Search Specified Library
MACR Macro Definition
NAM Program Name
OPT Assembly Options
ORG Specifies Absolute Code Section
PAGE Paging Control
PAGEWIDTH Adjust Page Width of Assembly Listing
SECTION Define Relocatable Section (or Segment)
SET Define Symbol Value (Variable)
SPC Output Blank Lines
TTL Specify Title
XDEF Define External Symbols
XREF Reference External Symbols
MICROPROCESSOR INSTRUCTION REFERENCE
Data Movement Instructions
Integer Arithmetic Instructions
Logical Instructions
Shift Instructions
Bit Manipulation Instructions
Program Control Instructions
System Control Instructions
MAC Unit Instructions
Additional 5407 Instructions
ADD
ADDA
ADDI
ADDQ
ADDX
AND
ANDI
ASL
ASR
BCC
BCHG
BCLR
BCS
BEQ
BGE
BGT
BHI
BITREV
BLE
BLS
BLT
BMI
BNE
BPL
BRA
BSET
BSR
BTST
BVC
BVS
BYTEREV
CLR
CMP
CMPA
CMPI
CPUSHL
DIVS
DIVU
EOR
EORI
EXT
EXTB
FABS
FADD
FBEQ
FBNE
FBGT
FBNGT
FBGE
FBNGE
FBLT
FBNLT
FBLE
FBNLE
FBGL
FBNGL
FBGLE
FBNGLE
FBOGT
FBULE
FBOGE
FBULT
FBOLT
FBUGE
FBOLE
FBUGT
FBOGL
FBUEQ
FBOR
FBUN
FBF
FBT
FBSF
FBST
FBSEQ
FBSNE
FCMP
FDIV
FF1
FINT
FINTRZ
FMOVE
FMOVE from FPCR
FMOVE from FPIAR
FMOVE from FPSR
FMOVE to FPCR
FMOVE to FPIAR
FMOVE to FPSR
FMOVEM
FMUL
FNEG
FNOP
FSQRT
FSUB
FTST
FSAVE
FRESTORE
HALT
INTOUCH
JMP
JSR
LEA
LINK
LSL
LSR
MAC
MACL
MOV3Q
MOVE
MOVEA
MOVE from CCR
MOVE to CCR
MOVE from SR
MOVE to SR
MOVE from ACC
MOVE from MACSR
Move from Mask
MOVE to ACC
MOVE MACSR to CCR
MOVE to MACSR
MOVE to MASK
MOVE USP
MOVEC
MOVEM
MOVEQ
MSAC
MSACL
MULS
MULU
MVS
MVZ
NEG
NEGX
NOP
NOT
OR
ORI
PEA
PULSE
REMS
REMU
RTE
RTS
SATS
SCC
SCS
SEQ
SF
SGE
SGT
SHI
SLE
SLS
SLT
SMI
SNE
SPL
ST
STOP
STRLDSR
SUB
SUBA
SUBI
SUBQ
SUBX
SVC
SVS
SWAP
TAS
TRAP
TRAPF
TST
UNLK
WDDATA
WDEBUG