22 March 2016, 19:02 | #1 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
__builtin_ function link library for vbcc
I have created a new builtin link library for vbcc. It is possible to provide some compatibility with GCC/Clang __builtin_ functions. The following functions are included so far.
__builtin_bswap16(), __builtin_bswap32(), __builtin_bswap64(), __builtin_clz(), __builtin_clzl(), __builtin_clzll(), __builtin_clz16(), __builtin_clz32(), __builtin_clz64(), __builtin_ctz(), builtin_ctzl, __builtin_ctzll(), __builtin_ctz16(), __builtin_ctz32(), __builtin_ctz64(), __builtin_ffs(), __builtin_ffsl(), __builtin_ffsll(), __builtin_ffs16(), __builtin_ffs32(), __builtin_ffs64(), __builtin_parity(), __builtin_parityl(), __builtin_parityll(),__builtin_parity16(), __builtin_parity32(), __builtin_parity64(), __builtin_popcount(), __builtin_popcountl(), __builtin_popcountll(), __builtin_popcount16(), __builtin_popcount32(), __builtin_popcount64() CPU specific instructions and assembler inlines are used to increase performance when available. I have included builtin.lib for the 68000 and builtin020.lib for the 68020 AmigaOS but build scripts for MorphOS, WarpOS and AmigaOS 4 are provided and CPU assembler inlines for 68k/ColdFire, PPC and x86 (all software builds from the C source are possible also). Please report bugs, problems and suggestions to this thread. More __builtin_ functions could be added but there are also limitations to an external library. Most of the floating point __builitin_ functions could be added with defines to C99 functions if needed (it is better to change the source to C99 functions in most cases). Customization of the current library is very easy if specific support is needed. The library also provides a simple example of how to create a link library for vbcc. Instructions for installation and usage are in the archive readme. Source is included. Special thanks to Frank Wille for his help. Edit: A new beta version has been attached. Changes: A builtin.h error caused some ctz functions to use clz functions instead. Documentation improved. Constant in parity16.c, parity32.c and parity64.c matches datatype. The builtin.h file in the include directory is the same size as before but has been changed! The only other change is the builtin.readme. All libraries are the same. Last edited by matthey; 16 May 2016 at 01:19. |
25 March 2016, 23:28 | #2 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Thanks!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Library function call name | Dr. MefistO | Coders. General | 12 | 17 December 2015 10:32 |
creating a dynamic exec library with vbcc ? | weiju | Coders. System | 2 | 20 April 2015 19:13 |
execute function from dos.library | Foul | Coders. Asm / Hardware | 5 | 08 August 2012 17:56 |
dos.library LockRecord() function fails | LamboJay | support.WinUAE | 12 | 24 September 2010 21:05 |
|
|