Commit Graph

202 Commits

Author SHA1 Message Date
Chris Lattner
69191f8f05 prune #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24468 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:33:17 +00:00
Chris Lattner
d939f6c85d Switch to using the shared constant pool printer, along with using shorter
CPI ids


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24467 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 08:32:23 +00:00
Chris Lattner
8b8b9515d6 Adjust to capitalized AsmPrinter method names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24456 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:51:23 +00:00
Chris Lattner
7b6e53cde7 convert the rest of this over to use SwitchSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24448 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:16:34 +00:00
Chris Lattner
224cfc2eac Start using the AsmPrinter shared SwitchSection code. This allows the X86
backend to implement global variables in sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24447 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 07:11:11 +00:00
Chris Lattner
62cbf2aab9 Rename SwitchSection -> switchSection to avoid conflicting with a future
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24443 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 06:55:27 +00:00
Chris Lattner
c41cc83117 Naturally align doubles in the constant pool, set PrivateGlobalPrefix on
darwin, use it when printing the constant pool indices so the labels are
appropriately private, emit cp entries to .const instead of .data on darwin
and only emit a single .section for the constant pool, not one for each
entry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24440 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 06:46:22 +00:00
Jeff Cohen
00b16889ab Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 06:12:32 +00:00
Nate Begeman
9035b99abf A couple more darwinisms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22450 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-16 01:59:47 +00:00
Nate Begeman
73213f6c07 Commit some pending darwin changes before subtarget support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22388 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 01:37:28 +00:00
Chris Lattner
b12c9fa565 Fix crazy indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22380 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-11 06:25:47 +00:00
Nate Begeman
72b286b0a0 Add support for assembling .s files on mac os x for intel
Add support for running bugpoint on mac os x for intel


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22351 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 00:23:26 +00:00
Nate Begeman
4eb74ba602 The statistic needs to be in the correct namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22327 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-01 23:56:38 +00:00
Chris Lattner
b36cbd0286 Refactor X86AsmPrinter.cpp into multiple files. Patch contributed
by Aaron Gray, cleaned up by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22324 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-01 22:44:09 +00:00
Nate Begeman
9d19eb459c Make the x86 asm printer darwin-aware. This mostly entails doing the same
thing as cygwin most of the time, and printing our alignments in log2
rather than number of bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22316 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-30 00:53:20 +00:00
John Criswell
57c24508d3 Fixed indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22270 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 19:59:22 +00:00
Misha Brukman
0e0a7a45d3 * Remove trailing whitespace
* Convert tabs to spaces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21426 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 23:38:14 +00:00
Chris Lattner
5b3a4553c1 Fix the missing symbols problem Bill was hitting. Patch contributed by
Bill Wendling!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20649 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 15:38:16 +00:00
Chris Lattner
e4d5c441e0 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:54:21 +00:00
Reid Spencer
d632f4977e Patch to make assembly output compatible with mingw compilation (identical
to cygwin)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20520 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-08 17:02:05 +00:00
Reid Spencer
5dc81f63d1 Support Cygwin assembly generation. The cygwin version of Gnu ASsembler
doesn't support certain directives and symbols on cygwin are prefixed with
an underscore. This patch makes the necessary adjustments to the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19775 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:52:14 +00:00
Chris Lattner
e11a9a93a8 Print a load of a null pointer (in intel mode) like this:
mov %AX, WORD PTR [0]

instead of like this:

        mov %AX, WORD PTR []


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19501 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:07:11 +00:00
Chris Lattner
9f2cb3da48 Print a load of a null pointer like this:
movw 0, %ax

instead of like this:

        movw , %ax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19500 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:05:19 +00:00
Chris Lattner
84b85c8262 Adjust to changes in asmwriter filenames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18987 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 17:33:24 +00:00
Misha Brukman
d2691fdf18 GhostLinkage should not reach asm printing stage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17750 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:03:49 +00:00
Chris Lattner
4b2c09fa22 Don't print unneeded labels
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17714 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 23:27:11 +00:00
Chris Lattner
0e0ed85697 Give the asmprinter the ability to print memrefs with a constant pool index,
index reg and scale


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17081 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-17 07:16:32 +00:00
Chris Lattner
d416f086cc Give the X86 asm printer the ability to print out addressing modes that have
constant displacements from global variables.  Patch by Jeff Cohen!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17009 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-15 04:44:53 +00:00
Chris Lattner
955f09666d * Prune #includes
* Update comments
* Rearrange code a bit
* Finally ELIMINATE the GAS workaround emitter for Intel mode.  woot!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16647 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 07:31:08 +00:00
Chris Lattner
ac5701c562 Add support for emitting AT&T style .s files, and make it the default. Users
may now choose their output format with the -x86-asm-syntax={intel|att} flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16646 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 07:24:48 +00:00
Chris Lattner
9a3e49a1b3 Add support for the -x86-asm-syntax flag, which can be used to choose between
Intel and AT&T style assembly language.  The ultimate goal of this is to
eliminate the GasBugWorkaroundEmitter class, but for now AT&T style emission
is not fully operational.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16639 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-03 20:36:57 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Chris Lattner
f746a7d09b Rename var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15897 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-18 02:22:55 +00:00
Chris Lattner
c6393f82bf Start using alignment output routines from AsmPrinter.
Changes to make this more similar to the ppc asmprinter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15890 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 19:25:42 +00:00
Chris Lattner
8581ee85b4 Use the AsmPrinter emitGlobalConstant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15872 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 06:48:55 +00:00
Chris Lattner
055acae18c Start using the AsmPrinter to emit our first class constants. This also
drops our half-assed support for cygwin, which noone uses and doesn't work
anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15839 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 23:16:06 +00:00
Chris Lattner
8e61d82528 Remove a dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15659 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-11 07:07:14 +00:00
Chris Lattner
2a998bdc7c Finally, the entire instruction asmprinter is now generated from tblgen, woo!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15658 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-11 07:02:04 +00:00
Chris Lattner
e4ead0ce62 Add asmprintergen support for the last X86 instruction that needs it: pcrelative calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15657 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-11 06:59:12 +00:00
Chris Lattner
8549429a78 Move hacks up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15654 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-11 06:09:55 +00:00
Chris Lattner
66fa1dcf90 Convert asmprinter to new style of instruction printer
Start asmprintergen'ifying machine instrs with memory operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15646 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-11 02:25:00 +00:00
Alkis Evlogimenos
15876bb28c Stop using getValues().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15487 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 08:44:43 +00:00
Chris Lattner
1626c507e8 Get rid of 3 of the 4 'printimplicit' flags. Implicit operands are now
explicitly listed in the asm string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15397 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-01 08:22:29 +00:00
Chris Lattner
25369cfa2b Handle registers a bit more efficiently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15395 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-01 08:12:41 +00:00
Chris Lattner
b12ee503f7 The tblgen'erated asmparser wants a way to print operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15392 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-01 07:43:46 +00:00
Chris Lattner
3fa861ac6c Rename the Printer class -> X86AsmPrinter.
Include the tablegenerated assembly writer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15389 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-01 06:02:08 +00:00
Misha Brukman
8606aea117 Fix indentation: should be 2 spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15240 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 18:48:58 +00:00
Misha Brukman
91b5ca838a Fix file header as it has been renamed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15239 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 18:45:48 +00:00
Reid Spencer
8863f1814b bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:38:32 +00:00
Misha Brukman
c1f901c589 Fix associativity of parameters to assert(): now it actually makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14483 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 19:43:20 +00:00
Misha Brukman
e8d8fb26a6 Convert tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14482 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 19:28:53 +00:00
Tanya Lattner
b140762a45 Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14389 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 00:13:11 +00:00
Chris Lattner
f70c22b019 Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 18:19:28 +00:00
Chris Lattner
d029cd2d5a Convert to the new TargetMachine interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13952 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 05:55:25 +00:00
Brian Gaeke
3fb5d1a6cc Support MachineBasicBlock operands on RawFrm instructions.
Get rid of separate numbering for LLVM BasicBlocks; use the automatically
generated MachineBasicBlock numbering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13567 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-14 06:54:57 +00:00
Chris Lattner
266538350a Add support for the printImplicitDefsBefore flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12893 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-13 17:18:39 +00:00
John Criswell
4ffff9e2fa Added the llvm.readport and llvm.writeport intrinsics for x86. These do
I/O port instructions on x86.  The specific code sequence is tailored to
the parameters and return value of the intrinsic call.
Added the ability for implicit defintions to be printed in the Instruction
Printer.
Added the ability for RawFrm instruction to print implict uses and
defintions with correct comma output.  This required adjustment to some
methods so that a leading comma would or would not be printed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-08 20:31:47 +00:00
Chris Lattner
30b2f72e7c Add support for FP cmoves
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12575 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 22:02:21 +00:00
Misha Brukman
db760d00c3 Fix compilation on Sparc: assert(0) => abort()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12289 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-11 19:08:24 +00:00
Alkis Evlogimenos
519f4e76b7 Check if printing of implicit uses is required for all types of shift
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12258 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-09 06:10:15 +00:00
Alkis Evlogimenos
0309066f6c Use newly added API to emit bytes for instructions that gas misassembles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12253 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-09 03:35:34 +00:00
Misha Brukman
538607fe45 Doxygenify some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12064 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 23:53:11 +00:00
Alkis Evlogimenos
8295f202d9 A big X86 instruction rename. The instructions are renamed to make
their names more decriptive. A name consists of the base name, a
default operand size followed by a character per operand with an
optional special size. For example:

ADD8rr -> add, 8-bit register, 8-bit register

IMUL16rmi -> imul, 16-bit register, 16-bit memory, 16-bit immediate

IMUL16rmi8 -> imul, 16-bit register, 16-bit memory, 8-bit immediate

MOVSX32rm16 -> movsx, 32-bit register, 16-bit memory


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11995 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 08:50:03 +00:00
Alkis Evlogimenos
8e475b8cfd Floating point loads/stores act on memory operands. Rename them to
denote this fact.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11971 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 23:42:35 +00:00
Alkis Evlogimenos
5ab29b504d Each instruction now has both an ImmType and a MemType. This describes
the size of the immediate and the memory operand on instructions that
use them. This resolves problems with instructions that take both a
memory and an immediate operand but their sizes differ (i.e. ADDmi32b).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11967 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 22:02:05 +00:00
Alkis Evlogimenos
169584ed45 Rename MRMS[0-7]{r,m} to MRM[0-7]{r,m}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11921 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-27 18:55:12 +00:00
Chris Lattner
f7b42259e9 Work around a gas bug. Print '-9223372036854775808' as unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11729 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 03:27:05 +00:00
Chris Lattner
5b67252620 Expand the repertoire of the forms we can print and encode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11537 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 07:40:44 +00:00
Chris Lattner
6e173a0d9c Rename MOVi[mr] instructions to MOV[rm]i
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11527 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 06:16:44 +00:00
Chris Lattner
55b5481255 Rename the IMULri* instructions to IMULrri, as they are actually three address
instructions.  Add forms of these instructions that read from memory


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11518 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 04:26:43 +00:00
Alkis Evlogimenos
859a18b583 Make dense maps keyed on physical registers smallerusing
MRegisterInfo::getNumRegs() instead of
MRegisterInfo::FirstVirtualRegister.

Also use MRegisterInfo::is{Physical,Virtual}Register where
appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11477 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 21:37:17 +00:00
Chris Lattner
300d0eda6f finegrainify namespacification, fix 80col prob
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11445 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 06:00:36 +00:00
Alkis Evlogimenos
c0b9dc5be7 Change MachineBasicBlock's vector of MachineInstr pointers into an
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11340 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 02:27:10 +00:00
Chris Lattner
b009c0088c s/getOpCode/getOpcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11332 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 19:26:28 +00:00
Alkis Evlogimenos
14be64018f Modify the two address instruction pass to remove the duplicate
operand of the instruction and thus simplify the register allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11124 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 22:17:40 +00:00
Alkis Evlogimenos
f0339396c1 IMULri* instructions do not require their first two registers operands
to be the same (IOW they are not two address instructions).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11117 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-04 17:21:04 +00:00
Chris Lattner
aa06d0439e Eliminate the isStringCompatible function, using ConstantArray::isString.
It's not clear why the code was looking for signed chars < 0, but it can't
matter to the assembler anyway, so the check goes away.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10853 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 17:14:42 +00:00
Alkis Evlogimenos
4d7af65903 Change interface of MachineOperand as follows:
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
    b) add isUse(), isDef()
    c) rename opHiBits32() to isHiBits32(),
              opLoBits32() to isLoBits32(),
              opHiBits64() to isHiBits64(),
              opLoBits64() to isLoBits64().

This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 13:24:17 +00:00
Chris Lattner
f2d2925452 generalize the instruction types permitted a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10274 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-01 05:13:56 +00:00
Brian Gaeke
f9c86cf5cf Support constant casting constant pointers to ints/uints, and/or
the other way around, instead of failing a large, tumor-like assertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10171 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-22 07:18:25 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Chris Lattner
9053356dd1 Fix problems in previous changes. This fixes several regressions last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9694 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 16:04:32 +00:00
Chris Lattner
ac662d1e02 Significantly simplify constant emission by unifying the stuff which used to build up
strings with the stuff that used to print to an ostream directly.  We now NEVER build
up big strings, only to print them once they are formed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9686 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 20:19:49 +00:00
Chris Lattner
3e119c68fe Incorporate printSingleConstantValue into its single caller
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9684 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 19:44:05 +00:00
Chris Lattner
603c56213d * Reformat some code
* Emit bools as 1/0 instead of true/false, fixing compilation of eon and
  PR 83 & Jello/2003-11-03-GlobalBool.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9683 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 19:33:45 +00:00
John Criswell
b576c94c15 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:21 +00:00
Misha Brukman
44ffd5adac The Grammar Police was here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9280 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 04:03:10 +00:00
Chris Lattner
c01d1232fe * Rename X86::IMULr16 -> X86::IMULrr16
* Implement R1 = R2 * C where R1 and R2 are 32 or 16 bits. This avoids an
  extra copy into a register, reducing register pressure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9278 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 03:42:58 +00:00
Chris Lattner
b169841166 .string adds an implicit zero at the end. This is not what we wanted.
This fixes PR#44.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9252 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-19 02:51:01 +00:00
Chris Lattner
72ac148d49 Add support for 'weak' linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9171 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 18:29:00 +00:00
Brian Gaeke
2c9b913fc0 Add # of printed instructions statistic to both the SPARC and X86 LLC backends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8892 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-06 15:41:21 +00:00
Chris Lattner
b3aad5d28f Only emit inter-field-padding if the amount of padding is != 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8452 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 19:52:24 +00:00
Chris Lattner
ad20071559 * Simplify printConstantValueOnly by moving the tail padding stuff directly
into the struct case.
* Extend printConstantValueOnly to print .zero's if the initializer is zero
* Delete dead isConstantFunctionPointerRef function
* Emit the appropriate assembly for the various linkage types!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8417 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-09 16:23:36 +00:00
Brian Gaeke
9d99b43fbc Factory methods for FunctionPasses now return type FunctionPass *.
Revert (to v1.55) one of the hunks of Chris's change that messed up the
 %-register workaround.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7815 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:15:15 +00:00
Chris Lattner
d59414fc85 Sort #includes, eliminate #include of "llvm/Type.h" which was redundant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7746 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 20:06:16 +00:00
Chris Lattner
67488a9236 Cygwin apparently works with %'s on registers!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7745 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 20:04:57 +00:00
Chris Lattner
93c1afacd1 Add a new -enable-cygwin-compatible-output argument, which make the output more
consumably by the cygwin assembler.  This is really just a nasty hack until we
get real target triple support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7742 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:35:26 +00:00
Brian Gaeke
2a09877519 Print % signs before register names; turn off "noprefix" mode in gas output.
Fixes test case test/Programs/LLVMSource/2003-08-03-ReservedWordGlobal.ll.

Also: Refactor implicit-uses printing into its own method.
Remove a couple of unused variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7737 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 19:05:46 +00:00
Chris Lattner
72feb15563 Simplify some constant expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7556 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 01:04:59 +00:00
Chris Lattner
d587a84197 Remove illegal, unsupported escapes. This fixes program: Ptrdist-bc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7552 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 23:42:17 +00:00