Commit Graph

136 Commits

Author SHA1 Message Date
Devang Patel 8c78a0bff0 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel e95c6ad802 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 09f162ca6a Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Anton Korobeynikov fb80151c42 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 f099841573 Add support for our first SSSE3 instruction "pmulhrsw".
llvm-svn: 35869
2007-04-10 22:10:25 +00:00
Evan Cheng e278f30a52 Clean up.
llvm-svn: 35105
2007-03-14 20:20:19 +00:00
Evan Cheng dda4c32db3 X86-64 JIT is in large code model. Need stubs for direct calls.
llvm-svn: 35097
2007-03-14 10:51:55 +00:00
Jim Laskey f9e5445ed4 Make LABEL a builtin opcode.
llvm-svn: 33537
2007-01-26 14:34:52 +00:00
Chris Lattner 1ef9cd400d eliminate static ctors for Statistic objects.
llvm-svn: 32703
2006-12-19 22:59:26 +00:00
Chris Lattner 700b873130 Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.

llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Evan Cheng 3b235aa5dc JIT large code model support.
llvm-svn: 32220
2006-12-05 07:29:55 +00:00
Evan Cheng 62cdc3f011 - Fix X86-64 JIT by temporarily disabling code that treats GV address as 32-bit
immediate in small code model. The JIT cannot ensure GV's are placed in the
lower 4G.
- Some preliminary support for large code model.

llvm-svn: 32215
2006-12-05 04:01:03 +00:00
Evan Cheng 67fc141db5 Match TargetInstrInfo changes.
llvm-svn: 32098
2006-12-01 21:52:58 +00:00
Bill Wendling c8e81b8d48 Removed even more std::cerr and #include <iostream> things.
llvm-svn: 31813
2006-11-17 07:52:03 +00:00
Evan Cheng 14140059f0 Use TargetInstrInfo::getNumOperands() instead of MachineInstr::getNumOperands(). In preparation for implicit reg def/use changes.
llvm-svn: 31616
2006-11-10 01:28:43 +00:00
Evan Cheng 1698c2999c Remove M_2_ADDR_FLAG.
llvm-svn: 31583
2006-11-09 02:22:54 +00:00
Evan Cheng 92e5113d48 Skip over first operand when determining REX prefix for two-address code.
llvm-svn: 30300
2006-09-13 19:07:28 +00:00
Evan Cheng 11b0a5dbd4 Committing X86-64 support.
llvm-svn: 30177
2006-09-08 06:48:29 +00:00
Evan Cheng 7f3f0973e6 Clean up.
llvm-svn: 30140
2006-09-07 01:17:57 +00:00
Evan Cheng 4c7a3fbdea Watch out for variable_ops instructions.
llvm-svn: 30135
2006-09-06 20:32:45 +00:00
Evan Cheng ac22e54131 Variable ops instructions may ignore the last few operands for code emission.
llvm-svn: 30134
2006-09-06 20:24:14 +00:00
Chris Lattner e3d2e1e41e Update the X86 JIT to make it work with the new two-addr changes. This also
adds assertions that check to make sure every operand gets emitted.

llvm-svn: 30110
2006-09-05 02:52:35 +00:00
Chris Lattner 3d27be1333 s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|
llvm-svn: 29911
2006-08-27 12:54:02 +00:00
Chris Lattner c664efe223 Give a good error message when we try to jit inline asm.
llvm-svn: 29891
2006-08-26 00:47:03 +00:00
Evan Cheng 78bf1074fc Resolve BB references with relocation.
llvm-svn: 29351
2006-07-27 18:21:10 +00:00
Evan Cheng f6acb34d23 - Refactor the code that resolve basic block references to a TargetJITInfo
method.
- Added synchronizeICache() to TargetJITInfo. It is called after each block
  of code is emitted to flush the icache. This ensures correct execution
  on targets that have separate dcache and icache.
- Added PPC / Mac OS X specific code to do icache flushing.

llvm-svn: 29276
2006-07-25 20:40:54 +00:00
Chris Lattner 0cc5907728 Hide x86 symbols
llvm-svn: 28976
2006-06-28 23:27:49 +00:00
Evan Cheng 0c9b90aba3 Eliminate unneeded parameter.
llvm-svn: 28907
2006-06-22 00:02:55 +00:00
Evan Cheng fc1b27dad1 variable_ops instructions such as call can have any number of operands.
llvm-svn: 28906
2006-06-21 23:37:07 +00:00
Evan Cheng 9fee442e63 X86 integer register classes naming changes. Make them consistent with FP, vector classes.
llvm-svn: 28324
2006-05-16 07:21:53 +00:00
Chris Lattner ee64b6b40f Remove a bunch more dead V9 specific stuff
llvm-svn: 28094
2006-05-04 01:26:39 +00:00
Chris Lattner 6e663f1c1e Remove some more V9-specific stuff.
llvm-svn: 28092
2006-05-04 00:49:59 +00:00
Chris Lattner 2aef59f123 Simplify handling of relocations
llvm-svn: 28090
2006-05-04 00:42:08 +00:00
Chris Lattner e3a9c70ba0 Change from using MachineRelocation ctors to using static methods
in MachineRelocation to create Relocations.

llvm-svn: 28088
2006-05-03 20:30:20 +00:00
Chris Lattner 9e68942d78 inline a simple method
llvm-svn: 28083
2006-05-03 17:21:32 +00:00
Chris Lattner 1d8ee1fc80 Suck block address tracking out of targets into the JIT Emitter. This
simplifies the MachineCodeEmitter interface just a little bit and makes
BasicBlocks work like constant pools and jump tables.

llvm-svn: 28082
2006-05-03 17:10:41 +00:00
Nate Begeman 43b1ed7e3d Teach the x86 jit how to handle jump tables not directly used by a jump
instruction.

llvm-svn: 28080
2006-05-03 04:52:47 +00:00
Chris Lattner d8b192ba3b Change the BasicBlockAddrs map to be a vector, indexed by MBB number.
llvm-svn: 28069
2006-05-03 00:32:55 +00:00
Chris Lattner b8065a9a3a Several related changes:
1. Change several methods in the MachineCodeEmitter class to be pure virtual.
2. Suck emitConstantPool/initJumpTableInfo into startFunction, removing them
   from the MachineCodeEmitter interface, and reducing the amount of target-
   specific code.
3. Change the JITEmitter so that it allocates constantpools and jump tables
   *right* next to the functions that they belong to, instead of in a separate
   pool of memory.  This makes all memory for a function be contiguous, and
   means the JITEmitter only tracks one block of memory now.

llvm-svn: 28065
2006-05-02 23:22:24 +00:00
Chris Lattner e1c96369e2 Fix a purely hypothetical problem (for now): emitWord emits in the host
byte format.  This doesn't work when using the code emitter in a cross target
environment.  Since the code emitter is only really used by the JIT, this
isn't a current problem, but if we ever start emitting .o files, it would be.

llvm-svn: 28060
2006-05-02 19:14:47 +00:00
Chris Lattner c9aa3715e8 Refactor the machine code emitter interface to pull the pointers for the current
code emission location into the base class, instead of being in the derived classes.

This change means that low-level methods like emitByte/emitWord now are no longer
virtual (yaay for speed), and we now have a framework to support growable code
segments.  This implements feature request #1 of PR469.

llvm-svn: 28059
2006-05-02 18:27:26 +00:00
Chris Lattner 5bc9c583e3 There is no reason to use a virtual method to store this word.
llvm-svn: 28053
2006-05-02 17:16:20 +00:00
Nate Begeman 4ca2ea5b43 JumpTable support! What this represents is working asm and jit support for
x86 and ppc for 100% dense switch statements when relocations are non-PIC.
This support will be extended and enhanced in the coming days to support
PIC, and less dense forms of jump tables.

llvm-svn: 27947
2006-04-22 18:53:45 +00:00
Evan Cheng b1d3c64d1f Add a couple more pseudo instructions.
llvm-svn: 26939
2006-03-22 02:52:03 +00:00
Evan Cheng 877ab55e06 ConstantPoolIndex is now the displacement portion of the address (rather
than base).

llvm-svn: 26382
2006-02-26 09:12:34 +00:00
Evan Cheng 73136dfecc - Added option -relocation-model to set relocation model. Valid values include static, pic,
dynamic-no-pic, and default.
PPC and x86 default is dynamic-no-pic for Darwin, pic for others.
- Removed options -enable-pic and -ppc-static.

llvm-svn: 26315
2006-02-22 20:19:42 +00:00
Evan Cheng 5caed8a231 Jit does not support PIC yet.
llvm-svn: 26278
2006-02-18 00:57:10 +00:00
Evan Cheng f84774ed46 Don't special case XS, XD prefixes.
llvm-svn: 26183
2006-02-14 21:52:51 +00:00
Evan Cheng fb7b5ef74b Bug fix: XS, XD prefixes were being emitted twice.
XMM registers were not being handled.

llvm-svn: 26182
2006-02-14 21:45:24 +00:00
Evan Cheng 9e350cd6ad - Use xor to clear integer registers (set R, 0).
- Added a new format for instructions where the source register is implied
  and it is same as the destination register. Used for pseudo instructions
  that clear the destination register.

llvm-svn: 25872
2006-02-01 06:13:50 +00:00