- •General
- •Introduction
- •Legal
- •Installation
- •Installing for DOS/Windows
- •Installing for AmigaOS
- •Tutorial
- •The Frontend
- •Usage
- •The Compiler
- •General Compiler Options
- •Errors and Warnings
- •Data Types
- •Optimizations
- •Register Allocation
- •Flow Optimizations
- •Common Subexpression Elimination
- •Copy Propagation
- •Constant Propagation
- •Dead Code Elimination
- •Loop-Invariant Code Motion
- •Strength Reduction
- •Induction Variable Elimination
- •Loop Unrolling
- •Function Inlining
- •Intrinsic Functions
- •Unused Object Elimination
- •Alias Analysis
- •Inter-Procedural Analysis
- •Cross-Module Optimizations
- •Instruction Scheduling
- •Debugging Optimized Code
- •Pragmas
- •Register Parameters
- •Inline-Assembly Functions
- •Variable Attributes
- •Type Attributes
- •__typeof
- •__offsetof
- •Known Problems
- •Credits
- •Additional options
- •Small data
- •Small code
- •FPUs
- •Math
- •Stack
- •Known problems
- •PowerPC Backend
- •Additional options for this version
- •Stack
- •Stdarg
- •Known problems
- •DEC Alpha Backend
- •Additional options for this version
- •Stdarg
- •i386 Backend
- •Additional options for this version
- •Stdarg
- •Known Problems
- •c16x Backend
- •Additional options for this version
- •Stdarg
- •Known Problems
- •Additional options for this version
- •Stack
- •Stdarg
- •Known Problems
- •Instruction Scheduler
- •Introduction
- •Usage
- •Known problems
- •C Library
- •Introduction
- •Legal
- •Embedded Systems
- •Startup
- •Heap
- •Input/Output
- •Floating Point
- •Useless Functions
- •Linking/Locating
- •Startup
- •Floating point
- •Stack
- •Small data model
- •Restrictions
- •Minimal startup
- •amiga.lib
- •auto.lib
- •extra.lib
- •ixemul
- •Introduction
- •Legal
- •Usage
- •Startup
- •Floating point
- •Stack
- •Small data model
- •Restrictions
- •libamiga.a
- •libauto.a
- •libextra.a
- •WarpOS/PPC
- •Startup
- •Floating point
- •Stack
- •Restrictions
- •amiga.lib
- •auto.lib
- •extra.lib
- •MorphOS/PPC
- •Floating point
- •Stack
- •Small data model
- •Restrictions
- •libamiga.a
- •libauto.a
- •libextra.a
- •List of Errors
- •Backend Interface
74 |
vbcc manual |
11.5.6 Minimal startup
The provided minimal startup code (‘minstart.o’) is used similarly like the one for 68k (See Section 11.4.6 [Minimal startup], page 69). Only use it if you know what you are doing.
11.5.7 libamiga.a
To write programs accessing AmigaOS (rather than standard C functions only), a replacement for the original (copyrighted) ‘amiga.lib’ is provided with vbcc. This replacement (‘libamiga.a’) automatically performs a necessary context switch to the 68k to execute the system call. Furthermore, it is adapted to vbcc, does not cause collisions with some functions (e.g. sprintf) provided by the original ‘amiga.lib’ and is available in small data.
Specify ‘-lamiga’ to link with ‘libamiga.a’.
11.5.8 libauto.a
This library corresponds to the AmigaOS/68k version (See Section 11.4.8 [auto.lib], page 70).
11.5.9 libextra.a
This library corresponds to the AmigaOS/68k version (See Section 11.4.9 [extra.lib], page 71).
11.6 WarpOS/PPC
This section describes specifics of the C library for WarpOS/PPC. The relevant files are ‘startup.o’, ‘vc.lib’, ‘m.lib’ ‘amiga.lib’ and ‘extra.lib’.
11.6.1 Startup
The startup code ‘startup.o’ sets up some global variables and initializes stdin, stdout and stderr. The exit code closes all open files and frees all memory. If you link with a math library the startup/exit code will be taken from there if necessary.
11.6.2 Floating point
Note that you have to link with a math library if you want to use floating point. All math functions, special startup code and printf/scanf functions which support floating point are contained in the math libraries only.
The math library (‘m.lib’) contains functions from Sun’s portable floating point library. Additionally, there is a vbcc version of Andreas Heumann’s ‘ppcmath.lib’. These routines are linked against Motorola’s floating point routines optimized for PowerPC and therefore are much faster.