add floating point extension (FPE) code needed for bhyve and vmm_switch()
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/riscv/riscv/fpe.c | ||
---|---|---|
106 | This doesn't capture the memory side-effects. You either need a : "memory" in there (a big hammer, though probably doesn't make much difference here) or an extra dummy operand "=m"(*(uint64_t (*)[32][2])fp_x). |
sys/riscv/riscv/fpe.c | ||
---|---|---|
106 | Though if doing the latter, probably nicer to do: uint64_t fcsr, (*fp_x)[32][2]; fp_x = ®s->fp_x; and then you don't need to cast in the inline assembly, just "=m"(*fp_x). (Yes, the syntax for a pointer to an array is real, if extremely rarely used, and yes it should remind you of function pointers...) |
Comment Actions
- Add dummy operand "m" to tell compiler which memory we read/write via pointers.
- Ensure all operands are output in fpe_store() and input in fpe_restore().