[Arm64] Handle exclusive decode group in insEncodeDatasizeLS()
authorSteve MacLean, Qualcomm Datacenter Technologies, Inc <sdmaclea@qti.qualcomm.com>
Sat, 27 May 2017 03:16:12 +0000 (03:16 +0000)
committerSteve MacLean, Qualcomm Datacenter Technologies, Inc <sdmaclea@qti.qualcomm.com>
Mon, 5 Jun 2017 17:44:51 +0000 (17:44 +0000)
Commit migrated from https://github.com/dotnet/coreclr/commit/69b057f0292628bc0071ed0c8440f496f060813f

src/coreclr/src/jit/emitarm64.cpp

index 2a52f92..75c5202 100644 (file)
@@ -7379,7 +7379,9 @@ void emitter::emitIns_Call(EmitCallType          callType,
 
 /*static*/ emitter::code_t emitter::insEncodeDatasizeLS(emitter::code_t code, emitAttr size)
 {
-    if (code & 0x00800000) // Is this a sign-extending opcode? (i.e. ldrsw, ldrsh, ldrsb)
+    bool exclusive = ((code & 0x35000000) == 0);
+
+    if ((code & 0x00800000) && !exclusive) // Is this a sign-extending opcode? (i.e. ldrsw, ldrsh, ldrsb)
     {
         assert((size == EA_4BYTE) || (size == EA_8BYTE));
         if ((code & 0x80000000) == 0) // Is it a ldrsh or ldrsb and not ldrsw ?