Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Jun 28, 2024
1 parent a0692dd commit 1dee2b2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
arch_with_features: [
# {arch: armv7, feature: none, arch_cflags: none},
# {arch: aarch64, feature: none, arch_cflags: none},
# {arch: aarch64, feature: crypto+crc, arch_cflags: none},
{arch: armv7, feature: none, arch_cflags: '-mcpu=cortex-a32 -mfpu=neon-fp-armv8 -O3'}
{arch: aarch64, feature: crypto+crc, arch_cflags: -O3},
# {arch: armv7, feature: none, arch_cflags: '-mcpu=cortex-a32 -mfpu=neon-fp-armv8'}
]
cxx_compiler: [g++-10, clang++-11]
steps:
Expand Down
34 changes: 14 additions & 20 deletions tests/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,6 @@ enum result_t {
};
extern int32_t NaN;
extern int64_t NaN64;
static inline float generate_all_ones_float()
{
union {
uint32_t i;
float f;
} u;
u.i = UINT32_MAX;
return u.f;
}
static inline double generate_all_ones_double()
{
union {
uint64_t i;
double f;
} u;
u.i = UINT64_MAX;
return u.f;
}
#define ALL_BIT_1_32 generate_all_ones_float()
#define ALL_BIT_1_64 generate_all_ones_double()

typedef union bit64_union_t {
double f64;
Expand All @@ -95,6 +75,20 @@ typedef union bit32_union_t {
int32_t i32;
uint32_t u32;
} bit32_union_t;
static inline float generate_all_ones_float()
{
bit32_union_t u;
u.i32 = UINT32_MAX;
return u.f32;
}
static inline double generate_all_ones_double()
{
bit64_union_t u;
u.i64 = UINT64_MAX;
return u.f64;
}
#define ALL_BIT_1_32 generate_all_ones_float()
#define ALL_BIT_1_64 generate_all_ones_double()

template <typename T>
result_t validate128(T a, T b)
Expand Down

0 comments on commit 1dee2b2

Please sign in to comment.