[x64] Fix strict aliasing error with GCC.
authorbmeurer <bmeurer@chromium.org>
Mon, 9 Feb 2015 10:43:56 +0000 (02:43 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 9 Feb 2015 10:44:06 +0000 (10:44 +0000)
BUG=v8:3872
LOG=n
R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/898953003

Cr-Commit-Position: refs/heads/master@{#26521}

src/x64/assembler-x64.cc

index 597aa31f54d86c59d0cb5fe3dccae6334c716aa3..3ce420e3e7bdb8122f88a0c2d2f053d9ed092d8b 100644 (file)
@@ -485,7 +485,7 @@ void Assembler::emit_operand(int code, const Operand& adr) {
   // Recognize RIP relative addressing.
   if (adr.buf_[0] == 5) {
     DCHECK_EQ(9u, length);
-    Label* label = *reinterpret_cast<Label* const*>(&adr.buf_[1]);
+    Label* label = *bit_cast<Label* const*>(&adr.buf_[1]);
     if (label->is_bound()) {
       int offset = label->pos() - pc_offset() - sizeof(int32_t);
       DCHECK_GE(0, offset);