Short: Optimizing ISO C compiler, M68k/AmigaOS Author: vb@compilers.de (Volker Barthelmann),frank@phoenix.owl.de (Frank Wille) Uploader: frank phoenix owl de (Frank Wille) Type: dev/c Version: 0.8j Replaces: dev/c/vbcc.*;dev/c/vbcc_MorphOS.* Architecture: m68k-amigaos vbcc - portable ISO/ANSI C compiler (c) in 1995-2006 by Volker Barthelmann INTRODUCTION vbcc is a portable and retargetable ISO/ANSI C compiler. This archive contains the binaries for the compiler, preprocessor, assembler, linker, frontend, message browser, as well as several other tools to generate code for your installed targets. All major parts of this distribution (including compiler, preprocessor, libraries etc.) have been built using this system. FEATURES vbcc.. - is portable and retargetable - comes with a global optimizer that can e.g. do common subexpression elimination, constant propagation, function inlining and several other optimizations across functions and modules (depending on optimization level) - should be compliant to ANSI/ISO89 and partially ISO99 - can generate code that runs on a plain 68000 CPU - can generate code optimized for 020/030, 040 or 060 - can generate code that uses the 68881/2, 68040/060 FPUs directly and comes with appropriate math-libraries - can generate code that runs on PowerUp-boards, MorphOS systems and AmigaOS4 systems - generates standard Amiga-68k-objects, PPC-ELF-objects or WarpOS-EHF-objects - offers a lot of useful extensions like variable-attributes and #pragmas - comes with a message browser - offers a lot of error/warning messages that can be turned on/off separately WHAT'S NEW Some changes since V0.8i: * New: Real bitfield support, including packed bitfields. In the past a bitfield was simply treated as an int. * New: PPC code generator supports C99 variable-length arrays (like 68k and i386 code generator). * New: Option -use-commons in PPC code generator makes better use of common symbols. Also use common symbols in small-data and baserel32 modes. * New: Config files for MorphOS, PowerUp and OS4 (vclib and newlib) include -use-commons option by default now. * New: Preprocessor supports the __AMIGADATE__ macro. * New: vclib: Flush output buffers from interactive streams when reading input from another interactive stream. This is not required by ISO-C, but to make vclib more compatible to other clib implementations. * New: vclib: Small data math libraries for PowerUp, AmigaOS4 and MorphOS. * New: vasm: Supports include directories, include files, macros, conditional assembly and local symbols. This finally allows to compile the whole vclib on any host platform, without the need for PhxAss. * New: vasmx86: The 80x86 CPU is supported. First vbcc/AROS versions are being tested, but not ready for the public at the moment. * New: vlink: Target elf32amiga was splitted into elf32powerup and elf32morphos (OS4 uses standard elf32ppcbe executables). The latter one will make sure that .sdata and .sbss sections are not merged to save space in the object file. MorphOS guarantees to load .sbss sections directly behind .sdata. * Fixed an internal error when a struct is redeclared with different identifiers. * Fixed crash when nesting too many #pragma pack() directives. * #pragma pack() worked incorrectly. It should only enforce the demanded alignment when the natural alignment of the element is higher. * PPC code generator: Function pointers in small-data mode were incorrectly referenced in the small-data section. * PPC code generator: Crash when passing a 64-bit argument in an if(0) clause. * PPC code generator (WarpOS/PowerOpen-ABI): Memory was freed twice when compiling an "if (0 && condition)" line. * PPC code generator (WarpOS/PowerOpen-ABI): __saveds no longer restores rtoc register. * PPC code generator: Better small-data support. Makes sure that unitialized data goes into .sbss instead of .sdata. * M68k code generator: Fixed "target-error: illegal use of register" when switch statement is used with a 64 bit argument. * M68k code generator: Illegal instruction in full optimization mode, when copying a string pointer. * M68k code generator: Illegal instruction in mathieee (soft-float) mode. * Preprocessor: Fixed crash with unexpected ' character following an #include directive. * vclib: Fixed wrong sign returned by 68000 32-bit modulo operation. * vasmppc: Maximum offset into a small-data section was erroneously limited to 32767 bytes. Fixed for whole 64k range. * fd2pragma: Fixed WarpOS inline generation, which produced illegal varargs prototypes like __W3D_RequestModeTags(...). REQUIREMENTS To use vbcc you need: - an Amiga with OS 2.0 or higher - enough RAM (it is possible to translate small programs with 1MB, but for larger programs much more will be needed) Stuff that is not needed, but may be very useful: - harddisk - editor - make, touch etc. - the Amiga OS-includes (they can be found on certain CDs) - pipe-command (to use the message browser) Also you should know how to use the shell and you should know ANSI C (if you need a book I recommend (like everyone) "The C Programming Language, Second Edition, ANSI C" by Kernighan and Ritchie). LEGAL Note that this distribution contains several programs, libraries etc. that are from different authors and are under different legal status. So always read the corresponding documentation to find out under what conditions a certain file may be used, distributed etc. For the most part you can assume that you may use everything for non-commercial purposes and may distribute the unchanged archive in whole. Changing any parts from this archive, distributing parts of it or using it commercially might be legal for certain parts, but illegal for others, so read all docs carefully before doing any of the above. DOCUMENTATION Look for documentation in the doc-subdirectory. First, read vbcc.pdf or vbcc.html to learn about the compiler and frontend. For the other tools like assemblers and linkers, consider the remaining documentation which can be found in this subdirectory. BUGREPORTS/COMMENTS If you think vbcc generates bad code, throws enforcer hits, crashes, seems to be not ISO-compliant etc. and the problem is not mentioned anywhere in this docs as known problem, please send a mail with your system configuration, the vbcc version, the command line you used, the source that caused the problem and a brief description of the problem to vb@compilers.de and/or frank@phoenix.owl.de Also if you find problems with the includes, the libraries or you have suggestions, dislikes etc. send us a mail. Corrections, improvements etc. of the manuals are appreciated, too. Volker Barthelmann vb@compilers.de Frank Wille frank@phoenix.owl.de