Added the "long" modffi tests. The tests could not be added to the existing ffi_types test because two .exp files were required for the 32-bit and 64-bit results. Code common to both the ffi_types and type "long" tests was factored into ffi_int_base. ffi_types was renamed to ffi_int_types to group the related tests under the "ffi_int" prefix. Signed-off-by: Michael Sawyer <mjfsawyer@gmail.com>
41 lines
496 B
C
41 lines
496 B
C
#include <stdint.h>
|
|
|
|
int8_t f8i(int8_t x) {
|
|
return x ^ 1;
|
|
}
|
|
|
|
uint8_t f8u(uint8_t x) {
|
|
return x ^ 1;
|
|
}
|
|
|
|
int16_t f16i(int16_t x) {
|
|
return x ^ 1;
|
|
}
|
|
|
|
uint16_t f16u(uint16_t x) {
|
|
return x ^ 1;
|
|
}
|
|
|
|
int32_t f32i(int32_t x) {
|
|
return x ^ 1;
|
|
}
|
|
|
|
uint32_t f32u(uint32_t x) {
|
|
return x ^ 1;
|
|
}
|
|
|
|
int64_t f64i(int64_t x) {
|
|
return x ^ 1;
|
|
}
|
|
|
|
uint64_t f64u(uint64_t x) {
|
|
return x ^ 1;
|
|
}
|
|
|
|
long fli(long x) {
|
|
return x ^ 1;
|
|
}
|
|
|
|
unsigned long flu(unsigned long x) {
|
|
return x ^ 1;
|
|
}
|