Skip to content

Commit 1e27c3f

Browse files
committed
i128 shift intrinsics
1 parent 3055aa2 commit 1e27c3f

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ features = ["c"]
193193

194194
These builtins are needed to support 128-bit integers, which are in the process of being added to Rust.
195195

196-
- [ ] ashlti3.c
197-
- [ ] ashrti3.c
196+
- [x] ashlti3.c
197+
- [x] ashrti3.c
198198
- [ ] divti3.c
199199
- [ ] fixdfti.c
200200
- [ ] fixsfti.c
@@ -204,7 +204,7 @@ These builtins are needed to support 128-bit integers, which are in the process
204204
- [ ] floattisf.c
205205
- [ ] floatuntidf.c
206206
- [ ] floatuntisf.c
207-
- [ ] lshrti3.c
207+
- [x] lshrti3.c
208208
- [ ] modti3.c
209209
- [x] muloti4.c
210210
- [x] multi3.c

build.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ fn main() {
178178
sources.extend(&["absvti2.c",
179179
"addtf3.c",
180180
"addvti3.c",
181-
"ashlti3.c",
182-
"ashrti3.c",
183181
"clzti2.c",
184182
"cmpti2.c",
185183
"ctzti2.c",
@@ -198,7 +196,6 @@ fn main() {
198196
"floatuntidf.c",
199197
"floatuntisf.c",
200198
"floatuntixf.c",
201-
"lshrti3.c",
202199
"modti3.c",
203200
"multf3.c",
204201
"mulvti3.c",

src/int/shift.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#[cfg(not(all(feature = "c", target_arch = "x86")))]
21
use int::{Int, LargeInt};
32

43
macro_rules! ashl {
@@ -58,12 +57,18 @@ macro_rules! lshr {
5857
#[cfg(not(all(feature = "c", target_arch = "x86")))]
5958
ashl!(__ashldi3: u64);
6059

60+
ashl!(__ashlti3: u128);
61+
6162
#[cfg(not(all(feature = "c", target_arch = "x86")))]
6263
ashr!(__ashrdi3: i64);
6364

65+
ashr!(__ashrti3: i128);
66+
6467
#[cfg(not(all(feature = "c", target_arch = "x86")))]
6568
lshr!(__lshrdi3: u64);
6669

70+
lshr!(__lshrti3: u128);
71+
6772
#[cfg(test)]
6873
mod tests {
6974
use qc::{I64, U64};

0 commit comments

Comments
 (0)