[LLVMdev] [PATCH] simplify X86 LEA's assembly code
Jun Koi
junkoi2004 at gmail.com
Mon Mar 23 09:26:12 PDT 2015
The current assembly of LEA instruction looks very weird.
This patch simplifies it.
Thanks.
diff --git a/lib/Target/X86/X86InstrArithmetic.td
b/lib/Target/X86/X86InstrArithmetic.td
index 78efc4d..1a874b0 100644
--- a/lib/Target/X86/X86InstrArithmetic.td
+++ b/lib/Target/X86/X86InstrArithmetic.td
@@ -18,23 +18,23 @@ let SchedRW = [WriteLEA] in {
let hasSideEffects = 0 in
def LEA16r : I<0x8D, MRMSrcMem,
(outs GR16:$dst), (ins anymem:$src),
- "lea{w}\t{$src|$dst}, {$dst|$src}", [], IIC_LEA_16>,
OpSize16;
+ "lea{w}\t{$src, $dst|$dst, $src}", [], IIC_LEA_16>,
OpSize16;
let isReMaterializable = 1 in
def LEA32r : I<0x8D, MRMSrcMem,
(outs GR32:$dst), (ins anymem:$src),
- "lea{l}\t{$src|$dst}, {$dst|$src}",
+ "lea{l}\t{$src, $dst|$dst, $src}",
[(set GR32:$dst, lea32addr:$src)], IIC_LEA>,
OpSize32, Requires<[Not64BitMode]>;
def LEA64_32r : I<0x8D, MRMSrcMem,
(outs GR32:$dst), (ins lea64_32mem:$src),
- "lea{l}\t{$src|$dst}, {$dst|$src}",
+ "lea{l}\t{$src, $dst|$dst, $src}",
[(set GR32:$dst, lea64_32addr:$src)], IIC_LEA>,
OpSize32, Requires<[In64BitMode]>;
let isReMaterializable = 1 in
def LEA64r : RI<0x8D, MRMSrcMem, (outs GR64:$dst), (ins lea64mem:$src),
- "lea{q}\t{$src|$dst}, {$dst|$src}",
+ "lea{q}\t{$src, $dst|$dst, $src}",
[(set GR64:$dst, lea64addr:$src)], IIC_LEA>;
} // SchedRW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150324/71e9cc78/attachment.html>
More information about the llvm-dev
mailing list