Commit Graph

293 Commits

Author SHA1 Message Date
Antoni Boucher
bafdded12b Merge branch 'master' into sync_from_rust2 2022-06-06 20:57:25 -04:00
antoyo
7e0a42b492
Merge pull request #165 from yvt/fix-const-memattr
Define immutable statics with const qualified types
2022-05-28 09:24:50 -04:00
yvt
10a9c0e57f Mark immutable globals as read-only with LValue::global_set_readonly 2022-05-28 15:18:15 +09:00
Mark Rousskov
a513b2abae Finish bumping stage0
It looks like the last time had left some remaining cfg's -- which made me think
that the stage0 bump was actually successful. This brings us to a released 1.62
beta though.
2022-05-27 07:36:17 -04:00
yvt
f26eb5a7a2 Update gccjit 2022-05-25 23:58:53 +09:00
Tomasz Miąsko
4620b9f823 rustc_codegen_ssa: derive copy and clone for various enums 2022-05-25 10:34:35 +02:00
Tomasz Miąsko
8f0f6e365c rustc_codegen_ssa: cleanup AtomicOrdering
* Remove unused `NotAtomic` ordering.
* Rename `Monotonic` to `Relaxed` - a Rust specific name.
2022-05-25 10:34:35 +02:00
Connor Horman
084d2d7c49 Handle tmm_reg in rustc_codegen_gcc 2022-05-17 06:34:58 -04:00
antoyo
e6dbecdff3
Merge pull request #175 from GuillaumeGomez/llvmint-update
Update llvmint
2022-05-15 10:25:28 -04:00
Guillaume Gomez
cede91971a Add tools/llvmint-2 to ignored entries 2022-05-15 15:31:25 +02:00
Guillaume Gomez
bac878c9a3 Add instrinsics from aweinstock314's llvmint as well 2022-05-15 15:25:12 +02:00
Guillaume Gomez
e25e2c3b94 Regenerate JSON file for llvmint every time 2022-05-15 15:25:12 +02:00
Guillaume Gomez
be960e1747 Update llvmint 2022-05-15 15:25:12 +02:00
antoyo
e062c37125
Merge pull request #172 from rust-lang/feature/more-simd
Implement more SIMD intrinsics
2022-05-04 23:39:04 -04:00
Antoni Boucher
4a9744059f Feature gate call to get_size() for libgccjit 12 2022-05-04 22:20:38 -04:00
Antoni Boucher
e7df0a4b54 Simplify get() after contains() 2022-05-04 21:53:22 -04:00
Antoni Boucher
603d342e00 Feature-gate for libgccjit 12 2022-05-04 21:26:25 -04:00
Antoni Boucher
d4ab681ebd Add comments 2022-05-04 21:17:58 -04:00
Antoni Boucher
41807a3094 Support more SIMD intrinsics 2022-05-03 22:46:40 -04:00
Antoni Boucher
4b40ac790d Support more SIMD intrinsics and refactor argument adjustment 2022-05-03 22:35:26 -04:00
Antoni Boucher
eba654c57a Support more SIMD intrinsics 2022-05-03 17:47:46 -04:00
Antoni Boucher
6bfe2b0b05 Support more SIMD intrinsics 2022-05-03 17:47:46 -04:00
Antoni Boucher
ace3250da8 Fix shuffle_vector 2022-05-03 17:47:46 -04:00
Antoni Boucher
a65418666f Implement simd_select_bitmask 2022-05-03 17:47:46 -04:00
Antoni Boucher
ddc152b04d Add more SIMD 2022-05-03 17:47:46 -04:00
Antoni Boucher
4636c59df5 Add more SIMD 2022-05-03 17:47:46 -04:00
Antoni Boucher
5088fb3d3b Cast arguments in SIMD function 2022-05-03 17:47:46 -04:00
antoyo
852735da05
Merge pull request #171 from GuillaumeGomez/update-intrinsics
Update intrinsics conversion generation
2022-05-03 17:47:03 -04:00
Guillaume Gomez
6e1bf49273 Give priority to intrinsics translations from llvm 2022-05-03 23:00:25 +02:00
Guillaume Gomez
618ba484e9 Handle a syntax corner case where a def does not end with a ; 2022-05-03 23:00:25 +02:00
Guillaume Gomez
f402cfe561 Update intrinsics 2022-05-03 21:24:22 +02:00
Guillaume Gomez
19d8617330 Generate intrinsics translations from llvmint as well 2022-05-03 21:24:14 +02:00
Guillaume Gomez
ed0ba311c5 Update intrinsics 2022-05-03 20:55:55 +02:00
Guillaume Gomez
af9149a1c6 Add tool to generate intrinsics conversion automatically 2022-05-03 18:59:04 +02:00
antoyo
37892fc511
Merge pull request #170 from yvt/fix-internal-load-calls
Use the provided pointee type in `<Builder as BuilderMethods>::load`
2022-05-03 11:33:00 -04:00
yvt
351c683674 Use the given pointee type in <Builder as BuilderMethods>::load
This commit updates this method implementation to return an `RValue` of
the given pointee type.

While this parameter does not seem to have much significance at the
moment, it will likely become important as cg_llvm and cg_ssa migrate to
LLVM opaque pointers and get rid of pointercasts.
2022-05-03 13:53:10 +09:00
yvt
a225f0a66b Pass a pointee type to <Builder as BuilderMethods>::load when calling it ourselves
The parameter name isn't very descriptive, but it actually supposed to
take a pointee type. When calling it ourselves, we've been passing a
*pointer* type, which made it impossible to make any meaningful uses of
this parameter in the method implementation. This commit intends to
rectify that.
2022-05-03 13:53:10 +09:00
bjorn3
dc824452a9 Merge new_metadata into codegen_allocator 2022-04-30 21:20:08 +02:00
bjorn3
c00ecf5d5d Remove config parameter of optimize_fat and avoid interior mutability for module 2022-04-30 20:58:42 +02:00
bjorn3
e2f645dd7f Let LtoModuleCodegen::optimize take self by value 2022-04-30 20:51:17 +02:00
bjorn3
758a7da13b Rename run_lto_pass_manager to optimize_fat and remove thin parameter 2022-04-30 20:50:17 +02:00
antoyo
0405aa0065
Merge pull request #163 from yvt/fix-asm-sym
Add inline assembly `sym` operands as GCC input operands
2022-04-30 10:30:20 -04:00
antoyo
248c1c5e45
Merge pull request #168 from rust-lang/config/no-fmt
Add rustfmt config to disable formatting
2022-04-29 23:18:05 -04:00
Antoni Boucher
dc8da94d56 Add rustfmt config to disable formatting 2022-04-29 23:17:44 -04:00
yvt
63ffdfdd17 Add compilation tests with optimization enabled
Introduces a new variant of `tests/lib.rs` that compiles the source
files in `tests/run` with `-Copt-level=3`.
2022-04-30 09:53:06 +09:00
yvt
5d25b8fc45 Convert inline assembly sym operands into GCC input operands
This commit updates `<Builder as AsmBuilderMethods>::codegen_inline_asm`
to convert `sym` operands into `"X" (&func_or_static)` input operands
to indicate the dependency on the referenced symbols and prevent them
from being eliminated.

We follow the suit of the LLVM codegen with a mixture of its differing
techniques for `asm!` and `global_asm!`. The codegen module generates
input operands for the `sym` operands (as in `asm!` in cg_llvm).
However, the codegen module replaces all placeholders with mangled
symbol names before passing the assembly template string to the backend
(as in `global_asm!` in cg_llvm), which means these input operands are
never referenced in the final assembly template string.

Unlike the LLVM codegen, the input operand constraint must be `X`
instead of `s`. If the `s` constraint is used, GCC will employ checks to
make sure that the operand can really be represented by a simple
symbolic constant, thus rejecting symbols requiring GOT, etc. to
resolve. Such checks are unnecessary for Rust `sym` as it's up to
programmers to handle such complex cases, e.g., by manually appending
GOT addressing modifiers to the substituted symbol names.

Using the `X` constraint doesn't seem to generate any extra code, so
this will not compromise the property of naked functions.
2022-04-25 01:55:36 +09:00
antoyo
1d62e95368
Merge pull request #164 from yvt/no-intel-syntax
Don't emit `.intel_syntax` for non-x86 targets
2022-04-24 12:12:49 -04:00
yvt
a0742bdd06 Don't emit .intel_syntax for non-x86 targets 2022-04-24 13:09:57 +09:00
antoyo
b30a8f31f5
Merge pull request #162 from rust-lang/fix/test-script
Fix test.sh --build
2022-04-23 21:32:20 -04:00
Antoni Boucher
889c402258 Fix test.sh --build 2022-04-23 10:48:12 -04:00