Commit Graph

13 Commits

Author SHA1 Message Date
est31 ff63f7b80f Convert float_to_int! into a function 2017-09-14 14:59:32 +02:00
est31 c9a261895e Refactor int builtins to use associated consts 2017-09-13 22:09:31 +02:00
Alex Crichton 2147753559 Remove usage of unwrap_or_else 2017-06-23 21:31:54 -07:00
Alex Crichton 7886ae275b Port sdiv to traits + `intrinsics!`
Enhance `intrinsics!` along the way!
2017-06-22 23:09:28 -07:00
Alex Crichton 275d1032b5 Port mul intrinsics to traits
Also add a few features to the `intrinsics!` macro
2017-06-22 22:36:37 -07:00
Alex Crichton eeb44abacf Remove executable bit from mod.rs 2017-06-22 22:04:40 -07:00
Alex Crichton 2f2bb32e40 Use traits instead of macros for shift intrinsics
This is an attempt to tidy up the definition of intrinsics by making them more
rust-like at the definition site and using traits instead of macros for the
definition. Additionally the helper macro, `intrinsics!`, now fills in a
definition for #[cfg]'d off intrinsics when compiling with C code
2017-06-22 22:03:07 -07:00
est31 673a6f9948 Fix overflow bug when creating the absolute value
Previously, the tests failed on some platforms due to it.
2017-05-08 04:30:48 +02:00
Jorge Aparicio c6e06f4157 refactor 'impl Int' 2017-03-06 12:17:10 -05:00
Wilfried Chauveau 293fef5ebe impl (unsigned/signed) int to single/double precision float conversion based on llvm algorithms. 2017-03-06 11:55:57 -05:00
est31 8fe50d813c Macro-ify udivmod 2017-02-02 22:03:42 +01:00
est31 b356429374 int module: macro-ify trait impls and add {u,i}128 support 2017-02-02 21:36:02 +01:00
Matt Ickstadt 6f0d50ebea Move integer functions to separate module 2016-08-20 15:55:06 -05:00