Craig Topper
a538d831e6
Add a getName function to MachineFunction. Use it in places that previously did getFunction()->getName(). Remove includes of Function.h that are no longer needed.
...
llvm-svn: 162347
2012-08-22 06:07:19 +00:00
Craig Topper
0b94e46ce3
Don't use implicit register operands to calculate L-bit for AVX instructions. Needed because super reg defs and kills are added as implicit operands on 128-bit instructions. Fixes PR13349. Patch by Jose Fonseca.
...
llvm-svn: 160543
2012-07-20 07:03:46 +00:00
Craig Topper
f7755df776
Update GATHER instructions to support 2 read-write operands. Patch from myself and Manman Ren.
...
llvm-svn: 160110
2012-07-12 06:52:41 +00:00
Elena Demikhovsky
602f3a26d6
Added FMA3 Intel instructions.
...
I disabled FMA3 autodetection, since the result may differ from expected for some benchmarks.
I added tests for GodeGen and intrinsics.
I did not change llvm.fma.f32/64 - it may be done later.
llvm-svn: 157737
2012-05-31 09:20:20 +00:00
Benjamin Kramer
f1e0b6cdf7
Port support for SSE4a extrq/insertq to the old jit code emitter.
...
llvm-svn: 157685
2012-05-30 09:13:55 +00:00
Craig Topper
9fc5c814fa
Fix indentation of wrapped line for readability. No functional change.
...
llvm-svn: 157309
2012-05-23 03:59:53 +00:00
Craig Topper
1964b6d39d
Tidy up some spacing and inconsistent use of pre/post increment. No functional change intended.
...
llvm-svn: 157122
2012-05-19 19:14:18 +00:00
Craig Topper
6166178573
Copy some AVX support from MCJIT to JIT. Maybe will fix PR12748.
...
llvm-svn: 157109
2012-05-19 08:28:17 +00:00
Jakub Staszak
6126401c83
Remove unneeded break.
...
llvm-svn: 155959
2012-05-01 23:08:16 +00:00
Jakub Staszak
339380286b
Remove trailing spaces.
...
llvm-svn: 155956
2012-05-01 23:04:38 +00:00
Craig Topper
d32ebcc36b
Attempt to handle MRMInitReg in emitVEXOpcodePrefix. Hopefully fixes PR12711.
...
llvm-svn: 155896
2012-05-01 06:34:01 +00:00
Pete Cooper
f76b5fe5ab
Copied all the VEX prefix encoding code from X86MCCodeEmitter to the x86 JIT emitter. Needs some major refactoring as these two code emitters are almost identical
...
llvm-svn: 155810
2012-04-30 03:56:44 +00:00
Jia Liu
b22310fda6
Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore.
...
llvm-svn: 150878
2012-02-18 12:03:15 +00:00
Jakob Stoklund Olesen
97e3115dc2
Use the same CALL instructions for Windows as for everything else.
...
The different calling conventions and call-preserved registers are
represented with regmask operands that are added dynamically.
llvm-svn: 150708
2012-02-16 17:56:02 +00:00
Evan Cheng
7f8e563a69
Add bundle aware API for querying instruction properties and switch the code
...
generator to it. For non-bundle instructions, these behave exactly the same
as the MC layer API.
For properties like mayLoad / mayStore, look into the bundle and if any of the
bundled instructions has the property it would return true.
For properties like isPredicable, only return true if *all* of the bundled
instructions have the property.
For properties like canFoldAsLoad, isCompare, conservatively return false for
bundles.
llvm-svn: 146026
2011-12-07 07:15:52 +00:00
Eli Friedman
b72d55353a
Add support to the old JIT for acquire/release loads and stores on x86. PR11207.
...
llvm-svn: 142841
2011-10-24 20:24:21 +00:00
Craig Topper
980d59832a
Add X86 RORX instruction
...
llvm-svn: 142741
2011-10-23 07:34:00 +00:00
Craig Topper
96fa597828
Add X86 PEXTR and PDEP instructions.
...
llvm-svn: 142141
2011-10-16 16:50:08 +00:00
Nicolas Geoffray
7ea09c9462
Remove premature previous commit.
...
llvm-svn: 138725
2011-08-28 14:52:51 +00:00
Nicolas Geoffray
f786bae6ac
Encoding of instructions referencing segments has changed. Do what X86MCCodeEmitter does.
...
llvm-svn: 138723
2011-08-28 13:07:57 +00:00
Jeffrey Yasskin
6381c0100b
Explicitly cast narrowing conversions inside {}s that will become errors in
...
C++0x.
llvm-svn: 136211
2011-07-27 06:22:51 +00:00
Evan Cheng
7e763d86ba
Refactor X86 target to separate MC code from Target code.
...
llvm-svn: 135930
2011-07-25 18:43:53 +00:00
Evan Cheng
d60fa58ba1
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
...
to MCRegisterInfo. Also initialize the mapping at construction time.
This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step
towards fixing the layering violation.
llvm-svn: 135424
2011-07-18 20:57:22 +00:00
Evan Cheng
6cc775f905
- Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and
...
sink them into MC layer.
- Added MCInstrInfo, which captures the tablegen generated static data. Chang
TargetInstrInfo so it's based off MCInstrInfo.
llvm-svn: 134021
2011-06-28 19:10:37 +00:00
Joerg Sonnenberger
fc4789da4a
Add support for the VIA PadLock instructions.
...
llvm-svn: 128826
2011-04-04 16:58:13 +00:00
Chris Lattner
c951cfe6a0
add jit support for the new psuedo instructions I added for
...
the add/or xform. The JIT isn't mcized yet, boo.
This fixes Olden/voronoi, bh and a ton of other stuff that
uses the jit.
llvm-svn: 116125
2010-10-08 23:59:27 +00:00
Chris Lattner
8eeb5013cd
machine a mutable machineinstr down into emitInstruction.
...
llvm-svn: 116124
2010-10-08 23:54:01 +00:00
Gabor Greif
21fed6616c
tyops
...
llvm-svn: 111835
2010-08-23 20:30:51 +00:00
Anton Korobeynikov
231ab847ca
More fixes for win64:
...
- Do not clobber al during variadic calls, this is AMD64 ABI-only feature
- Emit wincall64, where necessary
Patch by Cameron Esfahani!
llvm-svn: 111289
2010-08-17 21:06:07 +00:00
Eric Christopher
6e5b67ccc4
Revert last patch and r110954 as I meant to.
...
llvm-svn: 111001
2010-08-13 02:37:50 +00:00
Eric Christopher
5e027fe113
Revert r110954 for now, pseudo instructions can't make it through to the JIT.
...
llvm-svn: 111000
2010-08-13 02:30:00 +00:00
Owen Anderson
a7aed18624
Reapply r110396, with fixes to appease the Linux buildbot gods.
...
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson
bda59bd247
Revert r110396 to fix buildbots.
...
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson
755aceb5d0
Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
...
ID member as the sole unique type identifier. Clean up APIs related to this change.
llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Eric Christopher
4d9c3400f3
Handle the memory barrier pseudo that goes to nothing for the JIT.
...
llvm-svn: 110371
2010-08-05 20:04:36 +00:00
Chris Lattner
083be4d384
instead of migrating it to the MC instruction encoder, just
...
rip out the implementation of X86InstrInfo::GetInstSizeInBytes.
The code being ripped out just implemented a copy and hacked up
version of the (old) instruction encoder, and is buggy and
terrible in other ways. Since "GetInstSizeInBytes" is really
only there to support the JIT's "NeedsExactSize" hook (which
noone is using), just rip out the code. I will rip out the
NeedsExactSize hook next.
This resolves rdar://7617809 - switch X86InstrInfo::GetInstSizeInBytes to use X86MCCodeEmitter
llvm-svn: 109149
2010-07-22 21:05:13 +00:00
Bill Wendling
499f797cdd
Rename DBG_LABEL PROLOG_LABEL, because it's only used during prolog emission and
...
thus is a much more meaningful name.
llvm-svn: 108563
2010-07-16 22:20:36 +00:00
Jakob Stoklund Olesen
c30b4ddc58
Remove the X86::FP_REG_KILL pseudo-instruction and the X86FloatingPointRegKill
...
pass that inserted it.
It is no longer necessary to limit the live ranges of FP registers to a single
basic block.
llvm-svn: 108536
2010-07-16 17:41:44 +00:00
Chris Lattner
f469307c77
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
ec536276f0
add some long-overdue enums to refer to the parts of the 5-operand
...
X86 memory operand.
llvm-svn: 107925
2010-07-08 22:41:28 +00:00
Dan Gohman
d2d1ae105d
Use pre-increment instead of post-increment when the result is not used.
...
llvm-svn: 106542
2010-06-22 15:08:57 +00:00
Bill Wendling
11740305f9
Handle a displacement location in 64-bit as an RIP-relative displacement. It
...
fixes a bug (<rdar://problem/7880900>) in the JIT. This code wouldn't work:
target triple = "x86_64-apple-darwin"
define double @func(double %a) {
%tmp1 = fmul double %a, 5.000000e-01 ; <double> [#uses=1]
ret double %tmp1
}
define i32 @main() nounwind {
%1 = call double @func(double 4.770000e-04) ; <i64> [#uses=0]
ret i32 0
}
llvm-svn: 101965
2010-04-21 00:34:04 +00:00
Dan Gohman
bcaf681cde
Add const qualifiers to CodeGen's use of LLVM IR constructs.
...
llvm-svn: 101334
2010-04-15 01:51:59 +00:00
Chris Lattner
2104b8d36e
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
c26f44fb07
change the DBG_LABEL MachineInstr to always be created
...
with an MCSymbol instead of an immediate.
llvm-svn: 98481
2010-03-14 07:56:48 +00:00
Chris Lattner
1065f49ad9
switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.
...
llvm-svn: 98474
2010-03-14 07:27:07 +00:00
Chris Lattner
ee2fbbc978
change the LabelSDNode to be EHLabelSDNode and make it hold
...
an MCSymbol. Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID. Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".
llvm-svn: 98463
2010-03-14 02:33:54 +00:00
Chris Lattner
34adc8d225
change EH related stuff (other than EH_LABEL) to use MCSymbol
...
instead of label ID's. This cleans up and regularizes a bunch
of code and makes way for future progress.
Unfortunately, this pointed out to me that JITDwarfEmitter.cpp
is largely copy and paste from DwarfException/MachineModuleInfo
and other places. This is very sad and disturbing. :(
One major change here is that TidyLandingPads moved from being
called in DwarfException::BeginFunction to being called in
DwarfException::EndFunction. There should not be any
functionality change from doing this, but I'm not an EH expert.
llvm-svn: 98459
2010-03-14 01:41:15 +00:00
Chris Lattner
509154e0f9
rip out the 'heinous' x86 MCCodeEmitter implementation.
...
We still have the templated X86 JIT emitter, *and* the
almost-copy in X86InstrInfo for getting instruction sizes.
llvm-svn: 96059
2010-02-13 00:49:29 +00:00
Chris Lattner
064e926362
Remove special cases for [LM]FENCE, MONITOR and MWAIT from
...
encoder and decoder by using new MRM_ forms.
llvm-svn: 96048
2010-02-12 23:54:57 +00:00