Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/builtins/i386/fp_mode.c | ||
---|---|---|
20 | This could be a local const uint32_t (local to __fe_raise_inexact). | |
44–46 | switch (cw & X87_RMODE_MASK). LLVM will optimize such expressions in a switch. | |
67 | Should you use env.__mxcsr here? If so, then the preprocessor guard differs from the above. | |
70 | Do *any* of these asm statements in this patch require volatile qualification? |
compiler-rt/lib/builtins/i386/fp_mode.c | ||
---|---|---|
44–46 | By the time its gets to IR and goes through mem2reg/SROA it should look the same right? |
compiler-rt/lib/builtins/i386/fp_mode.c | ||
---|---|---|
44–46 | Yep. Just slightly more concise. |
compiler-rt/lib/builtins/i386/fp_mode.c | ||
---|---|---|
38 | It seems that fenv_t would be defined in <cfenv>, can you include that instead of redefining it? Looks like all of the above constants are defined as enums there, too. |
Would it be better to just do a dummy inexact division operation to trigger than inexact exception instead of manipulating the environment?
I assumed this would have better performance than dummy inexact division operation. Do you want me to verify it?
I can't imagine fldenv/fstenv are very fast instructions. I wouldn't be surprised if they serialized the core and prevented speculation past them.
compiler-rt/lib/builtins/CMakeLists.txt | ||
---|---|---|
242 | It looks a bit unusual that a file that works on both 32-bit and 64-bit x86 is in the i386 folder. All other files in the i386 folder are 32-bit only as far as I can tell. |
compiler-rt/lib/builtins/CMakeLists.txt | ||
---|---|---|
242 | I'm working on this, https://reviews.llvm.org/D69688 |
compiler-rt/lib/builtins/i386/fp_mode.c | ||
---|---|---|
20 | This won't work with MSVC. See e.g. http://lab.llvm.org:8011/builders/sanitizer-windows/builds/54305 I've reverted in a19f0eec94e. |
It looks a bit unusual that a file that works on both 32-bit and 64-bit x86 is in the i386 folder. All other files in the i386 folder are 32-bit only as far as I can tell.