- 18 8月, 2023 1 次提交
-
-
由 ChoKyuWon 提交于
Current `-Zinstrument-mcount` for ARM32 use the `\01__gnu_mcount_nc` directly for its instrumentation function. However, the LLVM does not use this mcount function directly, but it wraps it to intrinsic, `llvm.arm.gnu.eabi.mcount` and the transform pass also only handle the intrinsic. As a result, current `-Zinstrument-mcount` not work on ARM32. Refer: https://github.com/namhyung/uftrace/issues/1764 This commit replaces the mcount name from native function to the LLVM intrinsic so that the transform pass can handle it. Signed-off-by: NChoKyuWon <kyuwoncho18@gmail.com>
-
- 14 8月, 2023 5 次提交
- 11 8月, 2023 2 次提交
-
-
由 WANG Rui 提交于
-
由 Rémy Rakic 提交于
-
- 09 8月, 2023 1 次提交
-
-
由 Seth Pellegrino 提交于
Similar to prior support added for the mips430, avr, and x86 targets this change implements the rough equivalent of clang's [`__attribute__((interrupt))`][clang-attr] for riscv targets, enabling e.g. ```rust static mut CNT: usize = 0; pub extern "riscv-interrupt-m" fn isr_m() { unsafe { CNT += 1; } } ``` to produce highly effective assembly like: ```asm pub extern "riscv-interrupt-m" fn isr_m() { 420003a0: 1141 addi sp,sp,-16 unsafe { CNT += 1; 420003a2: c62a sw a0,12(sp) 420003a4: c42e sw a1,8(sp) 420003a6: 3fc80537 lui a0,0x3fc80 420003aa: 63c52583 lw a1,1596(a0) # 3fc8063c <_ZN12esp_riscv_rt3CNT17hcec3e3a214887d53E.0> 420003ae: 0585 addi a1,a1,1 420003b0: 62b52e23 sw a1,1596(a0) } } 420003b4: 4532 lw a0,12(sp) 420003b6: 45a2 lw a1,8(sp) 420003b8: 0141 addi sp,sp,16 420003ba: 30200073 mret ``` (disassembly via `riscv64-unknown-elf-objdump -C -S --disassemble ./esp32c3-hal/target/riscv32imc-unknown-none-elf/release/examples/gpio_interrupt`) This outcome is superior to hand-coded interrupt routines which, lacking visibility into any non-assembly body of the interrupt handler, have to be very conservative and save the [entire CPU state to the stack frame][full-frame-save]. By instead asking LLVM to only save the registers that it uses, we defer the decision to the tool with the best context: it can more accurately account for the cost of spills if it knows that every additional register used is already at the cost of an implicit spill. At the LLVM level, this is apparently [implemented by] marking every register as "[callee-save]," matching the semantics of an interrupt handler nicely (it has to leave the CPU state just as it found it after its `{m|s}ret`). This approach is not suitable for every interrupt handler, as it makes no attempt to e.g. save the state in a user-accessible stack frame. For a full discussion of those challenges and tradeoffs, please refer to [the interrupt calling conventions RFC][rfc]. Inside rustc, this implementation differs from prior art because LLVM does not expose the "all-saved" function flavor as a calling convention directly, instead preferring to use an attribute that allows for differentiating between "machine-mode" and "superivsor-mode" interrupts. Finally, some effort has been made to guide those who may not yet be aware of the differences between machine-mode and supervisor-mode interrupts as to why no `riscv-interrupt` calling convention is exposed through rustc, and similarly for why `riscv-interrupt-u` makes no appearance (as it would complicate future LLVM upgrades). [clang-attr]: https://clang.llvm.org/docs/AttributeReference.html#interrupt-risc-v [full-frame-save]: https://github.com/esp-rs/esp-riscv-rt/blob/9281af2ecffe13e40992917316f36920c26acaf3/src/lib.rs#L440-L469 [implemented by]: https://github.com/llvm/llvm-project/blob/b7fb2a3fec7c187d58a6d338ab512d9173bca987/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp#L61-L67 [callee-save]: https://github.com/llvm/llvm-project/blob/973f1fe7a8591c7af148e573491ab68cc15b6ecf/llvm/lib/Target/RISCV/RISCVCallingConv.td#L30-L37 [rfc]: https://github.com/rust-lang/rfcs/pull/3246
-
- 08 8月, 2023 2 次提交
-
-
由 Ralf Jung 提交于
-
由 Nikita Popov 提交于
Function pointer alignment is specified since https://reviews.llvm.org/D147016.
-
- 07 8月, 2023 1 次提交
-
-
由 Benedikt Radtke 提交于
-
- 05 8月, 2023 3 次提交
-
-
由 Taiki Endo 提交于
This reverts commit 90f0b24a, reversing changes made to e173a8e6.
-
由 Taiki Endo 提交于
-
由 Taiki Endo 提交于
-
- 03 8月, 2023 1 次提交
-
-
由 Nilstrieb 提交于
It lints against features that are inteded to be internal to the compiler and standard library. Implements MCP #596. We allow `internal_features` in the standard library and compiler as those use many features and this _is_ the standard library from the "internal to the compiler and standard library" after all. Marking some features as internal wasn't exactly the most scientific approach, I just marked some mostly obvious features. While there is a categorization in the macro, it's not very well upheld (should probably be fixed in another PR). We always pass `-Ainternal_features` in the testsuite About 400 UI tests and several other tests use internal features. Instead of throwing the attribute on each one, just always allow them. There's nothing wrong with testing internal features^^
-
- 29 7月, 2023 1 次提交
-
-
由 Georgii Rylov 提交于
-
- 27 7月, 2023 1 次提交
-
-
由 Chris Wailes 提交于
-
- 26 7月, 2023 1 次提交
-
-
由 天命剑主 提交于
Signed-off-by: N袁浩 <yuanhao34@huawei.com>
-
- 25 7月, 2023 1 次提交
-
-
由 Martin Kröning 提交于
Signed-off-by: NMartin Kröning <martin.kroening@eonerc.rwth-aachen.de>
-
- 24 7月, 2023 7 次提交
-
-
由 Simon Schöning 提交于
Co-authored-by: NMartin Kröning <martin.kroening@eonerc.rwth-aachen.de> Signed-off-by: NMartin Kröning <martin.kroening@eonerc.rwth-aachen.de>
-
由 Martin Kröning 提交于
instead of mutating the base. Signed-off-by: NMartin Kröning <martin.kroening@eonerc.rwth-aachen.de>
-
由 Martin Kröning 提交于
Signed-off-by: NMartin Kröning <martin.kroening@eonerc.rwth-aachen.de>
-
由 Martin Kröning 提交于
These pre-link args are remains from Hermit's old C version. We don't need them and we have no reason to override the defaults here. See ld [1] for details. [1]: https://sourceware.org/binutils/docs/ld/Options.htmlSigned-off-by: NMartin Kröning <martin.kroening@eonerc.rwth-aachen.de>
-
由 Chris Copeland 提交于
GCC uses the `-fshort-enums` ABI for arm-none and the `int`-sized enum ABI for arm-linux. Clang uses the `int`-sized enum ABI for all arm targets. Both options are permitted by AAPCS. Rust is matching GCC's behavior for these targets, as interop with code code compiled by GCC is desirable in the bare-metal context. See #87917.
-
由 Chris Copeland 提交于
This option is the same as the `thumb_base` defaults used by this target.
-
由 Chris Copeland 提交于
-
- 22 7月, 2023 1 次提交
-
-
由 David Tolnay 提交于
This reverts commit 557359f9, reversing changes made to 1e6c09a8.
-
- 21 7月, 2023 2 次提交
-
-
由 David Rheinsberg 提交于
Drop duplicate helper methods on `Layout`, which are already implemented on `LayoutS`. Note that `Layout` has a `Deref` implementation to `LayoutS`, so all accessors are automatically redirected. The methods are identical and have been copied to `rustc_abi` in: commit 390a637e Author: hamidreza kalbasi <hamidrezakalbasi@protonmail.com> Date: Mon Nov 7 00:36:11 2022 +0330 move things from rustc_target::abi to rustc_abi This commit left behind the original implementation. Drop it now. Signed-off-by: NDavid Rheinsberg <david@readahead.eu>
-
由 Moulins 提交于
-
- 18 7月, 2023 3 次提交
- 15 7月, 2023 1 次提交
-
-
由 Erik Desjardins 提交于
-
- 11 7月, 2023 6 次提交
-
-
Tested with the Gaisler bcc2 toolchain (both gcc and clang) and the Leon3 simulator.
-
由 Erik Desjardins 提交于
-
由 Erik Desjardins 提交于
-
由 Erik Desjardins 提交于
-
由 Erik Desjardins 提交于
-
由 Erik Desjardins 提交于
-