Tag: adx

adcx和adox的测试用例

我正在测试带有进位的英特尔ADX添加和添加溢出到管道添加大整数。 我想看看预期的代码生成应该是什么样子。 从_addcarry_u64和_addcarryx_u64与MSVC和ICC ,我认为这将是一个合适的测试用例: #include #include #include “immintrin.h” int main(int argc, char* argv[]) { #define MAX_ARRAY 100 uint8_t c1 = 0, c2 = 0; uint64_t a[MAX_ARRAY]={0}, b[MAX_ARRAY]={0}, res[MAX_ARRAY]; for(unsigned int i=0; i< MAX_ARRAY; i++){ c1 = _addcarryx_u64(c1, res[i], a[i], (unsigned long long int*)&res[i]); c2 = _addcarryx_u64(c2, res[i], b[i], (unsigned long long int*)&res[i]); } return 0; […]