Skip to content

Commit 844e9ad

Browse files
committed
Add support for Vector Subtract Carryout on PowerPC
1 parent b07a059 commit 844e9ad

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
@@ -79,6 +79,13 @@
7979
"llvm": "vsub{0.kind}{0.data_type_short}s",
8080
"ret": "i(8-32)",
8181
"args": ["0", "0"]
82+
},
83+
{
84+
"intrinsic": "subc",
85+
"width": [128],
86+
"llvm": "vsubcuw",
87+
"ret": "u32",
88+
"args": ["0", "0"]
8289
}
8390
]
8491
}

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
172172
output: &::U32x4,
173173
definition: Named("llvm.ppc.altivec.vsubuws")
174174
},
175+
"_vec_subc" => Intrinsic {
176+
inputs: { static INPUTS: [&'static Type; 2] = [&::U32x4, &::U32x4]; &INPUTS },
177+
output: &::U32x4,
178+
definition: Named("llvm.ppc.altivec.vsubcuw")
179+
},
175180
_ => return None,
176181
})
177182
}

0 commit comments

Comments
 (0)