Skip to content

Commit 112a173

Browse files
committed
Add addcarryx test
1 parent 45f8450 commit 112a173

File tree

1 file changed

+10
-0
lines changed
  • crates/core_arch/src/x86

1 file changed

+10
-0
lines changed

crates/core_arch/src/x86/adx.rs

+10
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ mod tests {
114114
assert_eq!(out, 8);
115115
}
116116

117+
#[simd_test(enable = "adx")]
118+
unsafe fn test_addcarryx_u32_2() {
119+
unsafe fn add_1_2_3() -> u32 {
120+
let mut out = 0;
121+
std::arch::x86_64::_addcarryx_u32(1, 2, 3, &mut out);
122+
out
123+
}
124+
assert_eq!(6, add_1_2_3());
125+
}
126+
117127
#[test]
118128
fn test_subborrow_u32() {
119129
unsafe {

0 commit comments

Comments
 (0)