Skip to content

Commit bb47972

Browse files
committed
Add support for Vector Add Carryout on PowerPC
1 parent 381cbe4 commit bb47972

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@
9393
"llvm": "vadd{0.kind}{0.data_type_short}s",
9494
"ret": "i(8-32)",
9595
"args": ["0", "0"]
96+
},
97+
{
98+
"intrinsic": "addc",
99+
"width": [128],
100+
"llvm": "vaddcuw",
101+
"ret": "u32",
102+
"args": ["0", "0"]
96103
}
97104
]
98105
}

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
207207
output: &::U32x4,
208208
definition: Named("llvm.ppc.altivec.vadduws")
209209
},
210+
"_vec_addc" => Intrinsic {
211+
inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
212+
output: &::U32x4,
213+
definition: Named("llvm.ppc.altivec.vaddcuw")
214+
},
210215
_ => return None,
211216
})
212217
}

0 commit comments

Comments
 (0)