|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| | llvm-svn: 22469 | 
| | 
| 
| 
| 
| 
| 
| | expand the code to work for all integer datatypes.  This should unbreak
alpha.
llvm-svn: 22464 | 
| | 
| 
| 
| 
| 
| | This allows is to not emit empty sections when .data or .bss is not used.
llvm-svn: 22457 | 
| | 
| 
| 
| | llvm-svn: 22455 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | vector that represents the .o file at once, build up a vector for each
section of the .o file.  This is needed because the .o file writer needs
to be able to switch between sections as it emits them (e.g. switch
between the .text section and the .rel section when emitting code).
This patch has no functionality change.
llvm-svn: 22453 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | the target natively supports.  This eliminates some special-case code from
the x86 backend and generates better code as well.
For an i8 to f64 conversion, before & after:
_x87 before:
        subl $2, %esp
        movb 6(%esp), %al
        movsbw %al, %ax
        movw %ax, (%esp)
        filds (%esp)
        addl $2, %esp
        ret
_x87 after:
        subl $2, %esp
        movsbw 6(%esp), %ax
        movw %ax, (%esp)
        filds (%esp)
        addl $2, %esp
        ret
_sse before:
        subl $12, %esp
        movb 16(%esp), %al
        movsbl %al, %eax
        cvtsi2sd %eax, %xmm0
        addl $12, %esp
        ret
_sse after:
        subl $12, %esp
        movsbl 16(%esp), %eax
        cvtsi2sd %eax, %xmm0
        addl $12, %esp
        ret
llvm-svn: 22452 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | SelectionDAGLegalize::ExpandLegalUINT_TO_FP method.
Add a new method, PromoteLegalUINT_TO_FP, which allows targets to request
that UINT_TO_FP operations be promoted to a larger input type.  This is
useful for targets that have some UINT_TO_FP or SINT_TO_FP operations but
not all of them (like X86).
The same should be done with SINT_TO_FP, but this patch does not do that
yet.
llvm-svn: 22447 | 
| | 
| 
| 
| | llvm-svn: 22446 | 
| | 
| 
| 
| 
| 
| | gv and Graphviz.
llvm-svn: 22434 | 
| | 
| 
| 
| | llvm-svn: 22432 | 
| | 
| 
| 
| | llvm-svn: 22429 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | It is not safe to call LegalizeOp on something that has already been legalized.
Instead, just force another iteration of legalization.
This could affect all platforms but X86, as this codepath is dynamically
dead on X86 (ISD::MEMSET and friends are legal).
llvm-svn: 22419 | 
| | 
| 
| 
| | llvm-svn: 22417 | 
| | 
| 
| 
| | llvm-svn: 22400 | 
| | 
| 
| 
| | llvm-svn: 22393 | 
| | 
| 
| 
| | llvm-svn: 22382 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | allows objdump to know which function we are emitting to:
00000000 <foo>:     <----
   0:   b8 01 00 00 00          mov    $0x1,%eax
   5:   03 44 24 04             add    0x4(%esp,1),%eax
   9:   c3                      ret
... and allows .o files to be useful for linking :)
llvm-svn: 22378 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Add a *VERY INITIAL* machine code emitter class.  This is enough to take
this C function:
int foo(int X) { return X +1; }
and make objdump produce the following:
$ objdump -d t-llvm.o
t-llvm.o:     file format elf32-i386
Disassembly of section .text:
00000000 <.text>:
   0:   b8 01 00 00 00          mov    $0x1,%eax
   5:   03 44 24 04             add    0x4(%esp,1),%eax
   9:   c3                      ret
Anything using branches or refering to the constant pool or requiring
relocations will not work yet.
llvm-svn: 22375 | 
| | 
| 
| 
| 
| 
| | characters from them.
llvm-svn: 22371 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | This is the last MVTSDNode.
This allows us to eliminate a bunch of special case code for handling
MVTSDNodes.
llvm-svn: 22367 | 
| | 
| 
| 
| | llvm-svn: 22366 | 
| | 
| 
| 
| 
| 
| 
| 
| | MVTSDNode class.  This class is used to provide an operand to operators
that require an extra type.  We start by converting FP_ROUND_INREG and
SIGN_EXTEND_INREG over to using it.
llvm-svn: 22364 | 
| | 
| 
| 
| 
| 
| | Add support for emitting external and .bss symbols.
llvm-svn: 22358 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | module to the ELF file.  Test it by adding support for emitting common
symbols.  This allows us to compile this:
%X = weak global int 0
%Y = weak global int 0
%Z = weak global int 0
to an elf file that 'readelf's this:
Symbol table '.symtab' contains 4 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00000004     4 OBJECT  GLOBAL DEFAULT  COM X
     2: 00000004     4 OBJECT  GLOBAL DEFAULT  COM Y
     3: 00000004     4 OBJECT  GLOBAL DEFAULT  COM Z
llvm-svn: 22343 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | 1. Pass Value*'s into lowering methods so that the proper pointers can be
   added to load/stores from the valist
2. Intrinsics that return void should only return a token chain, not a token
   chain/retval pair.
3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone.
llvm-svn: 22338 | 
| | 
| 
| 
| 
| 
| 
| | 1: Legalize operand in UINT_TO_FP expanision
2: SRA x, const i8 was not promoting the constant to shift amount type.
llvm-svn: 22337 | 
| | 
| 
| 
| 
| 
| | and legalizing the extload.  Strange.  Should fix most alpha regressions.
llvm-svn: 22329 | 
| | 
| 
| 
| | llvm-svn: 22320 | 
| | 
| 
| 
| | llvm-svn: 22319 | 
| | 
| 
| 
| | llvm-svn: 22315 | 
| | 
| 
| 
| 
| 
| | than just the pointer being loaded or stored
llvm-svn: 22311 | 
| | 
| 
| 
| 
| 
| | handling it in the 64 bit case.  The two code paths should probably be merged.
llvm-svn: 22302 | 
| | 
| 
| 
| 
| 
| 
| 
| | For now, the elf writer is only capable of emitting an empty elf file, with
a section table and a section table string table.  This will be enhanced
in the future :)
llvm-svn: 22291 | 
| | 
| 
| 
| 
| 
| | See last commit for LangRef, this implements it on all targets.
llvm-svn: 22273 | 
| | 
| 
| 
| | llvm-svn: 22254 | 
| | 
| 
| 
| 
| 
| 
| | integer types.  Add a couple checks to not perform these kinds of transform
on floating point values.
llvm-svn: 22228 | 
| | 
| 
| 
| | llvm-svn: 22053 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | long %bar(long %X) {
  %Y = mul long %X, 4294967297
  ret long %Y
}
to this:
l1_bar:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %EDX, %EAX
        add %EDX, DWORD PTR [%ESP + 8]
        ret
instead of:
l1_bar:
        mov %ECX, DWORD PTR [%ESP + 4]
        mov %EDX, 1
        mov %EAX, %ECX
        mul %EDX
        add %EDX, %ECX
        add %EDX, DWORD PTR [%ESP + 8]
        mov %EAX, %ECX
        ret
llvm-svn: 22044 | 
| | 
| 
| 
| 
| 
| 
| | terminator instructions before the 'ret' in case the target has a
multi-instruction return sequence.
llvm-svn: 22041 | 
| | 
| 
| 
| | llvm-svn: 22026 | 
| | 
| 
| 
| | llvm-svn: 22020 | 
| | 
| 
| 
| 
| 
| | codepath
llvm-svn: 22019 | 
| | 
| 
| 
| | llvm-svn: 22018 | 
| | 
| 
| 
| | llvm-svn: 22016 | 
| | 
| 
| 
| | llvm-svn: 22015 | 
| | 
| 
| 
| 
| 
| | special case hacks.
llvm-svn: 22014 | 
| | 
| 
| 
| | llvm-svn: 22011 | 
| | 
| 
| 
| | llvm-svn: 22010 | 
| | 
| 
| 
| | llvm-svn: 22009 | 
| | 
| 
| 
| | llvm-svn: 22004 |