Chris Lattner
aea9dfc167
add a simple back() method to StringRef.
...
llvm-svn: 78544
2009-08-10 00:44:02 +00:00
Benjamin Kramer
6e046f4291
Use abs64 instead abs; some platforms don't have a 64-bit abs overload. Noticed by Yonggang Luo!
...
llvm-svn: 78543
2009-08-09 22:37:07 +00:00
Ryan Flynn
e64ffc277c
warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type
...
llvm-svn: 78542
2009-08-09 22:36:29 +00:00
Ryan Flynn
1f1fdc070e
map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return
...
llvm-svn: 78541
2009-08-09 20:07:29 +00:00
Evan Cheng
d461c1c559
Add support to convert 32-bit instructions to 16-bit non-two-address ones.
...
llvm-svn: 78540
2009-08-09 19:17:19 +00:00
Nuno Lopes
1586376f2e
fix build on linux
...
llvm-svn: 78538
2009-08-09 18:59:21 +00:00
Edward O'Callaghan
ccf48131d0
Refactor to remove un-named struct gnu extension usage. Now ISO C89 and C99 compliant. Comment trailing endifs
...
llvm-svn: 78537
2009-08-09 18:41:02 +00:00
Anders Carlsson
f48123b413
Improve handling of member pointers.
...
llvm-svn: 78536
2009-08-09 18:26:27 +00:00
Nate Begeman
a96114ed08
AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);
...
In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.
llvm-svn: 78535
2009-08-09 17:55:44 +00:00
Chris Lattner
f4c2eee251
always end a section with \n on elf.
...
llvm-svn: 78534
2009-08-09 15:31:10 +00:00
Daniel Dunbar
d9631912cf
llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.
...
llvm-svn: 78533
2009-08-09 08:23:23 +00:00
Daniel Dunbar
e0891c2109
llvm-mc/AsmParser: Add hack to ignore Int_* and *_Int instructions for now, to
...
make it easier to see interesting ambiguities.
- Also, check that user doesn't try to redefine the super class. This is a wart
in the current design, in that assembler match classes aren't explicitly
declared somewhere (so there isn't a unique place to declare the super
class). This should probably be fixed.
llvm-svn: 78532
2009-08-09 08:19:00 +00:00
Daniel Dunbar
5877782962
Disable this test for now, we don't check for super classes when matching yet.
...
llvm-svn: 78531
2009-08-09 07:35:56 +00:00
Daniel Dunbar
8e33cb2de1
llvm-mc/AsmParser: Implement user defined super classes.
...
- We can now discriminate SUB32ri8 from SUB32ri, for example.
llvm-svn: 78530
2009-08-09 07:20:21 +00:00
Bob Wilson
7fc63417d7
Add tests for Neon VZIP and VUZP instructions.
...
llvm-svn: 78529
2009-08-09 06:48:29 +00:00
Bob Wilson
f60c8807e8
Add a test for Neon VTRN instructions.
...
llvm-svn: 78528
2009-08-09 06:30:46 +00:00
Daniel Dunbar
f573b563e1
llvm-mc/AsmParser: Separate instruction ordering for ambiguity detection.
...
- We want the ordering operation to be simple, since we run it on every
match. The old ordering is also not a strict weak ordering when there are
ambiguities, which makes MSVC unhappy.
- While we are at it, detect all ambiguities instead of just the adjacent
ones. There are actually 655, for X86.
llvm-svn: 78526
2009-08-09 06:05:33 +00:00
Bob Wilson
45fa71a392
Change Neon table lookup (VTBL) and table extension (VTBX) intrinsics to
...
take the table vectors as separate arguments, instead of the previous
approach where they were combined into one big vector.
llvm-svn: 78525
2009-08-09 06:03:09 +00:00
Daniel Dunbar
447c4ab91d
Extend comment on ParserMatchClass .td field, and add some missing
...
classes for X86.
llvm-svn: 78524
2009-08-09 06:00:04 +00:00
Daniel Dunbar
c32aa060bd
llvm-mc/AsmParser: Define match classes in the .td file.
...
-2 FIXMEs.
llvm-svn: 78523
2009-08-09 05:18:30 +00:00
Daniel Dunbar
3239f020eb
llvm-mc/AsmParser: Sketch infrastructure for ordering instructions & detecting
...
ambiguities.
- Currently there are 483 ambiguities to resolve. :)
llvm-svn: 78522
2009-08-09 04:00:06 +00:00
Daniel Dunbar
22dd774d8f
STLExtras: Add less_ptr.
...
llvm-svn: 78521
2009-08-09 03:36:59 +00:00
Chris Lattner
b7ff9e84be
fix edito
...
llvm-svn: 78520
2009-08-08 23:43:55 +00:00
Benjamin Kramer
b57e5d2f4f
Older GCCs don't have vector::data().
...
llvm-svn: 78519
2009-08-08 23:43:26 +00:00
Daniel Dunbar
d8c822f180
llvm-mc/AsmMatcher: Tweak string matcher (missed a newline).
...
llvm-svn: 78518
2009-08-08 23:43:16 +00:00
Chris Lattner
591105c540
sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
...
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)
llvm-svn: 78517
2009-08-08 23:39:42 +00:00
Fariborz Jahanian
24f38969d5
ir-gen for initialization, in synthesize copy constructor,
...
of base/field which have trivial copy constructor.
llvm-svn: 78516
2009-08-08 23:32:22 +00:00
Anders Carlsson
b8be93fc92
Add support for global initializers.
...
llvm-svn: 78515
2009-08-08 23:24:23 +00:00
Anton Korobeynikov
cfed3005e5
Use subclassing to print lane-like immediates (w/o hash) eliminating
...
'no_hash' modifier. Hopefully this will make Daniel happy :)
llvm-svn: 78514
2009-08-08 23:10:41 +00:00
Daniel Dunbar
5478125143
llvm-mc/AsmMatcher: Tweak string matcher.
...
- Track whether we need to insert an explicit 'break'.
- Invert conditional when matching a single prefix to reduce
nesting/bracing/breaking.
- wc -l of X86GenAsmMatcher.inc decreased by 10%. :)
llvm-svn: 78513
2009-08-08 22:57:25 +00:00
Chris Lattner
c51023b0bc
remove nondeterminstic test.
...
llvm-svn: 78512
2009-08-08 22:56:37 +00:00
Chris Lattner
3219d85f16
add a note about dead zero extends.
...
llvm-svn: 78511
2009-08-08 22:46:59 +00:00
Chris Lattner
1cb9396f4f
1. Make MCSection an abstract class.
...
2. Move section switch printing to MCSection virtual method which takes a
TAI. This eliminates textual formatting stuff from TLOF.
3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and
TLOFELF::AtIsCommentChar.
llvm-svn: 78510
2009-08-08 22:41:53 +00:00
Chris Lattner
089b7de20d
switch this to create coff sections for now, it doesn't really matter for
...
llvm-mc's purpose yet and we'll want to switch to creating semantic sections
at some point.
llvm-svn: 78509
2009-08-08 22:38:48 +00:00
Eric Christopher
7dfa9f2e56
Add crc32 instruction and intrinsics. Add a new class of prefix
...
bytes for F2 0F 38 and propagate. Add a FIXME for a set
of possibilities which correspond to intrinsics already used.
New test.
llvm-svn: 78508
2009-08-08 21:55:08 +00:00
Anders Carlsson
f40886acca
Refactor some code and implement support for global destructors for static variables.
...
llvm-svn: 78507
2009-08-08 21:45:14 +00:00
Jakob Stoklund Olesen
e2dc8a46e9
Add support for READCYCLECOUNTER in Blackfin back-end.
...
llvm-svn: 78506
2009-08-08 21:42:22 +00:00
Chris Lattner
26cc5b78d0
add new PIC16Section class, this time hopefully not breaking the build :)
...
llvm-svn: 78505
2009-08-08 21:37:01 +00:00
Daniel Dunbar
66f4f54e8a
llvm-mc/AsmMatcher: Switch token matching to use the new string matcher.
...
Also, redefined MatchRegisterName to just return the register value or a
sentinel, to simplify the generated code.
llvm-svn: 78504
2009-08-08 21:22:41 +00:00
Daniel Dunbar
59410aaea6
Revert r78501, it doesn't build.
...
--- Reverse-merging r78501 into '.':
U lib/Target/PIC16/PIC16TargetObjectFile.cpp
D lib/Target/PIC16/PIC16Section.h
llvm-svn: 78503
2009-08-08 21:12:40 +00:00
Anders Carlsson
2c101b3cd1
Use CastExpr::CK_ArrayToPointerDecay and fix an assert.
...
llvm-svn: 78502
2009-08-08 21:04:35 +00:00
Chris Lattner
4a4e4487fc
make PIC16 create its own custom MCSection.
...
llvm-svn: 78501
2009-08-08 20:55:25 +00:00
Chris Lattner
245fdfb9c3
make target-specific TLOF impls (except PIC16) create target-specific
...
MCSection instances.
llvm-svn: 78500
2009-08-08 20:52:13 +00:00
Chris Lattner
5a9bc50fa8
stub out PECOFF/MachO/ELF MCSection classes
...
llvm-svn: 78499
2009-08-08 20:50:49 +00:00
Chris Lattner
c9ea8fddb2
eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.
...
A TAI hook is appropriate in this case because this is just an
asm syntax issue, not a semantic difference. TLOF should model
the semantics of the section.
llvm-svn: 78498
2009-08-08 20:43:12 +00:00
Jakob Stoklund Olesen
dc6bccbaa6
Don't build illegal ops in DAGCombiner::SimplifyBinOpWithSameOpcodeHands().
...
Blackfin supports and/or/xor on i32 but not on i16. Teach
DAGCombiner::SimplifyBinOpWithSameOpcodeHands to not produce illegal nodes
after legalize ops.
llvm-svn: 78497
2009-08-08 20:42:17 +00:00
Chris Lattner
36d04ec972
give pic16 a target-specific section creation name too
...
llvm-svn: 78496
2009-08-08 20:23:47 +00:00
Chris Lattner
ce7d14032b
now that getOrCreateSection is all object-file specific,
...
give the impls an object-file-specific name. In the future
they can take different arguments etc.
llvm-svn: 78495
2009-08-08 20:22:20 +00:00
Chris Lattner
302041d5c9
sink getOrCreateSection down into all the object file implementations,
...
now that they create *all* the sections.
llvm-svn: 78494
2009-08-08 20:14:13 +00:00
Eric Christopher
e7064fdc9d
Fix some cut and paste-os.
...
llvm-svn: 78493
2009-08-08 20:09:33 +00:00