1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

102 Commits

Author SHA1 Message Date
Dale Johannesen
e6977495aa Handle quoted names when constructing $stub's,
$non_lazy_ptr's and $lazy_ptr's.

llvm-svn: 51277
2008-05-19 21:38:18 +00:00
Evan Cheng
f8b1257d2e Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to 16-byte boundaries.
llvm-svn: 47703
2008-02-28 00:43:03 +00:00
Bill Wendling
50f5c4be14 Change "Name" to "AsmName" in the target register info. Gee, a refactoring tool
would have been a Godsend here!

llvm-svn: 47625
2008-02-26 21:11:01 +00:00
Chris Lattner
d55c26a77d Handle \n's in value names for more targets. The asm printers
really really really need refactoring :(

llvm-svn: 47171
2008-02-15 19:04:54 +00:00
Dale Johannesen
4621e574c9 __DATA not __DATA__ is the right segment name on darwin.
Spotted by Nick Kledzik.

llvm-svn: 47037
2008-02-12 23:35:09 +00:00
Dan Gohman
cabaec582f Rename MRegisterInfo to TargetRegisterInfo.
llvm-svn: 46930
2008-02-10 18:45:23 +00:00
Evan Cheng
f61d1115af Get rid of the annoying blank lines before labels.
llvm-svn: 46667
2008-02-02 08:39:46 +00:00
Bill Wendling
5b6f587a80 If the function has no machine instructions, then emit a "nop" so that
the function label isn't associated with something it shouldn't be.

llvm-svn: 46449
2008-01-28 09:15:03 +00:00
Dale Johannesen
a54401ee30 Honor explicit section information on Darwin.
llvm-svn: 46267
2008-01-23 00:58:14 +00:00
Dale Johannesen
0e1328e880 Revert the part of 45849 that treated weak globals
as weak globals rather than commons.  While not wrong,
this change tickled a latent bug in Darwin's strip,
so revert it for now as a workaround.

llvm-svn: 46147
2008-01-17 23:36:04 +00:00
Dale Johannesen
83852e3451 Weak zeroes don't go in bss on Darwin.
llvm-svn: 45849
2008-01-11 01:59:45 +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
12477d46b4 Use MachineOperand::getImm instead of MachineOperand::getImmedValue. Likewise setImmedValue -> setImm
llvm-svn: 45453
2007-12-30 20:49:49 +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
7d8deec92f Much improved pic jumptable codegen:
Then:
        call    "L1$pb"
"L1$pb":
        popl    %eax
		...
LBB1_1: # entry
        imull   $4, %ecx, %ecx
        leal    LJTI1_0-"L1$pb"(%eax), %edx
        addl    LJTI1_0-"L1$pb"(%ecx,%eax), %edx
        jmpl    *%edx

        .align  2
        .set L1_0_set_3,LBB1_3-LJTI1_0
        .set L1_0_set_2,LBB1_2-LJTI1_0
        .set L1_0_set_5,LBB1_5-LJTI1_0
        .set L1_0_set_4,LBB1_4-LJTI1_0
LJTI1_0:
        .long    L1_0_set_3
        .long    L1_0_set_2

Now:
        call    "L1$pb"
"L1$pb":
        popl    %eax
		...
LBB1_1: # entry
        addl    LJTI1_0-"L1$pb"(%eax,%ecx,4), %eax
        jmpl    *%eax

		.align  2
		.set L1_0_set_3,LBB1_3-"L1$pb"
		.set L1_0_set_2,LBB1_2-"L1$pb"
		.set L1_0_set_5,LBB1_5-"L1$pb"
		.set L1_0_set_4,LBB1_4-"L1$pb"
LJTI1_0:
        .long    L1_0_set_3
        .long    L1_0_set_2

llvm-svn: 43924
2007-11-09 01:32:10 +00:00
Lauro Ramos Venancio
f5081ba980 [ARM] Fix code generation for:
static __thread struct {
    int a;
    int b;
} teste = {0, 0};

llvm-svn: 43722
2007-11-05 18:33:37 +00:00
Duncan Sands
d1bdbd010b Eliminate the remaining uses of getTypeSize. This
should only effect x86 when using long double.  Now
12/16 bytes are output for long double globals (the
exact amount depends on the alignment).  This brings
globals in line with the rest of LLVM: the space
reserved for an object is now always the ABI size.
One tricky point is that only 10 bytes should be
output for long double if it is a field in a packed
struct, which is the reason for the additional
argument to EmitGlobalConstant.

llvm-svn: 43688
2007-11-05 00:04:43 +00:00
Evan Cheng
33df6a6bed Revert 42908 for now.
llvm-svn: 42960
2007-10-14 05:57:21 +00:00
Dan Gohman
a75e4a62e6 Change the names used for internal labels to use the current
function symbol name instead of a codegen-assigned function
number.

Thanks Evan! :-)

llvm-svn: 42908
2007-10-12 14:53:36 +00:00
Dan Gohman
30ba45b569 Use empty() member functions when that's what's being tested for instead
of comparing begin() and end().

llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Gordon Henriksen
9b5a117d01 AsmPrinters overriding getAnalysisUsage should call super.
And not super's super, either.

llvm-svn: 42482
2007-09-30 13:39:29 +00:00
Evan Cheng
d675ed5400 Honor user-defined section specification of a global, ignores whether its initializer is null.
llvm-svn: 42182
2007-09-21 00:41:19 +00:00
Dan Gohman
0fc4e0cf47 Don't ignore the return value of AsmPrinter::doInitialization and
AsmPrinter::doFinalization.

llvm-svn: 40487
2007-07-25 19:33:14 +00:00
Evan Cheng
721b83bbe6 Print the s bit if the instruction is toggled to its CPSR setting form.
llvm-svn: 37932
2007-07-06 01:01:34 +00:00
Dale Johannesen
e1c767df50 Quote complex names for Darwin X86 and ARM.
llvm-svn: 37700
2007-06-22 00:54:56 +00:00
Evan Cheng
886c1f49ca Print predicate of the second instruction of the two-piece constant MI.
llvm-svn: 37437
2007-06-05 18:55:18 +00:00
Evan Cheng
820e352652 PIC label asm printing cosmetic changes.
llvm-svn: 37434
2007-06-05 07:36:38 +00:00
Chris Lattner
72e07238ba Fix the asmprinter so that a globalvalue can specify an explicit alignment
smaller than the preferred alignment, but so that the target can actually
specify a minimum alignment if needed.  This fixes some objc protocol
failures Devang tracked down.

llvm-svn: 37373
2007-05-31 18:57:45 +00:00
Evan Cheng
9f0ffdf4b3 Add PredicateOperand to all ARM instructions that have the condition field.
llvm-svn: 37066
2007-05-15 01:29:07 +00:00
Evan Cheng
73abcaa525 Switch BCC, MOVCCr, etc. to PredicateOperand.
llvm-svn: 36948
2007-05-08 21:08:43 +00:00
Evan Cheng
8e5e87a16b Should never see an indexed load / store with zero offset.
llvm-svn: 36714
2007-05-03 23:30:36 +00:00
Lauro Ramos Venancio
1d84c031a0 Debug support for arm-linux.
Patch by Raul Herbster.

llvm-svn: 36690
2007-05-03 20:28:35 +00:00
Chris Lattner
5d81bf937b add support for printing offset from global
llvm-svn: 36669
2007-05-03 16:42:23 +00:00
Lauro Ramos Venancio
727156d5f0 Enable protected visibility on ARM.
llvm-svn: 36583
2007-04-30 00:23:51 +00:00
Lauro Ramos Venancio
f385b56870 ARM TLS: implement "general dynamic", "initial exec" and "local exec" models.
llvm-svn: 36506
2007-04-27 13:54:47 +00:00
Lauro Ramos Venancio
d922b8ca9b remember to emit weak reference in one more case.
llvm-svn: 36438
2007-04-25 14:50:40 +00:00
Dale Johannesen
f7d3443fa7 add Align field, and use when generating function alignment
llvm-svn: 36371
2007-04-23 20:07:25 +00:00
Lauro Ramos Venancio
f8b49e5ee0 Implement PIC for arm-linux.
llvm-svn: 36324
2007-04-22 00:04:12 +00:00
Evan Cheng
44488cb676 Implement inline asm modifier P.
llvm-svn: 35640
2007-04-04 00:13:29 +00:00
Evan Cheng
bde0409264 Add support for hidden visibility to darwin/arm.
llvm-svn: 35448
2007-03-29 07:49:34 +00:00
Evan Cheng
4fec9d7228 Make two piece constant generation as a single instruction. It's re-materialized as a load from constantpool.
llvm-svn: 35207
2007-03-20 08:11:30 +00:00
Evan Cheng
7ef8db2fb5 Implement inline asm modifier c.
llvm-svn: 35035
2007-03-08 22:42:46 +00:00
Evan Cheng
7d528d089c Putting more constants which do not contain relocations into .literal{4|8|16}
llvm-svn: 35026
2007-03-08 08:31:54 +00:00
Evan Cheng
c79408b032 For Darwin, put constant data into .const, .const_data, .literal{4|8|16}
sections.

llvm-svn: 35017
2007-03-08 01:25:25 +00:00
Bill Wendling
2aabf75e82 Get rid of verboten <iostream> include.
llvm-svn: 34777
2007-03-01 06:05:39 +00:00
Lauro Ramos Venancio
5781691b22 Fix .thumb_func directive on linux.
llvm-svn: 33759
2007-02-01 18:25:34 +00:00
Evan Cheng
54a1324bae Don't emit unnecessary .align directive.
llvm-svn: 33729
2007-01-31 23:39:39 +00:00
Evan Cheng
0f07707270 - Fix codegen for pc relative constant (e.g. JT) in thumb mode:
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
        add r1, pc, #PCRELV0
This is not legal since add r1, pc, #c requires the constant be a multiple of 4.
Do the following instead:
        .set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
        mov r1, #PCRELV0
        add r1, pc

- In thumb mode, it's not possible to use .set generate a pc relative stub
  address. The stub is ARM code which is in a different section from the thumb
  code. Load the value from a constpool instead.
- Some asm printing clean up.

llvm-svn: 33664
2007-01-30 20:37:08 +00:00
Reid Spencer
19af04a142 For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.

llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Evan Cheng
3f02e5b1e7 Darwin -static should codegen static ctors / dtors to .constructor / .destructor sections.
llvm-svn: 33657
2007-01-30 08:04:53 +00:00