i128 shift intrinsics

master
est31 2017-01-04 03:04:27 +01:00
parent 3055aa21b6
commit 1e27c3f937
3 changed files with 9 additions and 7 deletions

View File

@ -193,8 +193,8 @@ features = ["c"]
These builtins are needed to support 128-bit integers, which are in the process of being added to Rust. These builtins are needed to support 128-bit integers, which are in the process of being added to Rust.
- [ ] ashlti3.c - [x] ashlti3.c
- [ ] ashrti3.c - [x] ashrti3.c
- [ ] divti3.c - [ ] divti3.c
- [ ] fixdfti.c - [ ] fixdfti.c
- [ ] fixsfti.c - [ ] fixsfti.c
@ -204,7 +204,7 @@ These builtins are needed to support 128-bit integers, which are in the process
- [ ] floattisf.c - [ ] floattisf.c
- [ ] floatuntidf.c - [ ] floatuntidf.c
- [ ] floatuntisf.c - [ ] floatuntisf.c
- [ ] lshrti3.c - [x] lshrti3.c
- [ ] modti3.c - [ ] modti3.c
- [x] muloti4.c - [x] muloti4.c
- [x] multi3.c - [x] multi3.c

View File

@ -178,8 +178,6 @@ fn main() {
sources.extend(&["absvti2.c", sources.extend(&["absvti2.c",
"addtf3.c", "addtf3.c",
"addvti3.c", "addvti3.c",
"ashlti3.c",
"ashrti3.c",
"clzti2.c", "clzti2.c",
"cmpti2.c", "cmpti2.c",
"ctzti2.c", "ctzti2.c",
@ -198,7 +196,6 @@ fn main() {
"floatuntidf.c", "floatuntidf.c",
"floatuntisf.c", "floatuntisf.c",
"floatuntixf.c", "floatuntixf.c",
"lshrti3.c",
"modti3.c", "modti3.c",
"multf3.c", "multf3.c",
"mulvti3.c", "mulvti3.c",

View File

@ -1,4 +1,3 @@
#[cfg(not(all(feature = "c", target_arch = "x86")))]
use int::{Int, LargeInt}; use int::{Int, LargeInt};
macro_rules! ashl { macro_rules! ashl {
@ -58,12 +57,18 @@ macro_rules! lshr {
#[cfg(not(all(feature = "c", target_arch = "x86")))] #[cfg(not(all(feature = "c", target_arch = "x86")))]
ashl!(__ashldi3: u64); ashl!(__ashldi3: u64);
ashl!(__ashlti3: u128);
#[cfg(not(all(feature = "c", target_arch = "x86")))] #[cfg(not(all(feature = "c", target_arch = "x86")))]
ashr!(__ashrdi3: i64); ashr!(__ashrdi3: i64);
ashr!(__ashrti3: i128);
#[cfg(not(all(feature = "c", target_arch = "x86")))] #[cfg(not(all(feature = "c", target_arch = "x86")))]
lshr!(__lshrdi3: u64); lshr!(__lshrdi3: u64);
lshr!(__lshrti3: u128);
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use qc::{I64, U64}; use qc::{I64, U64};