Commit Graph

1501 Commits

Author SHA1 Message Date
Ralf Jung
b8879f3d8c move shims (foreign items and intrinsics) into submodule 2019-06-30 15:35:28 +02:00
Ralf Jung
11457a4ad9 fix comparing function pointers with intptrcast 2019-06-30 11:21:31 +02:00
bors
1ec279f290 Auto merge of #801 - RalfJung:num_cpus, r=RalfJung
support num_cpus crate and test that

Also make some magic numbers into proper global constants.
2019-06-30 08:42:25 +00:00
Ralf Jung
019ad4bab4 move constants to machine.rs 2019-06-29 14:37:41 +02:00
Ralf Jung
c7bf9064f7 comment on STACK_ADDR 2019-06-29 14:34:08 +02:00
Ralf Jung
0fac868685 support num_cpus and test that 2019-06-29 14:34:08 +02:00
Ralf Jung
c1645f6c65 don't compute residue twice 2019-06-29 14:31:54 +02:00
Ralf Jung
9b66527075 more sensible slack 2019-06-29 14:31:54 +02:00
Ralf Jung
c0b44ca98c tweak inttoptr allocation behavior
- Make `align_addr` not offset by `align` for no reason.
- Add some random slack between allocations to give them the chance to not be aligned.
2019-06-29 14:31:54 +02:00
Ralf Jung
67d3779b0c move most of the stuff from lib.rs into machine.rs, and initialization + main loop into eval.rs 2019-06-29 13:48:59 +02:00
Ralf Jung
6886864862 ptr-to-int alignment sanity check 2019-06-28 09:12:11 +02:00
Christian Poveda
7fbf8e53a2 Fix alignment of base addresses 2019-06-26 09:08:28 -05:00
Christian Poveda
792d665a1f Fix merge conflicts 2019-06-25 00:57:33 -05:00
Christian Poveda
84cfbb01b7 Reorganize MemoryExtra and AllocExtra structures 2019-06-24 17:18:25 -05:00
Christian Poveda
2861ceb2fa Rename new fields and move rng to MemoryExtra 2019-06-24 10:03:16 -05:00
Ralf Jung
7e7b5d42ba
Apply suggestions from code review
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
2019-06-24 14:50:27 +02:00
Ralf Jung
69e8318b60 de-obfuscate ptr comparison a bit 2019-06-23 20:30:33 +02:00
Ralf Jung
4dc188a60e adjust for refactored memory pointer checks 2019-06-23 20:19:26 +02:00
Christian Poveda
dd732e5862 Force intptrcast for binary operations 2019-06-22 09:25:16 -05:00
Ralf Jung
72c269eebe fix compilation with latest rustc 2019-06-22 11:05:12 +02:00
Christian Poveda
fd3a291db4 Implement intptrcast methods 2019-06-21 14:55:37 -05:00
Oliver Scherer
5edb9c915f
Merge branch 'master' into master 2019-06-21 12:37:13 +02:00
Christian Poveda
17dbecfa32
Merge branch 'master' into master 2019-06-20 21:38:10 -05:00
Christian Poveda
4211d7e1a0 Update tag methods to match Machine changes 2019-06-20 16:58:57 -05:00
Ralf Jung
86868b6946
Merge branch 'master' into rustup 2019-06-20 21:37:12 +02:00
Ralf Jung
6f5529a05b
Merge branch 'master' into patch-1 2019-06-20 20:47:27 +02:00
Ralf Jung
03eff5981b use org.rust-lang.miri folder on macOS 2019-06-20 19:45:39 +02:00
Ralf Jung
04fa38dd1b allow some inequality comparisons between pointers and integers 2019-06-20 16:38:55 +02:00
Ralf Jung
7ce36226e6 implement and test unchecked_{add,sub,mul} intrinsics 2019-06-16 11:10:33 +02:00
Ralf Jung
fc90124489 test exact_div UB detection 2019-06-16 11:10:33 +02:00
Ralf Jung
32a2cf046f
Merge branch 'master' into foreign_math_functions 2019-06-16 10:11:32 +02:00
soc
a561f949ad Fix project dirs path
ProjectDirs::from("miri", "miri", "miri")

would get you `miri\miri` on Windows and `miri.miri.miri` on macOS.

I'm assuming here that your intention was to have only a `miri` directory on every OS.
2019-06-15 17:03:16 +02:00
Lzu Tao
fd0dccd4b1 Fix wrong lifetime of TyCtxt
Rustup rust-lang/rust#61817
2019-06-15 02:34:11 +07:00
Ralf Jung
34b0922cec fix running a Miri that was built in bootstrap 2019-06-14 12:09:43 +02:00
Ralf Jung
ac2f6cbcde change sysroot check to print the output in case of an error 2019-06-14 11:16:39 +02:00
Oliver Scherer
4db0eea010
Fix indentation 2019-06-14 10:44:08 +02:00
Kenny Goodin
46b6a3fb7f Add more missing math functions
Add missing functions for atan2, cosh, sinh, and tan.
Also add f32 calls and tests for cbrt and hypot.
2019-06-13 22:28:22 -04:00
Ralf Jung
ad0c941547 rustup for lifetime refactorings 2019-06-13 09:18:03 +02:00
Kenny Goodin
535914e3dc Implement cbrt and hypot function calls
Test cases are added to `tests/run-pass/intrinsics-math.rs`
2019-06-12 15:44:30 -04:00
Ralf Jung
a37953752d use apfloat's FMA primitive 2019-06-11 19:41:43 +02:00
Ralf Jung
5e07ac335f implement min and max floating point intrinsics 2019-06-11 19:41:43 +02:00
Ralf Jung
6eab94a459 fix from to/from f32/f64 changes 2019-06-11 19:41:43 +02:00
Ralf Jung
81debbd652
Merge branch 'master' into sysroot 2019-06-11 09:48:05 +02:00
Ralf Jung
446478cce2 fix for rustc rename mir -> body 2019-06-10 13:01:55 +02:00
Ralf Jung
0a9f9e0a0b factor out common code to determine miri binary 2019-06-09 19:47:09 +02:00
Ralf Jung
5b91ecc066 fix comments 2019-06-09 17:12:41 +02:00
Ralf Jung
b0b082d4d8 do not handle MIRI_SYSROOT in the driver at all, rely fully on the --sysroot flag 2019-06-09 17:10:04 +02:00
Ralf Jung
244011a47f don't have both MIRI_SYSROOT and --sysroot 2019-06-09 15:43:22 +02:00
Ralf Jung
619f296463 explain why we always set a sysroot; make sure we error if both MIRI_SYSROOT and --sysroot are set 2019-06-09 14:31:05 +02:00
Ralf Jung
05b7e61977 remove outdated sysroot management 2019-06-09 14:10:42 +02:00