bjorn3
53235d2abb
Enable thread test in std_example
...
Turns out libstd doesn't use #[thread_local] on Windows at all
2021-03-15 18:01:48 +01:00
bjorn3
1122f42e28
Support cross-compiling to Windows using MinGW
2021-03-05 21:32:49 +01:00
bjorn3
3f6a3b5ebe
Implement lazy compilation in JIT mode
...
Lazy compilation has the potential to significantly improve the startup
time of a program. While functions have to be codegened when called, it
is expected that a significant amount of all code is only required when
an error occurs or only when the program is used in certain ways.
The basic approach is to first codegen a shim for each function. This
shim calls the `__cg_clif_jit` function of cg_clif with a pointer to the
`Instance` corresponding to the function for which it is a shim.
`__cg_clif_jit` function then codegens this function and uses the hot
code swapping support of SimpleJIT to redirect future calls to the
function to the real version. Finally it calls the newly codegened
function.
2020-12-25 12:08:21 +01:00
bjorn3
c3179bc44b
Rustup to rustc 1.50.0-nightly ( 593fe977a
2020-11-20)
2020-11-21 19:49:51 +01:00
Ben Striegel
4206f9fc16
Prefer numeric associated constants in example
...
Per their documentation, the `max_value()` and `min_value()` associated functions have been superseded by the `MAX` and `MIN` associated constants since Rust 1.43 and are considered "soft deprecated", with all uses currently being replaced in the rustc repo.
2020-10-27 16:20:58 -04:00
bjorn3
ee2addd010
Don't test x86_64 simd on archs other than x86_64
2020-08-20 13:22:07 +02:00
bjorn3
c1a68b1386
Emulate the cpuid arch intrinsic
2020-08-15 19:08:19 +02:00
bjorn3
49b7fac443
Enable simd insert and extract tests
...
Working since rust-lang/stdarch#876
Fixes #666
2020-08-08 16:32:03 +02:00
bjorn3
edc0a3470b
Implement simd_insert
2020-07-19 14:54:18 +02:00
bjorn3
e87651c3f2
Add test for SwitchInt on 128bit integers
2020-07-16 13:01:20 +02:00
bjorn3
8d639cd778
Test signed 128bit discriminants
2020-07-03 16:44:26 +02:00
bjorn3
5f54cc7658
Implement checked_mul
...
Fixes #6
2020-06-20 15:15:28 +02:00
bjorn3
ef4186a85b
Use Cranelift legalization for icmp.i128
...
The previous translation was wrong for signed 128bit comparisions
This fixes several libcore tests
2020-06-20 13:23:31 +02:00
bjorn3
5c6bf836fe
Implement #[link_section]
...
Fixes #1047
2020-06-20 12:01:24 +02:00
bjorn3
eab4c9063e
Sync fn_sig_for_fn_abi with upstream for generator resume args
...
Fixes #970
2020-04-18 15:45:42 +02:00
bjorn3
9ab2af56aa
Rustup to rustc 1.43.0-nightly ( 4ad624882
2020-03-03)
2020-03-04 15:04:28 +01:00
bjorn3
c8de552c01
Tls support
2020-02-26 14:41:05 +01:00
bjorn3
e9d3569e08
Run libcore tests
2019-11-24 15:44:39 +01:00
bjorn3
b0bcb23eb4
Fix signed cast to 128bit integer
2019-11-16 16:44:26 +01:00
bjorn3
5407b51aa7
Rustup to rustc 1.40.0-nightly ( 9e346646e
2019-11-08)
2019-11-09 11:14:18 +01:00
bjorn3
1f90b04cd6
Fix float -> u/i128 cast
...
The original test casts were optimized away by rustc,
so cg_clif never saw them.
cc #668
2019-08-21 14:35:48 +02:00
bjorn3
b2d6705fe2
Implement u/i128 <-> float casts
...
Fixes #668
2019-08-21 14:01:29 +02:00
bjorn3
3fcd54088c
Implement saturating_{add,sub} intrinsics
2019-08-20 10:40:08 +02:00
bjorn3
f99d31dbfe
Implement pow{f32,f64} intrinsics
2019-08-19 17:16:21 +02:00
bjorn3
edbb5730ea
Implement copysign{f32,f64} intrinsics
2019-08-19 16:27:09 +02:00
bjorn3
2558bf2f6b
Workaround for missing #[rustc_args_required_const(..)]
support
...
cc #666
2019-08-16 16:04:50 +02:00
bjorn3
9505d60a24
Cast rhs to lhs type for shl and shr
2019-08-14 15:18:05 +02:00
bjorn3
f5b0a68fbf
Fix some warnings
2019-08-12 16:00:10 +02:00
bjorn3
314141392a
Implement log2{f32,f64} intrinsics
2019-08-12 15:54:24 +02:00
bjorn3
7602a46bb9
Implement simd_extract
2019-08-05 16:28:27 +02:00
bjorn3
2f0093b8c2
Test mutex locking
2019-08-01 11:15:40 +02:00
bjorn3
b806070a88
Fix simd_cast
2019-07-31 09:46:05 +02:00
bjorn3
69526d464f
Implement some float simd intrinsics
2019-07-30 14:37:20 +02:00
bjorn3
ee4927e069
Fix _mm_movemask_epi8
...
The order of iteration was wrong
2019-07-29 18:59:17 +02:00
bjorn3
63646b1956
Implement llvm.x86.avx2.pmovmskb llvm intrinsic
2019-07-29 12:50:20 +02:00
bjorn3
9cb787fe70
Implement and test simd_shuffle*
2019-07-29 11:23:53 +02:00
bjorn3
76b89476c3
[WIP] simd_shuffle*
2019-07-29 11:03:55 +02:00
bjorn3
90f2b12d47
Fix simd comparison
2019-07-29 11:03:55 +02:00
bjorn3
7fdd058c60
Emulate some simd intrinsics
2019-07-29 11:03:55 +02:00
bjorn3
436a24a85d
Implement many more float intrinsics
2019-07-27 16:52:00 +02:00
bjorn3
b46c8bfb7e
Use std checked_div
2019-07-26 11:32:04 +02:00
bjorn3
7f5c2dab9d
Remove some unnecessary changes
2019-07-26 11:30:39 +02:00
bjorn3
5180becc7c
Fix 128bit CValue::const_val
2019-07-26 11:30:39 +02:00
bjorn3
63b82238bb
Implement 128bit checked add and sub
2019-07-26 11:30:39 +02:00
bjorn3
65e337cdf3
Implement 128bit multiply with overflow
2019-07-26 11:29:35 +02:00
bjorn3
834a3bf49c
[WIP]
2019-07-26 11:29:35 +02:00
bjorn3
641a210ff6
Implement most 128bit binops
2019-07-26 11:29:35 +02:00
bjorn3
c814ee0d2a
[WIP]
2019-07-26 11:28:04 +02:00
bjorn3
4e1d219f06
Implement some float intrinsics
2019-06-26 16:06:12 +02:00
bjorn3
d7274ac5fd
Fix load and store for ByValPair values with differently sized components
2019-06-23 15:23:06 +02:00