804 Commits

Author SHA1 Message Date
antoyo
0cbf2b9715
Merge pull request #267 from rust-lang/inline-attribute
Add support for inline attribute
2023-04-16 17:55:00 -04:00
Antoni Boucher
b93041af0a Add support for inline attribute 2023-04-16 17:17:05 -04:00
Amanieu d'Antras
5f30b63b3b Remove #[alloc_error_handler] from the compiler and library 2023-04-16 08:35:50 -07:00
bors
6883c25a9b Auto merge of #109989 - ids1024:m68k-asm, r=Amanieu
Add inline assembly support for m68k

I believe this should be correct, to the extent I understand the logic around inline assembly. M68k is fairly straightforward here, other than having separate address registers.
2023-04-13 11:41:57 +00:00
Ian Douglas Scott
387718fedc Add inline assembly support for m68k 2023-04-12 17:58:15 -07:00
Michael Goulet
8541fce93c Rollup merge of #96971 - zhaixiaojuan:master, r=wesleywiser
Initial support for loongarch64-unknown-linux-gnu

Hi, We hope to add a new port in rust for LoongArch.

LoongArch intro
LoongArch is a RISC style ISA which is independently designed by Loongson
Technology in China. It is divided into two versions, the 32-bit version (LA32)
and the 64-bit version (LA64). LA64 applications have application-level
backward binary compatibility with LA32 applications. LoongArch is composed of
a basic part (Loongson Base) and an expanded part. The expansion part includes
Loongson Binary Translation (LBT), Loongson VirtualiZation (LVZ), Loongson SIMD
EXtension (LSX) and Loongson Advanced SIMD EXtension(LASX).

Currently the LA464 processor core supports LoongArch ISA and the Loongson
3A5000 processor integrates 4 64-bit LA464 cores. LA464 is a four-issue 64-bit
high-performance processor core. It can be used as a single core for high-end
embedded and desktop applications, or as a basic processor core to form an
on-chip multi-core system for server and high-performance machine applications.

Documentations:
ISA:
https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html
ABI:
https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html
More docs can be found at:
https://loongson.github.io/LoongArch-Documentation/README-EN.html

Since last year, we have locally adapted two versions of rust, rust1.41 and rust1.57, and completed the test locally.
I'm not sure if I'm submitting all the patches at once, so I split up the patches and here's one of the commits
2023-04-11 20:28:45 -07:00
antoyo
17cbb61c08
Merge pull request #266 from rust-lang/test/stdarch-emulator
Run emulated stdarch tests in the CI
2023-04-09 20:57:52 -04:00
Antoni Boucher
a6d7ab5b00 Run emulated stdarch tests in the CI 2023-04-08 16:00:50 -04:00
zhaixiaojuan
556ab26283 Define MIN_ALIGN for loongarch64 2023-04-08 00:09:54 +08:00
antoyo
76c10cc1c9
Merge pull request #262 from rust-lang/fix/vpshrdvw
Fix vpshrd llvm instrinsics
2023-04-07 09:00:41 -04:00
Antoni Boucher
65a20d3f71 Fix vpshrd llvm instrinsics 2023-04-07 08:10:34 -04:00
antoyo
ba60936e48
Merge pull request #260 from GuillaumeGomez/ignore-llvm
Add `llvm` folder to .gitignore file
2023-04-06 12:17:02 -04:00
antoyo
24ea06b0bf
Merge pull request #259 from GuillaumeGomez/regen-intrinsics
Regenerate intrinsics
2023-04-06 12:16:40 -04:00
Guillaume Gomez
98482ad1e4 Regen intrinsics 2023-04-06 17:39:05 +02:00
Guillaume Gomez
b769ad26b0 Add llvm folder to .gitignore file 2023-04-06 17:38:45 +02:00
antoyo
5af59b67b4
Merge pull request #261 from GuillaumeGomez/update-gcc-jit
Update gccjit dependency version
2023-04-06 11:34:04 -04:00
Guillaume Gomez
7e2e5054a6 Update gccjit dependency version 2023-04-05 16:30:21 +02:00
Ulrich Weigand
2bfd89d91b Update gccjit and remove libc 0.1 dependency 2023-03-30 18:30:56 +02:00
antoyo
ade3739c07
Merge pull request #257 from arpankapoor/master
Optimize bitreverse codegen
2023-03-28 17:15:12 -04:00
Arpan Kapoor
68b8500235
move u128 test to std_example 2023-03-27 20:33:05 +05:30
Arpan Kapoor
6e1a79c6a4
Add u128 PartialEq impl in mini_core.rs 2023-03-26 13:19:57 +05:30
Arpan Kapoor
77a9effd3d
Optimize bitreverse codegen 2023-03-24 13:06:20 +05:30
Nikita Popov
0c115bf8b8 Use poison instead of undef
In cases where it is legal, we should prefer poison values over
undef values.

This replaces undef with poison for aggregate construction and
for uninhabited types. There are more places where we can likely
use poison, but I wanted to stay conservative to start with.

In particular the aggregate case is important for newer LLVM
versions, which are not able to handle an undef base value during
early optimization due to poison-propagation concerns.
2023-03-16 15:07:04 +01:00
clubby789
ee38de5155 Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
est31
fe93911ebc Simplify message paths
This makes it easier to open the messages file while developing on features.

The commit was the result of automatted changes:

for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done

for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
2023-03-11 22:51:57 +01:00
Pietro Albini
8652bbb072 replace legacy copyright annotations in submodules 2023-03-09 12:24:47 +01:00
Matthias Krüger
cbbaebc34c Rollup merge of #108783 - antoyo:sync-cg_gcc-2023-03-04, r=cjgillot
Sync rustc_codegen_gcc 2023/03/04

Hi.
This sync all the changes from rustc_codegen_gcc.
Thanks for the review.
2023-03-07 19:57:45 +01:00
bors
7b85215c4f Auto merge of #95317 - Jules-Bertholet:round_ties_to_even, r=pnkfelix,m-ou-se,scottmcm
Add `round_ties_even` to `f32` and `f64`

Tracking issue: #96710

Redux of #82273. See also #55107

Adds a new method, `round_ties_even`, to `f32` and `f64`, that rounds the float to the nearest integer , rounding halfway cases to the number with an even least significant bit. Uses the `roundeven` LLVM intrinsic to do this.

Of the five IEEE 754 rounding modes, this is the only one that doesn't already have a round-to-integer function exposed by Rust (others are `round`, `floor`, `ceil`, and `trunc`).  Ties-to-even is also the rounding mode used for int-to-float and float-to-float `as` casts, as well as float arithmentic operations. So not having an explicit rounding method for it seems like an oversight.

Bikeshed: this PR currently uses `round_ties_even` for the name of the method. But maybe `round_ties_to_even` is better, or `round_even`, or `round_to_even`?
2023-03-07 09:43:12 +00:00
Antoni Boucher
cf9c2f840f Fix for diagnostics 2023-03-05 12:31:16 -05:00
Antoni Boucher
94538736a8 Update gccjit 2023-03-05 12:16:33 -05:00
Antoni Boucher
d725cfb6ab Merge commit '08a6d6e16b5efe217123e780398969946266268f' into sync-cg_gcc-2023-03-04 2023-03-05 12:03:19 -05:00
antoyo
08a6d6e16b
Merge pull request #255 from rust-lang/sync_from_rust_2023_feb_28_2
Sync from rust 2023 feb 28
2023-03-04 20:21:03 -05:00
Antoni Boucher
4b878ccab4 Fix tests 2023-03-04 19:49:03 -05:00
Antoni Boucher
3180da5529 Fix tests 2023-03-04 19:18:31 -05:00
Antoni Boucher
f83ede03f5 Fix tests 2023-03-04 18:52:25 -05:00
Antoni Boucher
42a89bd875 Fix tests 2023-03-04 15:41:30 -05:00
Antoni Boucher
9d5bc7c929 Fix tests 2023-03-04 15:25:34 -05:00
Antoni Boucher
5c35dc067d Fix warnings 2023-03-04 15:04:55 -05:00
Antoni Boucher
08c75aee1b Fix error in libgccjit12 code path 2023-03-04 15:03:05 -05:00
Antoni Boucher
6958188e10 Temporarily disable rust repo cache 2023-03-04 15:02:49 -05:00
Antoni Boucher
901e413a3f Fix tests 2023-03-04 14:42:34 -05:00
Antoni Boucher
a2f499f05f Fix tests 2023-03-04 14:30:29 -05:00
antoyo
8c3c02097d
Merge pull request #256 from GuillaumeGomez/regen-intrinsics
Regen intrinsics
2023-03-03 10:10:15 -05:00
Guillaume Gomez
74506d3bb1 Regen intrinsics 2023-03-02 23:31:18 +01:00
Antoni Boucher
b4f83c6ed8 Fix error 2023-03-02 17:15:57 -05:00
Antoni Boucher
d8b5a3eaa9 Fix to examples 2023-02-28 22:39:50 -05:00
Antoni Boucher
e74f6ff54f Fix rebase 2023-02-28 22:35:10 -05:00
Antoni Boucher
78f3a7ed1f Update toolchain 2023-02-28 22:20:44 -05:00
Alan Egerton
802e9026d9 Remove type-traversal trait aliases 2023-02-28 22:18:04 -05:00
David Wood
7696f981ea various: translation resources from cg backend
Extend `CodegenBackend` trait with a function returning the translation
resources from the codegen backend, which can be added to the complete
list of resources provided to the emitter.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-28 22:16:56 -05:00