mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-13 05:40:59 +00:00
![Jeroen Ketema](/assets/img/avatar_default.png)
v2: - use quotes instead of <> - add include to r600/lib/math/nextafter.c changed Reviewed-by: Tom Stellard <tom@stellard.net> Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 211576
54 lines
1.7 KiB
Common Lisp
54 lines
1.7 KiB
Common Lisp
#include <clc/clc.h>
|
|
#include "../clcmacro.h"
|
|
|
|
// From add_sat.ll
|
|
_CLC_DECL char __clc_add_sat_s8(char, char);
|
|
_CLC_DECL uchar __clc_add_sat_u8(uchar, uchar);
|
|
_CLC_DECL short __clc_add_sat_s16(short, short);
|
|
_CLC_DECL ushort __clc_add_sat_u16(ushort, ushort);
|
|
_CLC_DECL int __clc_add_sat_s32(int, int);
|
|
_CLC_DECL uint __clc_add_sat_u32(uint, uint);
|
|
_CLC_DECL long __clc_add_sat_s64(long, long);
|
|
_CLC_DECL ulong __clc_add_sat_u64(ulong, ulong);
|
|
|
|
_CLC_OVERLOAD _CLC_DEF char add_sat(char x, char y) {
|
|
return __clc_add_sat_s8(x, y);
|
|
}
|
|
|
|
_CLC_OVERLOAD _CLC_DEF uchar add_sat(uchar x, uchar y) {
|
|
return __clc_add_sat_u8(x, y);
|
|
}
|
|
|
|
_CLC_OVERLOAD _CLC_DEF short add_sat(short x, short y) {
|
|
return __clc_add_sat_s16(x, y);
|
|
}
|
|
|
|
_CLC_OVERLOAD _CLC_DEF ushort add_sat(ushort x, ushort y) {
|
|
return __clc_add_sat_u16(x, y);
|
|
}
|
|
|
|
_CLC_OVERLOAD _CLC_DEF int add_sat(int x, int y) {
|
|
return __clc_add_sat_s32(x, y);
|
|
}
|
|
|
|
_CLC_OVERLOAD _CLC_DEF uint add_sat(uint x, uint y) {
|
|
return __clc_add_sat_u32(x, y);
|
|
}
|
|
|
|
_CLC_OVERLOAD _CLC_DEF long add_sat(long x, long y) {
|
|
return __clc_add_sat_s64(x, y);
|
|
}
|
|
|
|
_CLC_OVERLOAD _CLC_DEF ulong add_sat(ulong x, ulong y) {
|
|
return __clc_add_sat_u64(x, y);
|
|
}
|
|
|
|
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, char, add_sat, char, char)
|
|
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, uchar, add_sat, uchar, uchar)
|
|
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, short, add_sat, short, short)
|
|
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, ushort, add_sat, ushort, ushort)
|
|
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, int, add_sat, int, int)
|
|
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, uint, add_sat, uint, uint)
|
|
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, long, add_sat, long, long)
|
|
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, ulong, add_sat, ulong, ulong)
|