RandomX: optimized program generation
This commit is contained in:
parent
7b51e23aa0
commit
5dcbab7e3a
4 changed files with 113 additions and 73 deletions
|
@ -126,6 +126,7 @@ FORCE_INLINE rx_vec_f128 rx_set1_vec_f128(uint64_t x) {
|
|||
|
||||
#define rx_xor_vec_f128 _mm_xor_pd
|
||||
#define rx_and_vec_f128 _mm_and_pd
|
||||
#define rx_and_vec_i128 _mm_and_si128
|
||||
#define rx_or_vec_f128 _mm_or_pd
|
||||
|
||||
#ifdef __AES__
|
||||
|
@ -278,6 +279,10 @@ FORCE_INLINE rx_vec_f128 rx_and_vec_f128(rx_vec_f128 a, rx_vec_f128 b) {
|
|||
return (rx_vec_f128)vec_and(a,b);
|
||||
}
|
||||
|
||||
FORCE_INLINE rx_vec_i128 rx_and_vec_i128(rx_vec_i128 a, rx_vec_i128 b) {
|
||||
return (rx_vec_i128)vec_and(a, b);
|
||||
}
|
||||
|
||||
FORCE_INLINE rx_vec_f128 rx_or_vec_f128(rx_vec_f128 a, rx_vec_f128 b) {
|
||||
return (rx_vec_f128)vec_or(a,b);
|
||||
}
|
||||
|
@ -444,6 +449,8 @@ FORCE_INLINE rx_vec_f128 rx_and_vec_f128(rx_vec_f128 a, rx_vec_f128 b) {
|
|||
return vreinterpretq_f64_u8(vandq_u8(vreinterpretq_u8_f64(a), vreinterpretq_u8_f64(b)));
|
||||
}
|
||||
|
||||
#define rx_and_vec_i128 vandq_u8
|
||||
|
||||
FORCE_INLINE rx_vec_f128 rx_or_vec_f128(rx_vec_f128 a, rx_vec_f128 b) {
|
||||
return vreinterpretq_f64_u8(vorrq_u8(vreinterpretq_u8_f64(a), vreinterpretq_u8_f64(b)));
|
||||
}
|
||||
|
@ -635,6 +642,13 @@ FORCE_INLINE rx_vec_f128 rx_and_vec_f128(rx_vec_f128 a, rx_vec_f128 b) {
|
|||
return x;
|
||||
}
|
||||
|
||||
FORCE_INLINE rx_vec_i128 rx_and_vec_i128(rx_vec_i128 a, rx_vec_i128 b) {
|
||||
rx_vec_i128 x;
|
||||
x.u64[0] = a.u64[0] & b.u64[0];
|
||||
x.u64[1] = a.u64[1] & b.u64[1];
|
||||
return x;
|
||||
}
|
||||
|
||||
FORCE_INLINE rx_vec_f128 rx_or_vec_f128(rx_vec_f128 a, rx_vec_f128 b) {
|
||||
rx_vec_f128 x;
|
||||
x.i.u64[0] = a.i.u64[0] | b.i.u64[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue