diff options
author | Levi Broderick <GrabYourPitchforks@users.noreply.github.com> | 2018-11-05 16:06:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 16:06:32 -0800 |
commit | f72025c8b6d8a4fc3b4e22e2a3b6e1afeaef15ff (patch) | |
tree | 963da39e25dfd9ac91fcca84e8b78adba86b5820 /src/jit/gtlist.h | |
parent | 28417584d8e98ae7eac22e92b952778f8ea94047 (diff) | |
download | coreclr-f72025c8b6d8a4fc3b4e22e2a3b6e1afeaef15ff.tar.gz coreclr-f72025c8b6d8a4fc3b4e22e2a3b6e1afeaef15ff.tar.bz2 coreclr-f72025c8b6d8a4fc3b4e22e2a3b6e1afeaef15ff.zip |
Add support for BSWAP intrinsic (#18398)
With this change, the JIT will recognize a call to BinaryPrimitives.ReverseEndianness and will emit a bswap instruction.
This logic is currently only hooked up for x86 and x64; ARM still uses fallback logic.
If the JIT can't emit a bswap instruction (for example, trying to emit a 64-bit bswap in a 32-bit process), it will fall back to a software implementation, so the APIs will work across all architectures.
Diffstat (limited to 'src/jit/gtlist.h')
-rw-r--r-- | src/jit/gtlist.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jit/gtlist.h b/src/jit/gtlist.h index 9fd12753fb..7fe5b2ffd7 100644 --- a/src/jit/gtlist.h +++ b/src/jit/gtlist.h @@ -101,6 +101,9 @@ GTNODE(INIT_VAL , GenTreeOp ,0,GTK_UNOP) // Initi GTNODE(RUNTIMELOOKUP , GenTreeRuntimeLookup, 0,GTK_UNOP|GTK_EXOP) // Runtime handle lookup +GTNODE(BSWAP , GenTreeOp ,0,GTK_UNOP) // Byte swap (32-bit or 64-bit) +GTNODE(BSWAP16 , GenTreeOp ,0,GTK_UNOP) // Byte swap (16-bit) + //----------------------------------------------------------------------------- // Binary operators (2 operands): //----------------------------------------------------------------------------- |