mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-25 00:35:30 +00:00
Note corrected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85332 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8499c9b7f
commit
de020736c0
@ -1955,12 +1955,13 @@ information to add the "lock" prefix.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
int func(int a, int b) { if (a & 0x80) b |= 0x80; else b &= 0x80; return b; }
|
||||
int func(int a, int b) { if (a & 0x80) b |= 0x80; else b &= ~0x80; return b; }
|
||||
|
||||
Current:
|
||||
|
||||
|
||||
movb %sil, %al
|
||||
andb $-128, %sil
|
||||
andb $127, %sil
|
||||
orb $-128, %al
|
||||
testb %dil, %dil
|
||||
js LBB1_2
|
||||
@ -1968,11 +1969,12 @@ Current:
|
||||
LBB1_2:
|
||||
movsbl %al, %eax
|
||||
|
||||
|
||||
Better:
|
||||
|
||||
movl %esi, %eax
|
||||
orl $-128, %eax
|
||||
andl $-128, %esi
|
||||
andl $127, %esi
|
||||
testb %dil, %dil
|
||||
cmovns %esi, %eax
|
||||
movsbl %al,%eax
|
||||
|
Loading…
x
Reference in New Issue
Block a user