File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1538,7 +1538,8 @@ decode_value_scalar (const guint8 *ptr, const guint8 **new_ptr)
1538
1538
MONO_ALWAYS_INLINE guint32
1539
1539
mono_metadata_decode_value_simd (const guint8 * ptr , const guint8 * * new_ptr )
1540
1540
{
1541
- #if defined(__clang__ ) && (G_BYTE_ORDER == G_LITTLE_ENDIAN )
1541
+ // FIXME: Determine whether it's safe to perform this optimization on non-wasm targets.
1542
+ #if defined(__clang__ ) && (G_BYTE_ORDER == G_LITTLE_ENDIAN ) && defined(HOST_WASM )
1542
1543
guint32 result ;
1543
1544
1544
1545
typedef guint8 v64_u1 __attribute__ ((vector_size (8 )));
@@ -1586,8 +1587,8 @@ mono_metadata_decode_value_simd (const guint8 *ptr, const guint8 **new_ptr)
1586
1587
// i don't know why the default case is necessary here, but without it the jump table has 5 entries.
1587
1588
default :
1588
1589
// (b * 0x80) != 0, and (b & 0x40) != 0
1589
- // for some reason on wasm the 'v.b[0]' load generates an '& 255',
1590
- // even if we cache it in a guint8 local
1590
+ // on wasm the 'v.b[0]' load generates an '& 255', even if we cache it in a
1591
+ // guint8 local. this is https://github.com/llvm/llvm-project/issues/87398
1591
1592
if (v .b [0 ] == 0xFFu ) {
1592
1593
// v.b = { ptr[4], ptr[3], ptr[2], ptr[1] }
1593
1594
// on x64 this generates kind of gross code, i.e.
You can’t perform that action at this time.
0 commit comments