[PATCH] D113439: [RISCV] Add IR intrinsics for reading/write vxrm.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 13:21:03 PST 2021


efriedma added a comment.

In D113439#3183745 <https://reviews.llvm.org/D113439#3183745>, @jrtc27 wrote:

> Even if you don't expose it in C the ABI still needs to specify what happens across call boundaries? I don't see what issues thread storage duration poses, as everything it implies is either a hard requirement (other threads don't clobber it) or for efficiency reasons (avoiding saving and restoring in any function that clobbers it)? It's a bit strange language to use though I'll admit given thread storage is a C language concept.

My reading is that "thread storage duration" is supposed to mean that if the user sets it in one function, and retrieves it later in some other function, it should have the same value.  This matches the corresponding language for the floating-point state register.  That implies the sort of mess we have with floating-point rounding modes and error flags; that's not something we want to emulate in other contexts.

If we're treating it as a normal register, I would expect language like "this register is preserved across calls" or "this register isn't preserved across calls" or something like that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113439/new/

https://reviews.llvm.org/D113439



More information about the llvm-commits mailing list