mirror of
https://github.com/opnsense/src.git
synced 2026-03-15 23:25:30 -04:00
The lr.w instruction used to read the value from memory sign-extends the value read from memory. GCC sign-extends the 32-bit comparison value passed in whereas clang currently does not. As a result, if the value being compared has the MSB set, the comparison fails for matching 32-bit values when compiled with clang. Use a cast to explicitly sign-extend the unsigned comparison value. This works with both GCC and clang. There is commentary in the RISC-V spec that suggests that GCC's approach is more correct, but it is not clear if the commentary in the RISC-V spec is binding. Reviewed by: mhorne Obtained from: Axiado MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D22084 |
||
|---|---|---|
| .. | ||
| _align.h | ||
| _bus.h | ||
| _inttypes.h | ||
| _limits.h | ||
| _stdint.h | ||
| _types.h | ||
| asm.h | ||
| atomic.h | ||
| bus.h | ||
| bus_dma.h | ||
| bus_dma_impl.h | ||
| clock.h | ||
| counter.h | ||
| cpu.h | ||
| cpufunc.h | ||
| db_machdep.h | ||
| dump.h | ||
| efi.h | ||
| elf.h | ||
| encoding.h | ||
| endian.h | ||
| exec.h | ||
| float.h | ||
| floatingpoint.h | ||
| fpe.h | ||
| frame.h | ||
| ieeefp.h | ||
| in_cksum.h | ||
| intr.h | ||
| kdb.h | ||
| machdep.h | ||
| md_var.h | ||
| memdev.h | ||
| minidump.h | ||
| ofw_machdep.h | ||
| param.h | ||
| pcb.h | ||
| pcpu.h | ||
| pcpu_aux.h | ||
| pmap.h | ||
| pmc_mdep.h | ||
| proc.h | ||
| procctl.h | ||
| profile.h | ||
| psl.h | ||
| pte.h | ||
| ptrace.h | ||
| reg.h | ||
| reloc.h | ||
| resource.h | ||
| riscvreg.h | ||
| runq.h | ||
| sbi.h | ||
| setjmp.h | ||
| sf_buf.h | ||
| sigframe.h | ||
| signal.h | ||
| smp.h | ||
| stack.h | ||
| stdarg.h | ||
| sysarch.h | ||
| trap.h | ||
| ucontext.h | ||
| vdso.h | ||
| vm.h | ||
| vmparam.h | ||