[PATCH] x86: Emit LOCK prefix after DATA16

JF Bastien jfb at chromium.org
Thu Dec 11 15:37:40 PST 2014


Hi craig.topper, jvoung,

x86 allows either ordering for the LOCK and DATA16 prefixes, but using GCC+GAS leads to different code generation than using LLVM. This change matches the order that GAS emits the x86 prefixes when a semicolon isn't used in inline assembly (see tc-i386.c comment before define LOCK_PREFIX), and helps simplify tooling that operates on the instruction's byte sequence (such as NaCl's validator). This change shouldn't have any performance impact.

http://reviews.llvm.org/D6630

Files:
  lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
  test/CodeGen/X86/atomic16.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6630.17196.patch
Type: text/x-patch
Size: 4698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141211/3b30497b/attachment.bin>


More information about the llvm-commits mailing list