- Aug 01, 2022
-
-
Ales Katona authored
-
Ales Katona authored
-
Ales Katona authored
-
- Jul 31, 2022
-
-
bors[bot] authored
105: Add extra documentation for `delay` r=almindor a=Joeyh021 Took me a minute or two to figure out what value exactly to pass to `McycleDelay::new`, so figured I'd make a quick PR to add a note for anyone else that hits the same confusion as I did. Also added a doc line for the `delay` module while I was at it, as it was missing one. Co-authored-by:Joey Harrison <joeyh021@icloud.com>
-
Joey Harrison authored
-
Joey Harrison authored
-
- Jul 16, 2022
-
-
bors[bot] authored
104: Fix asm::delay not clobbering count register r=dkhayes117 a=adamgreig I noticed that a small example using two `asm::delay()` calls worked fine in debug mode but not in release mode. Eventually `@jamesmunns` spotted that the count register wasn't being reloaded between calls: ``` # loads a2 with real_cyc 400001ce: 02faf637 lui a2,0x2faf 400001d2: 0816061b addiw a2,a2,129 # turn on led 400001d6: c10c sw a1,0(a0) # count down (delay impl) 400001d8: 167d addi a2,a2,-1 400001da: fe7d bnez a2,400001d8 <.LBB0_8+0x30> # turn off led 400001dc: 00052023 sw zero,0(a0) # 2000000 <.Lline_table_start0+0x1fff7a4> # count down again (delay impl, note a2 not reloaded) 400001e0: 167d addi a2,a2,-1 400001e2: fe7d bnez a2,400001e0 <.LBB0_8+0x38> # loop back to start 400001e4: bfcd j 400001d6 <.LBB0_8+0x2e> ``` By changing the register spec to `inout`, Rust knows the register is modified and reloads it next time. I added the nomem and nostack options too since the instructions don't touch memory or stack, to match the cortex-m impl. This change fixes codegen for my example: ``` 400001ce: 02faf637 lui a2,0x2faf 400001d2: 0816061b addiw a2,a2,129 400001d6: c10c sw a1,0(a0) 400001d8: 86b2 mv a3,a2 400001da: 16fd addi a3,a3,-1 400001dc: fefd bnez a3,400001da <.LBB0_8+0x32> 400001de: 00052023 sw zero,0(a0) # 2000000 <.Lline_table_start0+0x1fff779> 400001e2: 86b2 mv a3,a2 400001e4: 16fd addi a3,a3,-1 400001e6: fefd bnez a3,400001e4 <.LBB0_8+0x3c> 400001e8: b7fd j 400001d6 <.LBB0_8+0x2e> ``` Co-authored-by:Adam Greig <adam@adamgreig.com>
-
Adam Greig authored
-
- Apr 21, 2022
-
-
bors[bot] authored
103: Fix release year in changelog r=almindor a=Disasm Co-authored-by:Vadim Kaushan <admin@disasm.info>
-
Vadim Kaushan authored
-
bors[bot] authored
102: Prepare v0.8.0 release r=almindor a=Disasm Co-authored-by:Vadim Kaushan <admin@disasm.info>
-
Vadim Kaushan authored
-
bors[bot] authored
101: Fix changelog r=dkhayes117 a=Disasm Co-authored-by:Vadim Kaushan <admin@disasm.info>
-
bors[bot] authored
99: Remove uses of unstable features and always use inline assembly r=Disasm a=taiki-e Currently, the `inline-asm` feature uses unstable features, but by replacing the uses of asm_const with `concat!`+`stringify`, the uses of unstable features can be removed. https://github.com/rust-embedded/riscv/blob/cd31989ba11d5d64e1addd8aab98bfb00dd927d5/src/lib.rs#L17-L18 Co-authored-by:
Taiki Endo <te316e89@gmail.com>
-
Vadim Kaushan authored
-
- Mar 19, 2022
-
-
Taiki Endo authored
-
Taiki Endo authored
-
Taiki Endo authored
-
Taiki Endo authored
-
- Feb 09, 2022
-
-
bors[bot] authored
95: Fix copyright year r=dkhayes117 a=Disasm Co-authored-by:Vadim Kaushan <admin@disasm.info>
-
bors[bot] authored
94: csr: inline register reads and type conversations r=dkhayes117 a=luojia65 This pull request adds missing `#[inline]` flags on field read functions and type conversations. Field `#[inline]` marks to enable inline function optimization which speed up the code when used to build kernels and hypervisors. Please hint me if there are more missing `#[inline]` flags in project `riscv` so I may include them in this fix too. Off topic: would it be the time to release a 0.7.1 version now? Then we do not need to pin to commit numbers when developing risc-v projects. r? `@Disasm` Co-authored-by:luojia65 <me@luojia.cc>
-
luojia65 authored
Signed-off-by:luojia65 <me@luojia.cc>
-
Vadim Kaushan authored
-
luojia65 authored
apply clippy suggestions Signed-off-by:luojia65 <me@luojia.cc>
-
- Jan 27, 2022
-
-
bors[bot] authored
93: Remove riscv target post fix triple information from asm archive name r=almindor a=MabezDev For RISCV targets that don't have `unknown-none-elf` in their name. The only bit that matters is the first section anyways. Co-authored-by:Scott Mabin <scott@mabez.dev>
-
Scott Mabin authored
-
- Jan 09, 2022
-
-
bors[bot] authored
90: add asm::nop, asm::delay, and delay.rs. r=Disasm a=dkhayes117 update assembly binaries. update CHANGELOG.md Co-authored-by:
dkhayes117 <dkhayes117@yahoo.com> Co-authored-by:
Daniel Hayes <59458913+dkhayes117@users.noreply.github.com> Co-authored-by:
Vadim Kaushan <admin@disasm.info>
-
Vadim Kaushan authored
-
Daniel Hayes authored
Co-authored-by:Vadim Kaushan <admin@disasm.info>
-
dkhayes117 authored
-
dkhayes117 authored
-
Daniel Hayes authored
-
bors[bot] authored
91: Add inline-asm build to CI, fix build r=dkhayes117 a=Disasm https://github.com/rust-embedded/riscv/pull/86 introduced new `asm!` syntax which is enabled with the `inline-asm` feature. However, it doesn't work with current nightly since `asm_const` unstable feature is not enabled. This PR fixes the problem and adds automatic checks to CI. Co-authored-by:
Vadim Kaushan <admin@disasm.info>
-
Vadim Kaushan authored
-
dkhayes117 authored
-
dkhayes117 authored
-
dkhayes117 authored
update assembly binaries. update CHANGELOG.md
-
- Jan 07, 2022
-
-
bors[bot] authored
87: add singleton macro r=Disasm a=gnxlxnxx professionally copied this macro from the cortex-m crate Co-authored-by:gnxlxnxx <roman@kretschmer.email>
-
- Dec 04, 2021
-
-
bors[bot] authored
88: Bug fix: sfence.vma - incorrect operand order r=Disasm a=DeathWish5 There is a bug about the operand order of `riscv::asm::sfence_vma(asid: usize, addr: usize)`. According to [riscv-isa-manual](https://github.com/riscv/riscv-isa-manual/blob/master/src/supervisor.tex#L1198 ), the first operand should be `vaddr`, and the second be `asid`. But `riscv::asm::sfence_vma` generates assembly code in the reverse order. In fact, our rust-OS which using this instruction to flush TLB have been running into an error until we reverse the parameter order. I propose a simple solution which leave the function parameter order unchanged. Maybe you guys will change it to be more consistent with the specification. Anyway, let's fix this bug. Co-authored-by:
DeathWish5 <zyr_ms@outlook.com>
-
- Dec 03, 2021
-
-
DeathWish5 authored
-