Some checks failed
CMake / build (OFF, AUTO, SYSTEM, x64, ref, 10, ) (push) Has been cancelled
CMake / build (ON, 32, BUILD, x64, ref, 10, .cmake/32bit.cmake) (push) Has been cancelled
CMake / build (ON, 32, SYSTEM, arm64, ref, 10, ) (push) Has been cancelled
CMake / build (ON, 32, SYSTEM, x64, ref, 10, ) (push) Has been cancelled
CMake / build (ON, AUTO, MINI, x64, ref, 10, ) (push) Has been cancelled
CMake / build (ON, AUTO, SYSTEM, arm64, ref, 10, ) (push) Has been cancelled
CMake / build (ON, AUTO, SYSTEM, x64, broadwell, 10, ) (push) Has been cancelled
CMake / build (ON, AUTO, SYSTEM, x64, ref, 10, ) (push) Has been cancelled
Big-endian s390x test (Daily Workflow) / s390-be (Debug) (push) Has been cancelled
Big-endian s390x test (Daily Workflow) / s390-be (Release) (push) Has been cancelled
Benchmarks (Daily Workflow) / benchmarks (arm64, ref, ) (push) Has been cancelled
Benchmarks (Daily Workflow) / benchmarks (x64, broadwell, 10, ) (push) Has been cancelled
Benchmarks (Daily Workflow) / benchmarks (x64, ref, ) (push) Has been cancelled
Benchmarks (Daily Workflow) / benchmarks (x64, ref, 10, .cmake/32bit.cmake) (push) Has been cancelled
Daily workflow for various checks / checks (push) Has been cancelled
16 lines
388 B
C
16 lines
388 B
C
#include <fp.h>
|
|
|
|
/*
|
|
* If ctl == 0x00000000, then *d is set to a0
|
|
* If ctl == 0xFFFFFFFF, then *d is set to a1
|
|
* ctl MUST be either 0x00000000 or 0xFFFFFFFF.
|
|
*/
|
|
void
|
|
fp_select(fp_t *d, const fp_t *a0, const fp_t *a1, uint32_t ctl)
|
|
{
|
|
digit_t cw = (int32_t)ctl;
|
|
for (unsigned int i = 0; i < NWORDS_FIELD; i++) {
|
|
(*d)[i] = (*a0)[i] ^ (cw & ((*a0)[i] ^ (*a1)[i]));
|
|
}
|
|
}
|