Evan Cheng
fa61b6a4ba
Fix lfence and mfence encoding. These look like MRM5r and MRM6r instructions except they do not have any operands. The RegModRM byte is encoded with register number 0.
...
llvm-svn: 57692
2008-10-17 17:14:20 +00:00
Anton Korobeynikov
6204f4ac43
Update size of inst correctly with segment override.
...
llvm-svn: 57414
2008-10-12 10:30:11 +00:00
Duncan Sands
f175d9eae0
Fix comment typo.
...
llvm-svn: 57381
2008-10-11 19:34:24 +00:00
Anton Korobeynikov
d8b3e6f0ce
Add ability to override segment (mostly for code emitter purposes).
...
llvm-svn: 57380
2008-10-11 19:09:15 +00:00
Dan Gohman
30c5ce1b7d
Switch the MachineOperand accessors back to the short names like
...
isReg, etc., from isRegister, etc.
llvm-svn: 57006
2008-10-03 15:45:36 +00:00
Dan Gohman
e1f9be27bc
Tidy up several unbeseeming casts from pointer to intptr_t.
...
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Anton Korobeynikov
5bbfc7e05f
Allow inline asm nodes with empty bodies inside JIT.
...
This unbreaks explicit reg vars inside JIT, which are
implemented in such hacky way :)
llvm-svn: 55128
2008-08-21 17:33:01 +00:00
Bill Wendling
2ba1a2b516
Clean up whitespace.
...
llvm-svn: 55117
2008-08-21 08:38:54 +00:00
Dale Johannesen
4dc25a234c
Make x86-64 JIT changes Darwin-specific.
...
llvm-svn: 54700
2008-08-12 21:02:08 +00:00
Dale Johannesen
74bf5907fa
In the absence of a linker to build the GOT, use the 32-bit
...
non_lazy_ptr mechanism on x86-64 Darwin JIT. Fixes a bunch
of last night's failures.
llvm-svn: 54692
2008-08-12 18:23:48 +00:00
Dale Johannesen
718fcee02d
Some fixes for x86-64 JIT. Make it use small code
...
model, except for external calls; this makes
addressing modes PC-relative. Incomplete.
The assertion at the top of Emitter::runOnMachineFunction
was obviously bogus (always true) so I removed it.
If someone knows what the correct test should be to cover
all the various targets, please fix.
llvm-svn: 54656
2008-08-11 23:46:25 +00:00
Dan Gohman
c8097f8c8c
Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
...
the need for a flavor operand, and add a new SDNode subclass,
LabelSDNode, for use with them to eliminate the need for a label id
operand.
Change instruction selection to let these label nodes through
unmodified instead of creating copies of them. Teach the MachineInstr
emitter how to emit a MachineInstr directly from an ISD label node.
This avoids the need for allocating SDNodes for the label id and
flavor value, as well as SDNodes for each of the post-isel label,
label id, and label flavor.
llvm-svn: 52943
2008-07-01 00:05:16 +00:00
Evan Cheng
e95fc3e83d
runOnMachineFunction should set IsPIC because relocation model may have been changed.
...
llvm-svn: 51291
2008-05-20 01:56:59 +00:00
Dan Gohman
f9d5689496
Change target-specific classes to use more precise static types.
...
This eliminates the need for several awkward casts, including
the last dynamic_cast under lib/Target.
llvm-svn: 51091
2008-05-14 01:58:56 +00:00
Evan Cheng
a626e13995
- Fix atomic operation JIT encoding.
...
- Remove unused instructions.
llvm-svn: 49921
2008-04-18 20:55:36 +00:00
Nicolas Geoffray
82baa2d2c6
Infrastructure for getting the machine code size of a function and an instruction. X86, PowerPC and ARM are implemented
...
llvm-svn: 49809
2008-04-16 20:10:13 +00:00
Evan Cheng
cb5a5467dc
Fix x86-64 encoding bug. REX prefix must always follow 0x0F prefix. For example, extractps in 64bit mode: 66 REX 0F 3A 17, not 66 0F 3A REX 17.
...
llvm-svn: 49157
2008-04-03 08:53:17 +00:00
Evan Cheng
07643ce604
Unbreak JIT. Ignore TargetInstrInfo::IMPLICIT_DEF.
...
llvm-svn: 48447
2008-03-17 06:56:52 +00:00
Evan Cheng
11d2c09adc
Replace all target specific implicit def instructions with a target independent one: TargetInstrInfo::IMPLICIT_DEF.
...
llvm-svn: 48380
2008-03-15 00:03:38 +00:00
Evan Cheng
6ef1ca4e87
Add debugging stuff.
...
llvm-svn: 48359
2008-03-14 07:13:42 +00:00
Evan Cheng
d421708e35
Ignore debugging related instructions if they get this far.
...
llvm-svn: 47934
2008-03-05 02:34:36 +00:00
Evan Cheng
a2939a16de
Rather than asserting. Dump out the MI that we are not able to encode and abort.
...
llvm-svn: 47933
2008-03-05 02:08:03 +00:00
Andrew Lenharth
ad29a49169
Add lock prefix support to x86. Also add the instructions necessary for the atomic ops. They are still marked pseudo, since I cannot figure out what format to use, but they are the correct opcode.
...
llvm-svn: 47795
2008-03-01 13:37:02 +00:00
Bill Wendling
16cba10ae6
De-tabify
...
llvm-svn: 47600
2008-02-26 10:57:23 +00:00
Nicolas Geoffray
72fa78e195
Enable exception handling int JIT
...
llvm-svn: 47079
2008-02-13 18:39:37 +00:00
Dan Gohman
d1cc100aef
Avoid needlessly casting away const qualifiers.
...
llvm-svn: 46877
2008-02-08 03:29:40 +00:00
Chris Lattner
48c54909dc
IMPLICIT_USE and IMPLICIT_DEF are dead, remove them.
...
llvm-svn: 45838
2008-01-10 19:27:54 +00:00
Chris Lattner
f83aae613c
rename TargetInstrDescriptor -> TargetInstrDesc.
...
Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.
llvm-svn: 45695
2008-01-07 07:27:27 +00:00
Chris Lattner
9b987de2c5
rename hasVariableOperands() -> isVariadic(). Add some comments.
...
Evan, please review the comments I added to getNumDefs to make sure
that they are accurate, thx.
llvm-svn: 45687
2008-01-07 05:19:29 +00:00
Chris Lattner
9d38dfa4a5
Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptor
...
llvm-svn: 45680
2008-01-07 03:13:06 +00:00
Chris Lattner
f7f96d818f
Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects
...
that it is cheap and efficient to get.
Move a variety of predicates from TargetInstrInfo into
TargetInstrDescriptor, which makes it much easier to query a predicate
when you don't have TII around. Now you can use MI->getDesc()->isBranch()
instead of going through TII, and this is much more efficient anyway. Not
all of the predicates have been moved over yet.
Update old code that used MI->getInstrDescriptor()->Flags to use the
new predicates in many places.
llvm-svn: 45674
2008-01-07 01:56:04 +00:00
Evan Cheng
759f389846
X86 JIT PIC jumptable support.
...
llvm-svn: 45616
2008-01-05 02:26:58 +00:00
Evan Cheng
5b9282f3b5
Combine MovePCtoStack + POP32r into one instruction MOVPC32r so it can be moved if needed.
...
llvm-svn: 45605
2008-01-05 00:41:47 +00:00
Evan Cheng
6dbcca7903
Unbreak tailcall opt in JIT.
...
llvm-svn: 45576
2008-01-04 10:50:28 +00:00
Evan Cheng
7322e4dec4
X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
...
llvm-svn: 45575
2008-01-04 10:46:51 +00:00
Evan Cheng
fb2bc4fc95
Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be used
...
for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode).
llvm-svn: 45527
2008-01-03 02:56:28 +00:00
Evan Cheng
ba1fd9fc76
X86 PIC JIT bug fix: relocations for constantpool and jumptable.
...
llvm-svn: 45515
2008-01-02 23:38:59 +00:00
Chris Lattner
9e5cc35593
Add new shorter predicates for testing machine operands for various types:
...
e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on
switching everything over, so new clients should just start using the
shorter names.
Remove old long accessors, switching everything over to use the short
accessor: getMachineBasicBlock() -> getMBB(),
getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc.
llvm-svn: 45464
2007-12-30 23:10:15 +00:00
Chris Lattner
ad9a6ccb83
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Evan Cheng
c226a1a7d3
Preliminary PIC JIT support for X86 (32-bit) / Darwin.
...
llvm-svn: 45313
2007-12-22 09:40:20 +00:00
Dale Johannesen
5fd9e7a615
Add parameter to getDwarfRegNum to permit targets
...
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.
llvm-svn: 44056
2007-11-13 19:13:01 +00:00
Evan Cheng
994043f515
Fix x86-64 jit: remove reliance on Dwarf numbers.
...
llvm-svn: 44048
2007-11-13 17:54:34 +00:00
Duncan Sands
26ef2a1767
Move getX86RegNum into X86RegisterInfo and use it
...
in the trampoline lowering. Lookup the jump and
mov opcodes for the trampoline rather than hard
coding them.
llvm-svn: 41577
2007-08-29 19:01:20 +00:00
Christopher Lamb
919ce03da6
Change the x86 backend to use extract_subreg for truncation operations. Passes DejaGnu, SingleSource and MultiSource.
...
llvm-svn: 40578
2007-07-29 01:24:57 +00:00
Duncan Sands
35a77d857b
Trampoline codegen support for X86-32.
...
llvm-svn: 40566
2007-07-27 20:02:49 +00:00
Devang Patel
cd45427a87
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162
Use 'static const char' instead of 'static const int'.
...
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
38a66bc82e
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Anton Korobeynikov
f3e62a428a
Removed tabs everywhere except autogenerated & external files. Add make
...
target for tabs checking.
llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Bill Wendling
3b1189afbf
Add support for our first SSSE3 instruction "pmulhrsw".
...
llvm-svn: 35869
2007-04-10 22:10:25 +00:00