1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

734 Commits

Author SHA1 Message Date
Chris Lattner
3d148e7e31 stub out a header to put 3dNow! instructions into.
llvm-svn: 115429
2010-10-02 23:06:23 +00:00
Owen Anderson
4fc55c0e02 Revert r114703 and r114702, removing the isConditionalMove flag from instructions. After further
reflection, this isn't going to achieve the purpose I intended it for.  Back to the drawing board!

llvm-svn: 114710
2010-09-23 23:45:25 +00:00
Owen Anderson
15c6948d29 Add isConditionalMove bits to X86 and ARM instructions.
llvm-svn: 114703
2010-09-23 22:57:01 +00:00
Chris Lattner
1864d6728d Fix an inconsistency in the x86 backend that led it to reject "calll foo" on
x86-32: 32-bit calls were named "call" not "calll".  64-bit calls were correctly
named "callq", so this only impacted x86-32.

This fixes rdar://8456370 - llvm-mc rejects 'calll'

This also exposes that mingw/64 is generating a 32-bit call instead of a 64-bit call,
I will file a bugzilla.

llvm-svn: 114534
2010-09-22 05:49:14 +00:00
Chris Lattner
26d11d7501 reimplement elf TLS support in terms of addressing modes, eliminating SegmentBaseAddress.
llvm-svn: 114529
2010-09-22 04:39:11 +00:00
Chris Lattner
e52da86fab give VZEXT_LOAD a memory operand, it now works with segment registers.
llvm-svn: 114515
2010-09-22 00:34:38 +00:00
Chris Lattner
b227ae4ddb reimplement support for GS and FS relative address space matching
by having X86DAGToDAGISel::SelectAddr get passed in the parent node
of the operand match (the load/store/atomic op) and having it get
the address space from that, instead of having special FS/GS addr
mode operations that require duplicating the entire instruction set
to support.

This makes FS and GS relative accesses *far* more predictable and
work much better.  It also simplifies the X86 backend a bit, more
to come.

There is still a pending issue with nodes like ISD::PREFETCH and
X86ISD::FLD, which really should be MemSDNode's but aren't.

llvm-svn: 114491
2010-09-21 22:07:31 +00:00
Chris Lattner
c153d48869 even though I'm about to rip it out, simplify the address mode stuff
llvm-svn: 114468
2010-09-21 19:41:58 +00:00
Chris Lattner
4bce01542c fix rdar://8444631 - encoder crash on 'enter'
What a weird instruction.

llvm-svn: 114190
2010-09-17 18:02:29 +00:00
Chris Lattner
e542e3e2ad fix the encoding of sldt GR16 to have the 0x66 prefix, and
add sldt GR32, which isn't documented in the intel manual
but which gas accepts.  Part of rdar://8418316

llvm-svn: 113938
2010-09-15 04:45:10 +00:00
Chris Lattner
5234733554 fix bugs in push/pop segment support, rdar://8407242
llvm-svn: 113422
2010-09-08 22:13:08 +00:00
Chris Lattner
752daa9624 implement proper support for sysret{,l,q}, rdar://8403907
llvm-svn: 113350
2010-09-08 05:45:34 +00:00
Chris Lattner
40f9f0fdba implement the iret suite of instructions properly,
fixing rdar://8403974

llvm-svn: 113349
2010-09-08 05:38:31 +00:00
Chris Lattner
8f621d5039 fix the encoding of the "jump on *cx" family of instructions,
rdar://8061602

llvm-svn: 113343
2010-09-08 04:30:51 +00:00
Evan Cheng
5a058ed2a0 Remove a dead comment.
llvm-svn: 113259
2010-09-07 20:01:10 +00:00
Chris Lattner
6ecbbff857 fix the operand constraints of the immediate form of in/out,
allowing unsigned 8-bit operands.  This fixes rdar://8208481

llvm-svn: 113182
2010-09-06 23:29:05 +00:00
Roman Divacky
f760edb301 Redefine LOOP* instructions from I to Ii8PCRel as they take an i8 argument.
llvm-svn: 113158
2010-09-06 18:43:14 +00:00
Jakob Stoklund Olesen
b7bd26db67 Don't call Predicate_* from X86 target.
llvm-svn: 112921
2010-09-03 00:35:18 +00:00
Anton Korobeynikov
1544f79e36 Fix nasty mingw32 bug, which e.g. prevented llvm-gcc bootstrap there.
Mark _alloca call as clobberring EFLAGS, otherwise some DCE might remove
other flags-clobberring stuff (e.g. cmp instructions) occuring after
_alloca call.

llvm-svn: 112034
2010-08-25 07:50:11 +00:00
Chris Lattner
f0f35c4aea Add a new llvm.x86.int intrinsic, allowing access to the
x86 int and int3 instructions.  Patch by Peter Housel!

llvm-svn: 111831
2010-08-23 19:39:25 +00:00
Chris Lattner
355d472093 fix PR7465, mishandling of lcall and ljmp: intersegment long
call and jumps.

llvm-svn: 111496
2010-08-19 01:18:43 +00:00
Eric Christopher
1470fe415c Rework how the non-sse2 memory barrier is lowered so that the
encoding is correct for the built-in assembler.

Based on a patch from Chris.

llvm-svn: 111083
2010-08-14 21:51:50 +00:00
Eric Christopher
a79ff725ab Wording.
llvm-svn: 110618
2010-08-09 22:52:47 +00:00
Eric Christopher
61f3059ee1 Be a little bit more specific about target for the memory barrier
instructions.

llvm-svn: 110360
2010-08-05 18:36:20 +00:00
Eric Christopher
0e09eb9f77 Make x86-64 membarriers work without sse and clean up some of the
uses.

llvm-svn: 110274
2010-08-04 23:03:04 +00:00
Bruno Cardoso Lopes
5d4afd0cb9 Fix typo!
llvm-svn: 109877
2010-07-30 19:41:24 +00:00
Bruno Cardoso Lopes
cb0f921ca4 Temporary hack to let codegen assert or generate poor code in case
we are using AVX and no AVX version of the desired intruction is present,
this is better for incremental dev (without fallbacks it's easier to spot
what's missing). Not sure this is the best hack thought (we can also disable
all HasSSE* predicates by dinamically marking them 'false' if AVX is present)

llvm-svn: 109434
2010-07-26 21:01:18 +00:00
Bruno Cardoso Lopes
b034ffa291 Add x86 CLMUL (Carry-less multiplication) cpu feature
llvm-svn: 109206
2010-07-23 01:17:51 +00:00
Bruno Cardoso Lopes
b9182e3051 Add complete assembler support for FMA3 instructions, with descriptions and encodings taken from the AVX manual
llvm-svn: 109204
2010-07-23 00:54:35 +00:00
Eric Christopher
4924d5fb93 Custom lower the memory barrier instructions and add support
for lowering without sse2.  Add a couple of new testcases.

Fixes a few libgomp tests and latent bugs.  Remove a few todos.

llvm-svn: 109078
2010-07-22 02:48:34 +00:00
Eric Christopher
959481ec87 Pulling out previous patch, must've run the tests in
the wrong directory.

llvm-svn: 109005
2010-07-21 09:23:56 +00:00
Eric Christopher
5c12ad2a4b Lower MEMBARRIER on x86 and support processors without SSE2.
Fixes a pile of libgomp failures in the llvm-gcc testsuite due
to the libcall not existing.

llvm-svn: 109004
2010-07-21 09:05:23 +00:00
Bruno Cardoso Lopes
4ca44dda21 Add 256-bit vaddsub, vhadd, vhsub, vblend and vdpp instructions!
llvm-svn: 108769
2010-07-19 23:32:44 +00:00
Daniel Dunbar
1dd74c37c5 X86: Mark JMP{32,64}[mr] as requires 32-bit/64-bit mode. They are the same
instruction, we only want to allow the one for the current subtarget.
 - This also fixes suffix matching for jmp instructions, because it eliminates
   the ambiguity between 'jmpl' and 'jmpq'.

llvm-svn: 108746
2010-07-19 20:44:16 +00:00
Daniel Dunbar
fa2847103d X86: Mark some tail call pseduo instruction as code gen only.
llvm-svn: 108684
2010-07-19 07:21:04 +00:00
Daniel Dunbar
f228215d4f X86: Mark In32/64BitMode on LEAVE[64] and SYSEXIT[64].
llvm-svn: 108683
2010-07-19 07:21:01 +00:00
Daniel Dunbar
7a3565367a X86: Mark MOV.*_{TC,NOREX} instruction as code gen only, they aren't real.
llvm-svn: 108680
2010-07-19 06:14:49 +00:00
Daniel Dunbar
9409c3fbb2 X86: MOV8o8a, MOV8ao8, etc. are only valid in 32-bit mode.
llvm-svn: 108679
2010-07-19 06:14:44 +00:00
Bruno Cardoso Lopes
3676e24b67 Start the support for AVX instructions with 256-bit %ymm registers. A couple of
notes:
- The instructions are being added with dummy placeholder patterns using some 256
  specifiers, this is not meant to work now, but since there are some multiclasses
  generic enough to accept them,  when we go for codegen, the stuff will be already
  there.
- Add VEX encoding bits to support YMM
- Add MOVUPS and MOVAPS in the first round
- Use "Y" as suffix for those Instructions: MOVUPSYrr, ...
- All AVX instructions in X86InstrSSE.td will move soon to a new X86InstrAVX
  file.

llvm-svn: 107996
2010-07-09 18:27:43 +00:00
Chris Lattner
a5c1c795a2 have the mc lowering process handle a few tail call forms, lowering them to
jumps where possible and turning the TAILCALL marker in the instruction
asm string into a proper comment.

This eliminates a FIXME and is on the path to finishing:
rdar://7639610 - eliminate encoding and asm info for TAILJMPd TAILJMPr TAILJMPn, etc.

However, I can't eliminate the encodings for these instructions because the JIT
still exists and has its own copy of the encoder, sigh.

llvm-svn: 107946
2010-07-09 00:49:41 +00:00
Chris Lattner
49ac65543c Change LEA to have 5 operands for its memory operand, just
like all other instructions, even though a segment is not
allowed.  This resolves a bunch of gross hacks in the 
encoder and makes LEA more consistent with the rest of the
instruction set.

No functionality change.

llvm-svn: 107934
2010-07-08 23:46:44 +00:00
Chris Lattner
6a5db9c9c9 Implement the major chunk of PR7195: support for 'callw'
in the integrated assembler.  Still some discussion to be
done.

llvm-svn: 107825
2010-07-07 22:27:31 +00:00
Eric Christopher
657b8b040e Add a couple more quick comments.
llvm-svn: 106717
2010-06-24 02:07:57 +00:00
Eric Christopher
436ff8863f Update according to feedback.
llvm-svn: 106677
2010-06-23 20:49:35 +00:00
Nico Weber
04606293a5 Add support for the x86 instructions "pusha" and "popa".
llvm-svn: 106671
2010-06-23 20:00:58 +00:00
Eric Christopher
c6382036ef Update uses, defs, and comments for darwin tls patterns.
llvm-svn: 106621
2010-06-23 08:01:49 +00:00
Eric Christopher
b6dfc01862 Finish ripping isTwoAddress out of X86. Some mindless formatting
and operand renaming to help.

The giant turn the constraints on and selectively turn it off
should probably be inverted at some point since it's just largely
50/50.

llvm-svn: 106367
2010-06-19 00:37:40 +00:00
Eric Christopher
5f10974e92 Ensure that mov and not lea are used to stick the address into
the register.  While we're at it, make sure it's in the right one.

llvm-svn: 105645
2010-06-08 22:04:25 +00:00
Eric Christopher
30010cae3a Add first pass at darwin tls compiler support.
llvm-svn: 105381
2010-06-03 04:07:48 +00:00
Daniel Dunbar
918b0f7bd9 AsmMatcher/X86: Mark _REV instructions as "code gen only", they aren't expected
to be matched.

llvm-svn: 104757
2010-05-26 22:21:28 +00:00