| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
the generated FastISel. X86 doesn't need to generate code to match ADD16ri8
since ADD16ri will do just fine. This is a small codesize win in the generated
instruction selector.
llvm-svn: 129692
|
|
|
|
|
|
|
| |
simplifying them and exposing more information to tblgen. It would be nice
if other target authors adopted this as well, particularly arm since it has fastisel.
llvm-svn: 129676
|
|
|
|
|
|
|
|
|
| |
kind of predicate: one that is specific to imm nodes. The predicate function
specified here just checks an int64_t directly instead of messing around with
SDNode's. The virtue of this is that it means that fastisel and other things
can reason about these predicates.
llvm-svn: 129675
|
|
|
|
|
|
|
|
| |
structure and fix some fixmes. We now have a TreePredicateFn class
that handles all of the decoding of these things. This is an internal
cleanup that has no impact on the code generated by tblgen.
llvm-svn: 129670
|
|
|
|
|
|
| |
(movzx/movsx) because they give more information. Revert that part of the patch.
llvm-svn: 129498
|
|
|
|
|
|
| |
cases, it's much nicer and more informative reading the alias.
llvm-svn: 129497
|
|
|
|
|
|
| |
the alias".
llvm-svn: 129485
|
|
|
|
|
|
| |
From Dimitry Andric.
llvm-svn: 126168
|
|
|
|
|
|
|
| |
This is reasonable to do since all bt-mem forms do the
same thing.
llvm-svn: 126047
|
|
|
|
|
|
| |
Validate encoding of leave in 64bit mode.
llvm-svn: 125795
|
|
|
|
| |
llvm-svn: 124272
|
|
|
|
| |
llvm-svn: 124270
|
|
|
|
|
|
| |
Fixes PR8861.
llvm-svn: 122641
|
|
|
|
| |
llvm-svn: 122513
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
their carry depenedencies with MVT::Flag operands) and use clean and beautiful
EFLAGS dependences instead.
We do this by changing the modelling of SBB/ADC to have EFLAGS input and outputs
(which is what requires the previous scheduler change) and change X86 ISelLowering
to custom lower ADDC and friends down to X86ISD::ADD/ADC/SUB/SBB nodes.
With the previous series of changes, this causes no changes in the testsuite, woo.
llvm-svn: 122213
|
|
|
|
|
|
| |
the compiler's point of view. Per email discussion, we either want to always use VEX-prefixed instructions or never use them, and are taking "HasAVX" to mean "Always use VEX". Passing -mattr=-avx,+sse42 should serve to restore legacy SSE support when desirable.
llvm-svn: 121439
|
|
|
|
|
|
|
|
| |
the output to the correct register. Fixes a hidden problem uncovered
by the last patch where we'd try to DAG combine our MVT::Other node
oddly.
llvm-svn: 121358
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
backend that they were all implemented except umul. This one fell back
to the default implementation that did a hi/lo multiply and compared the
top. Fix this to check the overflow flag that the 'mul' instruction
sets, so we can avoid an explicit test. Now we compile:
void *func(long count) {
return new int[count];
}
into:
__Z4funcl: ## @_Z4funcl
movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00]
movq %rdi, %rax ## encoding: [0x48,0x89,0xf8]
mulq %rcx ## encoding: [0x48,0xf7,0xe1]
seto %cl ## encoding: [0x0f,0x90,0xc1]
testb %cl, %cl ## encoding: [0x84,0xc9]
movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff]
cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8]
jmp __Znam ## TAILCALL
instead of:
__Z4funcl: ## @_Z4funcl
movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00]
movq %rdi, %rax ## encoding: [0x48,0x89,0xf8]
mulq %rcx ## encoding: [0x48,0xf7,0xe1]
testq %rdx, %rdx ## encoding: [0x48,0x85,0xd2]
movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff]
cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8]
jmp __Znam ## TAILCALL
Other than the silly seto+test, this is using the o bit directly, so it's going in the right
direction.
llvm-svn: 120935
|
|
|
|
|
|
| |
I'm unclear if the tests are actually correct or not, but reverting for now.
llvm-svn: 120847
|
|
|
|
|
|
|
|
| |
development,
it completely breaks scalar fp in xmm regs when AVX is enabled.
llvm-svn: 120843
|
|
|
|
| |
llvm-svn: 120224
|
|
|
|
| |
llvm-svn: 120017
|
|
|
|
|
|
| |
when transfering between i64 gprs and mmx regs.
llvm-svn: 119931
|
|
|
|
| |
llvm-svn: 118916
|
|
|
|
|
|
| |
implementing rdar://8431864
llvm-svn: 118364
|
|
|
|
|
|
|
|
|
|
| |
different forms of this instruction (movw/movl/movq) which we reported
as being ambiguous. Since they all do the same thing, gas just picks the
one with the shortest encoding. Follow its lead here.
This implements rdar://8208615
llvm-svn: 118362
|
|
|
|
| |
llvm-svn: 118361
|
|
|
|
| |
llvm-svn: 118358
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exposed:
GAS doesn't accept "fcomip %st(1)", it requires "fcomip %st(1), %st(0)"
even though st(0) is implicit in all other fp stack instructions.
Fortunately, there is an alias for fcomip named "fcompi" and gas does
accept the default argument for the alias (boggle!).
As such, switch the canonical form of this instruction to "pi" instead
of "ip". This makes the code generator and disassembler generate pi,
avoiding the gas bug.
llvm-svn: 118356
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shift-by-1 instructions, where the asmstring doesn't contain
the implicit 1. It turns out that a bunch of these rotate
instructions were completely broken because they used 1
instead of $1.
This fixes assembly mismatches on "rclb $1, %bl" and friends,
where we used to generate the 3 byte form, we now generate the
proper 2-byte form.
llvm-svn: 118355
|
|
|
|
|
|
|
| |
listed in its asm string, for consistency with the other similar
instructions.
llvm-svn: 118354
|
|
|
|
| |
llvm-svn: 118353
|
|
|
|
|
|
|
|
| |
fixed physical registers. Start moving fp comparison
aliases to the .td file (which default to using %st1 if
nothing is specified).
llvm-svn: 118352
|
|
|
|
|
|
|
| |
add fixed immediate values. Move the aad and aam aliases to
use this, and document it.
llvm-svn: 118350
|
|
|
|
| |
llvm-svn: 118349
|
|
|
|
| |
llvm-svn: 118348
|
|
|
|
| |
llvm-svn: 118347
|
|
|
|
|
|
|
|
| |
result instruction operand numbering matched the result pattern.
Fixing this allows us to move the xchg/test aliases to the .td file.
llvm-svn: 118334
|
|
|
|
| |
llvm-svn: 118332
|
|
|
|
|
|
| |
tidy up the movsx and movzx aliases.
llvm-svn: 118331
|
|
|
|
|
|
| |
from c++ hacks to proper .td InstAlias definitions. Change them!
llvm-svn: 118330
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operand list instead of the operand list redundantly declared on the alias
or instruction.
With this change, we finally remove the ins/outs list on the alias. Before:
def : InstAlias<(outs GR16:$dst), (ins GR8 :$src),
"movsx $src, $dst",
(MOVSX16rr8W GR16:$dst, GR8:$src)>;
After:
def : InstAlias<"movsx $src, $dst",
(MOVSX16rr8W GR16:$dst, GR8:$src)>;
This also makes the alias mechanism more general and powerful, which will
be exploited in subsequent patches.
llvm-svn: 118329
|
|
|
|
| |
llvm-svn: 117967
|
|
|
|
|
|
| |
from X86AsmParser.cpp
llvm-svn: 117952
|
|
|
|
|
|
| |
must be 8 bits. Support this memory form.
llvm-svn: 117902
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aliases installed and working. They now work when the
matched pattern and the result instruction have exactly
the same operand list.
This is now enough for us to define proper aliases for
movzx and movsx, implementing rdar://8017633 and PR7459.
Note that we do not accept instructions like:
movzx 0(%rsp), %rsi
GAS accepts this instruction, but it doesn't make any
sense because we don't know the size of the memory
operand. It could be 8/16/32 bits.
llvm-svn: 117901
|
|
|
|
|
|
| |
how the push/pop mnemonic aliases are wrong.
llvm-svn: 117857
|
|
|
|
|
|
|
| |
"In32BitMode" and "In64BitMode" into tblgen, allow any
predicate that inherits from AssemblerPredicate.
llvm-svn: 117831
|
|
|
|
|
|
|
|
|
|
|
| |
directives, allowing things like this:
def : MnemonicAlias<"pop", "popl">, Requires<[In32BitMode]>;
def : MnemonicAlias<"pop", "popq">, Requires<[In64BitMode]>;
Move the rest of the X86 MnemonicAliases over to the .td file.
llvm-svn: 117830
|
|
|
|
| |
llvm-svn: 117823
|