Closed compnerd closed 3 years ago
The less-invasive fix that will be slightly more performant (allows eliding the mv
) is to just declare tp at global scope; this is what we did downstream to build with Clang and apparently never upstreamed.
(https://github.com/CTSRD-CHERI/riscv-pk/commit/0d1fdc2e24b7b6247a55d24c13ae85dca7f45695, though that should probably also be static
)
Good point, I cherry-picked (CHERI-picked?) this alternative fix.
Good point, I cherry-picked (CHERI-picked?) this alternative fix.
:) as you can imagine we have fun with such puns...
:)
Use of asm aliased register variables in local scope can only be used for extended assembly parameters. This changes the few instances of this in the floating point emulation to use the GNU extended assembly syntax to access the
tp
register. This ensures that we do not rely on undefined behaviour. This was uncovered when building the Proxy kernel with clang and LLVM.