diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-10-27 22:34:43 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-10-27 22:34:43 +0000 |
commit | 1ff2c485e240e00e7d84f1dd53ee7a111d25f5d3 (patch) | |
tree | dd825dc16ccd93d916acd850c4bc27af8e82d26c /lib/Target/X86/README.txt | |
parent | 50b6e33584f4e4cf75c7795b1f1a90731861c825 (diff) | |
download | external_llvm-1ff2c485e240e00e7d84f1dd53ee7a111d25f5d3.zip external_llvm-1ff2c485e240e00e7d84f1dd53ee7a111d25f5d3.tar.gz external_llvm-1ff2c485e240e00e7d84f1dd53ee7a111d25f5d3.tar.bz2 |
Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README.txt')
-rw-r--r-- | lib/Target/X86/README.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 046d35c..5967fd5 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -1952,3 +1952,26 @@ fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix. + +//===---------------------------------------------------------------------===// + +int func(int a, int b) { if (a & 0x80) b |= 0x80; else b &= 0x80; return b; } + +Current: + + movb %sil, %al + andb $-128, %sil + orb $-128, %al + testb %dil, %dil + js LBB1_2 + movb %sil, %al +LBB1_2: + movsbl %al, %eax + +Better: + movl %esi, %eax + orl $-128, %eax + andl $-128, %esi + testb %dil, %dil + cmovns %esi, %eax + movsbl %al,%eax |