Fixes the desktop build (dotnet/coreclr#22197)
authorBrian Sullivan <briansul@microsoft.com>
Fri, 25 Jan 2019 11:20:23 +0000 (03:20 -0800)
committerSergey Andreenko <seandree@microsoft.com>
Fri, 25 Jan 2019 11:20:23 +0000 (03:20 -0800)
* Fixes the desktop build
warning C4311: 'reinterpret_cast': pointer truncation from 'BYTE *' to 'uint32_t'  f:\j6\codegenmirror\src\ndp\clr\src\jit\emit.cpp(5636): warning C4302: 'reinterpret_cast': truncation from 'BYTE *' to 'uint32_t'

* Fix formatting

Commit migrated from https://github.com/dotnet/coreclr/commit/cdd6e3315ff125aabc34378d5547f68df89c05c2

src/coreclr/src/jit/emit.cpp

index e695d8e..db6aa10 100644 (file)
@@ -5625,8 +5625,10 @@ void emitter::emitDispDataSec(dataSecDsc* section)
                         printf("dd\t%08Xh", ig->igOffs - igFirst->igOffs);
                     }
                 }
-                else if (TARGET_POINTER_SIZE == 4)
+                else
                 {
+#ifndef _TARGET_64BIT_
+                    // We have a 32-BIT target
                     if (emitComp->opts.disDiffable)
                     {
                         printf("dd\t%s\n", blockLabel);
@@ -5635,9 +5637,8 @@ void emitter::emitDispDataSec(dataSecDsc* section)
                     {
                         printf("dd\t%08Xh", reinterpret_cast<uint32_t>(emitOffsetToPtr(ig->igOffs)));
                     }
-                }
-                else
-                {
+#else  // _TARGET_64BIT_
+                    // We have a 64-BIT target
                     if (emitComp->opts.disDiffable)
                     {
                         printf("dq\t%s\n", blockLabel);
@@ -5646,6 +5647,7 @@ void emitter::emitDispDataSec(dataSecDsc* section)
                     {
                         printf("dq\t%016llXh", reinterpret_cast<uint64_t>(emitOffsetToPtr(ig->igOffs)));
                     }
+#endif // _TARGET_64BIT_
                 }
 
                 if (!emitComp->opts.disDiffable)