Commit Graph

6860 Commits

Author SHA1 Message Date
Misha Brukman d49975cf29 No need for a second immediate field if the class already inherits one.
llvm-svn: 7182
2003-07-15 21:27:14 +00:00
Misha Brukman 4cf012d845 Encode predict = 1 by default, because the Sparc assembler does this.
llvm-svn: 7181
2003-07-15 21:26:49 +00:00
Misha Brukman c7efa119ac Fixed a bug: outputting name of variable instead of its value.
Also, placed DEBUG() guards around debug information so that the generated file
is much smaller and hence should be faster to preprocess/compile.

llvm-svn: 7180
2003-07-15 21:26:09 +00:00
Misha Brukman 1912eaf0a0 This optimization greatly enhances efficiency of creating new instructions by
masking and shifting operands directly into their place in the instruction,
instead of the old-fashioned way of ORing in each bit separately.

llvm-svn: 7179
2003-07-15 21:00:32 +00:00
Misha Brukman 384cb5dd10 Correctly handle calls to functions which are further away than 2**32 bits will
allow, i.e. make a sequence of instructions to enable an indirect call using
jump-and-link and 2 temporary registers (which we save and ultimately restore).

Warning: if the delay slot of a function call is used to do meaningful work and
not just a NOP, this behavior is incorrect. However, the Sparc backend does not
yet utilize the delay slots effectively, so it is not necessary to make an
overly complicated algorithm for something that's not used.

llvm-svn: 7178
2003-07-15 19:09:43 +00:00
Misha Brukman 528a37621b Clean up my last checkin: code is easier to read and explains the differences in
usage of the special file handle RTLD_SELF on Sparc/Solaris vs. 0 on Linux/x86.

llvm-svn: 7177
2003-07-15 15:58:26 +00:00
Misha Brukman 7225461edf On Sparc/Solaris, the special handle RTLD_SELF is used as a handle referring to
the program's executing image, not 0 as it is on Linux/x86 and possibly other
systems.

llvm-svn: 7176
2003-07-15 15:55:32 +00:00
Misha Brukman b402819ddf * Added support for the %ccr register
* FP double registers are now coded correctly
* Removed function which converted registers based on register types, it was
  broken (because regTypes are broken)

llvm-svn: 7175
2003-07-14 23:26:03 +00:00
Misha Brukman 7b14a19965 The word `separate' only has one `e'.
llvm-svn: 7174
2003-07-14 17:26:34 +00:00
Misha Brukman 7fdaab4f68 The word `separate' only has one `e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
Misha Brukman c8ccfe90af Fixed: </pre</p> => </pre></p>
llvm-svn: 7172
2003-07-14 17:05:20 +00:00
John Criswell ae648fa032 Merged in changes from PRE101 in the prerelease branch.
Specifically, this updates libtool to version 1.5 and adds the following:
	- Added the -only-static option that we added in our previous libtool.
	- Modified the autoconf macros so that libtool uses the -G option when
	  linking on Solaris.  This allows libraries with global variables with
	  constructors to automatically run those constructors when the
	  library is dlopened().

llvm-svn: 7171
2003-07-14 16:52:07 +00:00
Vikram S. Adve 6fa4b79587 Use uint32_t for table index and size: table will never be > 4GB.
Also, make Pointer type depend on architecture.

llvm-svn: 7170
2003-07-11 22:02:28 +00:00
Vikram S. Adve ac83df769b Trace loads and stores as they happen (stores were being
remembered in valuesStoredInFunction, but never traced at function return,
and that's too late to be finding the error anyway).
Stores trace both the value and the address being stored to,
but after some experience I think only values should be traced.
The pointer hash table just fills up far too quickly if every
store address were traced.

llvm-svn: 7169
2003-07-11 21:57:43 +00:00
Brian Gaeke b99d684839 If we have a constant pointer reference to a function, we were printing
out the entire llvm disassembly for the function at global constant-output
time, which caused the assembler to barf in 164.gzip. This fixes that
particular problem (though 164.gzip has other problems with X86 llc.)

llvm-svn: 7168
2003-07-11 21:57:01 +00:00
Brian Gaeke 5b04987a4c Fix some serious floating-point bugs (fixes test cases such as Oscar,
Fhourstones, McCat-vor, and many others...)

Printer.cpp: Print implicit uses for AddRegFrm instructions.  Break gas
bug workarounds up into separate stanzas of code for each bug.  Add new
workarounds for fild and fistp.

X86InstrInfo.def: Add O_ST0 implicit uses for more FP instrs where they
obviously apply. Also add PrintImplUses flags for FP instrs where they
are necessary for gas to understand the output.

llvm-svn: 7165
2003-07-11 18:18:35 +00:00
Anand Shukla b3d794a2c9 Added functionality to instrmentation pass
llvm-svn: 7161
2003-07-10 21:55:57 +00:00
Misha Brukman 5258e59908 Fixed grammatical error.
llvm-svn: 7160
2003-07-10 21:38:28 +00:00
Vikram S. Adve 4f420ce3a3 Several important bug fixes:
(1) Cannot use ANDN(ot), ORN, and XORN for boolean ops, only bitwise ops.

(2) Conditional move instructions must distinguish signed and unsigned
    condition codes, e.g., MOVLE vs. MOVLEU.

(3) Conditional-move-on-register was using the cond-move-on-cc opcodes,
    which produces a valid-looking instruction with bogus registers!

(4) Here's a really cute one: dividing-by-2^k for negative numbers needs to
    add 2^k-1 before shifting, not add 1 after shifting.  Sadly, these
    are the same when k=0 so our poor test case worked fine.

(5) Casting between signed and unsigned values was not correct:
    completely reimplemented.

(6) Zero-extension on unsigned values was bogus: I was only doing the
    SRL and not the SLLX before it.  Don't know WHAT I was thinking!

(7) And the most important class of changes: Sign-extensions on signed values.
    Signed values are not sign-extended after ordinary operations,
    so they must be sign-extended before the following cases:
	-- passing to an external or unknown function
	-- returning from a function
	-- using as operand 2 of DIV or REM
	-- using as either operand of condition-code setting operation
           (currently only SUBCC), with smaller than 32-bit operands


Also, a couple of improvements:

(1) Fold cast-to-bool into Not(bool).  Need to do this for And, Or, XOR also.

(2) Convert SetCC-Const into a conditional-move-on-register (case 41)
    if the constant is 0.  This was only being done for branch-on-SetCC-Const
    when the branch is folded with the SetCC-Const.

llvm-svn: 7159
2003-07-10 20:07:54 +00:00
Vikram S. Adve 8ea738a9ff Bug fix in creating constants: need 1U << 31, not 1 << 31.
llvm-svn: 7158
2003-07-10 19:48:19 +00:00
Vikram S. Adve 2f90c823a2 Fold cast-to-bool into not. Later, this should also be folded into other
boolean operations: AND, OR, XOR.

llvm-svn: 7157
2003-07-10 19:47:42 +00:00
Vikram S. Adve e2e50f2880 Values stored in CallArgsDescriptor cannot be const.
llvm-svn: 7156
2003-07-10 19:46:15 +00:00
Vikram S. Adve abf331db03 isMarkedForSpill() should be const.
llvm-svn: 7155
2003-07-10 19:45:28 +00:00
Vikram S. Adve 689adb19b0 Change interface to MachineInstr::substituteValue to specify more precisely
which args can be substituted: defsOnly, defsAndUses or usesOnly.

llvm-svn: 7154
2003-07-10 19:45:07 +00:00
Vikram S. Adve 39587d6264 Print out all neighbors in interference graph, not just higher-numbered ones.
llvm-svn: 7153
2003-07-10 19:43:33 +00:00
Vikram S. Adve 5224b19deb Several fixes to handling of int CC register:
(1) An int CC live range must be spilled if there are any interferences,
    even if no other "neighbour" in the interf. graph has been allocated
    that reg. yet.  This is actually true of any class with only one reg!

(2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
    be spilled so that the machine-independent spill code doesn't have to
    make the machine-dependent decision of which CC name to use based on
    operand type: %xcc or %icc.  (These are two halves of the same
register.)

(3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
    These should never have been the same, and this is necessary now for #2.

(4) All RDCCR and WRCCR instructions are directly generated with the
    phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
    deal with this.

llvm-svn: 7152
2003-07-10 19:42:55 +00:00
Vikram S. Adve 6528067646 Several fixes to handling of int CC register:
(1) An int CC live range must be spilled if there are any interferences,
    even if no other "neighbour" in the interf. graph has been allocated
    that reg. yet.  This is actually true of any class with only one reg!

(2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
    be spilled so that the machine-independent spill code doesn't have to
    make the machine-dependent decision of which CC name to use based on
    operand type: %xcc or %icc.  (These are two halves of the same register.)

(3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
    These should never have been the same, and this is necessary now for #2.

(4) All RDCCR and WRCCR instructions are directly generated with the
    phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
    deal with this.

llvm-svn: 7151
2003-07-10 19:42:11 +00:00
Vikram S. Adve fc329cd57b *** empty log message ***
llvm-svn: 7150
2003-07-10 19:32:38 +00:00
Vikram S. Adve f8c303d344 Just documentation.
llvm-svn: 7149
2003-07-10 19:31:26 +00:00
Vikram S. Adve 5fc4aee04e Add phony target "bytecode" to ensure that it works in recursive makes.
llvm-svn: 7147
2003-07-10 19:25:29 +00:00
Misha Brukman c18333ac0a Lowercase versions of `occurrence' need to be spelled correctly, too.
llvm-svn: 7142
2003-07-10 17:05:26 +00:00
Misha Brukman fd3e0afe65 Move the space separator to where it really belongs: in the print statement, not
in a variable assignment.

llvm-svn: 7141
2003-07-10 16:52:41 +00:00
Misha Brukman 069e6b5be0 `Occurrence' has no `a' and the `r' is doubled.
llvm-svn: 7140
2003-07-10 16:49:51 +00:00
Misha Brukman ecfc0d2d3c Converted tabs to spaces.
llvm-svn: 7139
2003-07-10 16:35:17 +00:00
Misha Brukman 1194d54975 Some beautification changes (tabs to spaces, removed extra blank lines);
no functionality changed.

llvm-svn: 7138
2003-07-09 17:33:50 +00:00
Vikram S. Adve fa6ede03b1 Simplified DOTRACING flag.
llvm-svn: 7135
2003-07-08 23:40:48 +00:00
John Criswell 71139f24d0 Corrected the Table of Contents.
Corrected capitalization of subheadings.
Created a new subsection for compiling the C front end and moved all references
to it there.
Updated the disk space requirements to reflect the need for the binary C front
end and the optional C front end source.
Added information on unpacking the distribution to the summary section.
Moved autoconf environment variables to the autoconf section.
Changed make to gmake.
Removed some of the precise directions for unpacking the archives.
Fixed some formatting inconsistencies (headings that were not centered).

llvm-svn: 7132
2003-07-08 20:35:59 +00:00
Vikram S. Adve 3b7c2a4db7 Pointer hash table reallocation code seems never to have been tested!
Unfortunately, reallocation also means that the pointer numbering will
change, so increase table size to try to avoid it.

llvm-svn: 7130
2003-07-08 18:42:44 +00:00
Vikram S. Adve b09caca804 Native libraries (libinstr*.a) should not have been taken out when
taking out the rule for compiling the test driver.
We need the native libraries for libinstr because they are directly
linked into the native CBE or LLC code.  That is the only practical
way to debug them!

llvm-svn: 7129
2003-07-08 18:40:58 +00:00
Vikram S. Adve eb44eb1e08 Use libinstr.$(ARCH).a instead of libinstr64.a
Also, $(RM) needs -f flag.

llvm-svn: 7128
2003-07-08 18:39:51 +00:00
Vikram S. Adve 6c9dc89ba5 *** empty log message ***
llvm-svn: 7126
2003-07-08 15:39:02 +00:00
John Criswell b99b317cba Removed size_t from the parameter list of the malloc() prototype in generated C
code.  This prevents a compiler warning on Sparc that causes the tests to fail.

llvm-svn: 7125
2003-07-08 14:52:09 +00:00
Misha Brukman 222639708e Stop using the `Offset' variable, as we are cycling through the bits of a field
initializer and the loop index variable already carries the offset information
that we need.

llvm-svn: 7123
2003-07-07 22:30:44 +00:00
Misha Brukman f75934fe93 Fixed indentation.
llvm-svn: 7122
2003-07-07 22:28:42 +00:00
Misha Brukman 6d1871c28b Removed an extra slash that appears in the path name when these variables are
combined with a '/' separating them.

llvm-svn: 7121
2003-07-07 22:27:05 +00:00
Misha Brukman ea6e7a5d72 Elaborated assembly syntax of instructions in the comments.
llvm-svn: 7120
2003-07-07 22:18:42 +00:00
Misha Brukman 25a49f0cf1 Removed unnecessary assignment (it was taken care by a superclass) and clarified
some comments.

llvm-svn: 7119
2003-07-07 22:18:06 +00:00
Misha Brukman 6aa98680fb * Made $Template refer to a path relative to the checked-out tree
* Made error messages print out what directory failed chdir()
* Put quotes around search arguments to grep
* Use `egrep' instead of `grep -e' because they are equivalent but `grep' does
  not have the `-e' option on Sparc/Solaris
* Added `--enable-jit' to the ./configure command because both X86 and Sparc
  have JITs and we want them to be tested
* Fixed the regular expressions parsing the changes in CVS which were causing
  the script to die

llvm-svn: 7118
2003-07-07 21:27:40 +00:00
John Criswell ed9fc328cc Fixed the directions for building the C front end.
llvm-svn: 7117
2003-07-07 19:29:20 +00:00
John Criswell c2ca0c44c8 Added information about how to unpack the distribution for those who do not
have access to CVS.

llvm-svn: 7116
2003-07-07 19:27:35 +00:00