Commit Graph

12 Commits

Author SHA1 Message Date
yvt
56983cf3c6 test: Remove redundant code from tests/run/int.rs 2022-04-01 12:55:00 +09:00
bjorn3
edf33fe0a2 Add Destruct and Drop traits to static.rs 2022-03-26 14:41:55 +01:00
Antoni Boucher
0fb350f37c Fix shift of unsigned integer by signed integer 2022-03-19 12:15:26 -04:00
antoyo
41f20fa3a5
Support 128-bit integers on platforms without native support (#103)
* Use sized integer types

* Add support for integer types not supported on some platforms

* Add feature to test non-native integers in CI
2022-01-30 21:45:14 -05:00
bjorn3
cd5d42aad7 Correctly import foreign statics
Previously foreign statics would actually cause a local static to be
defined and exported. This issue was found because std::env::vars() was
found to return no env vars despite many being defined. This was caused
by libstd importing environ as foreign static. The accidental definition
of environ caused libstd to read a null pointer which was interpreted as
there being no environment variables at all.

Also fix tests. STDOUT is not defined by libc. The correct name is stdout.
This previously worked as STDOUT was incorrectly defined as null pointer
during codegen.
2022-01-25 13:16:44 +01:00
bjorn3
a2c5d29fc9 Add missing feature gate 2021-12-30 16:41:11 +01:00
bjorn3
31482a94a0 Import std::arch::asm 2021-12-30 15:36:30 +01:00
bjorn3
ebc6ad4185 Sync from rust 65d8785f0a 2021-12-30 15:25:38 +01:00
antoyo
ddb015a09e
Fix discarded in-out constraint in inline asm (#110)
Fixes #109
2021-12-15 22:06:16 -05:00
Amanieu d'Antras
eec5f919e7 Stabilize asm! and global_asm!
They are also removed from the prelude as per the decision in
https://github.com/rust-lang/rust/issues/87228.

stdarch and compiler-builtins are updated to work with the new, stable
asm! and global_asm! macros.
2021-12-12 11:20:03 +00:00
Commeownist
7c707e4b95
Implement basic inline asm support (#72)
* Implement basic support for inline assembly

* Disable LTO

We don't support it yet at all

* Handle `inout(reg) var` correctly

Turns out that `+` readwrite output registers cannot be tied with
input variables.

* Add limited support for llvm_asm!

* Handle CHANNEL correctly

* Add support for arbitrary explicit registers

* Handle symbols properly

* Add rudimentary asm tests

* Exclude llvm_asm! tests from tests runs

* Insert `__builtin_unreachable()` after diverging asm blocks
2021-09-05 11:26:01 -04:00
Antoni Boucher
afae271d5d Initial commit 2021-08-12 21:46:50 -04:00