Evan Cheng
c9e252df68
Change createAsmParser to take a MCSubtargetInfo instead of triple,
...
CPU, and feature string. Parsing some asm directives can change
subtarget state (e.g. .code 16) and it must be reflected in other
modules (e.g. MCCodeEmitter). That is, the MCSubtargetInfo instance
must be shared.
llvm-svn: 134795
2011-07-09 05:47:46 +00:00
Evan Cheng
c7842ef950
Fix comment.
...
llvm-svn: 134763
2011-07-08 22:49:42 +00:00
Evan Cheng
34f67f2dda
TargetAsmParser doesn't need reference to Target.
...
llvm-svn: 134721
2011-07-08 19:33:14 +00:00
Evan Cheng
50f2d8d304
Eliminate asm parser's dependency on TargetMachine:
...
- Each target asm parser now creates its own MCSubtatgetInfo (if needed).
- Changed AssemblerPredicate to take subtarget features which tablegen uses
to generate asm matcher subtarget feature queries. e.g.
"ModeThumb,FeatureThumb2" is translated to
"(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0".
llvm-svn: 134678
2011-07-08 01:53:10 +00:00
Akira Hatanaka
b4c145253b
This patch adds a flag in MCAsmInfo that indicates whether dwarf register
...
numbers should be printed instead of symbolic register names in
MCAsmStreamer::EmitRegisterName. This is necessary because some versions of
GNU assembler won't accept code in which symbolic register names are used in
cfi directives. There is no change in behavior unless the flag is explicitly
set to true by a backend.
llvm-svn: 134635
2011-07-07 20:30:33 +00:00
Evan Cheng
18acf2200c
Compute feature bits at time of MCSubtargetInfo initialization.
...
llvm-svn: 134606
2011-07-07 07:07:08 +00:00
Bill Wendling
ba39846c2b
Add a target hook to encode the compact unwind information.
...
llvm-svn: 134577
2011-07-07 00:54:13 +00:00
Bill Wendling
fd3f4e7040
Clean up the #includes.
...
llvm-svn: 134557
2011-07-06 22:52:32 +00:00
Evan Cheng
dcd3ea7062
createMCInstPrinter doesn't need TargetMachine anymore.
...
llvm-svn: 134525
2011-07-06 19:45:42 +00:00
Evan Cheng
09210c224a
Add getFeatureBits to extract feature bits for a given CPU.
...
llvm-svn: 134298
2011-07-02 00:43:44 +00:00
Evan Cheng
771cdf9b5d
- Added MCSubtargetInfo to capture subtarget features and scheduling
...
itineraries.
- Refactor TargetSubtarget to be based on MCSubtargetInfo.
- Change tablegen generated subtarget info to initialize MCSubtargetInfo
and hide more details from targets.
llvm-svn: 134257
2011-07-01 20:45:01 +00:00
Evan Cheng
a4b2c3d5ba
Eliminate one extra conversion.
...
llvm-svn: 134240
2011-07-01 16:59:30 +00:00
Francois Pichet
f143a222d0
Another misuse of StringRef. MSVC is very sensitive to that kind of error.
...
llvm-svn: 134236
2011-07-01 09:23:41 +00:00
Rafael Espindola
018ca8fea8
Fix use after free.
...
llvm-svn: 134234
2011-07-01 04:40:50 +00:00
Evan Cheng
1fa6460e3f
Switch SubtargetFeatures from std::string to StringRef.
...
llvm-svn: 134219
2011-07-01 00:23:10 +00:00
Bill Wendling
770794cc60
Remove tabs.
...
llvm-svn: 134212
2011-06-30 23:59:38 +00:00
Bill Wendling
995ebcfd4c
Improve comment: Show the register the DWARF label is added to.
...
llvm-svn: 134209
2011-06-30 23:47:40 +00:00
Bill Wendling
80c39ac9a5
Add one more comment to the FDE verbose asm output.
...
llvm-svn: 134200
2011-06-30 22:35:49 +00:00
Bill Wendling
834cb876e6
Add comments to the FDE.
...
llvm-svn: 134196
2011-06-30 22:02:20 +00:00
Bill Wendling
eace9970bd
Add more comments to the ASM output for the CIE's "moves".
...
llvm-svn: 134194
2011-06-30 21:45:12 +00:00
Bill Wendling
7a94c43c7a
Add comments to the ASM output to help understand the compact unwind and CIE tables.
...
llvm-svn: 134191
2011-06-30 21:25:51 +00:00
Evan Cheng
034261674b
Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name to
...
be the first encoded as the first feature. It then uses the CPU name to look up
features / scheduling itineray even though clients know full well the CPU name
being used to query these properties.
The fix is to just have the clients explictly pass the CPU name!
llvm-svn: 134127
2011-06-30 01:53:36 +00:00
Bill Wendling
3080b09d31
* Use the proper size to output the range size.
...
* Rough in the compact encoding part.
llvm-svn: 134119
2011-06-30 00:30:52 +00:00
Bill Wendling
5a7a3562e0
Stupid error: If the LSDA and Personality functions aren't there, emit 0 instead
...
of the encoding.
llvm-svn: 134117
2011-06-29 23:53:16 +00:00
Bill Wendling
d394aea75e
We don't want to use relocations inside the compact unwind section. Just use the
...
symbols instead.
llvm-svn: 134115
2011-06-29 23:49:12 +00:00
Jim Grosbach
88387d64d6
Asm parser range checking on .<size> <value> directives.
...
For example, ".byte 256" would previously assert() when emitting an object
file. Now it generates a diagnostic that the literal value is out of range.
rdar://9686950
llvm-svn: 134069
2011-06-29 16:05:14 +00:00
NAKAMURA Takumi
63570a1cf3
Fix CMake build.
...
llvm-svn: 134055
2011-06-29 03:26:17 +00:00
Evan Cheng
b4dc8bdd22
Sink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.
...
llvm-svn: 134049
2011-06-29 01:14:12 +00:00
Jim Grosbach
440526a1e8
Refactor MachO relocation generaration into the Target directories.
...
Move the target-specific RecordRelocation logic out of the generic MC
MachObjectWriter and into the target-specific object writers. This allows
nuking quite a bit of target knowledge from the supposedly target-independent
bits in lib/MC.
llvm-svn: 133844
2011-06-24 23:44:37 +00:00
Jim Grosbach
c3b24db27e
tidy up whitespace.
...
llvm-svn: 133815
2011-06-24 19:43:27 +00:00
Jim Grosbach
4ba3d51f23
Fixup info for Thumb2 unconditional branch.
...
rdar://9667872
llvm-svn: 133808
2011-06-24 18:48:32 +00:00
Jim Grosbach
e216f0411d
Tidy up.
...
llvm-svn: 133770
2011-06-23 22:29:00 +00:00
Jay Foad
75b709336d
Reinstate r133513 (reverted in r133700) with an additional fix for a
...
-Wshorten-64-to-32 warning in Instructions.h.
llvm-svn: 133708
2011-06-23 09:09:15 +00:00
Bill Wendling
4d12748388
Use a reference. Don't make a useless copy of the vector.
...
llvm-svn: 133707
2011-06-23 07:55:41 +00:00
Bill Wendling
e7fc1a8d9e
Formatting changes. No functionality change.
...
llvm-svn: 133706
2011-06-23 07:44:54 +00:00
Eric Christopher
d38d7f3300
Revert r133513:
...
"Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512)."
Due to some additional warnings.
llvm-svn: 133700
2011-06-23 06:24:52 +00:00
Bill Wendling
42866c8944
Use the presence of the __compact_unwind section to indicate that a target
...
supports compact unwind info instead of having a separate flag indicating this.
llvm-svn: 133685
2011-06-23 05:13:28 +00:00
Bill Wendling
538dc8cc6f
Some skeleton code to emit the compact unwind. If the information is unable to
...
be emitted in a compact way, we then default to emitting a CIE and FDE.
llvm-svn: 133676
2011-06-23 01:06:23 +00:00
Bill Wendling
c62a961c09
80-column violations.
...
llvm-svn: 133668
2011-06-23 00:09:43 +00:00
Bill Wendling
19f2f807eb
Move class methods out-of-line. This reduces the indentation, and is more in
...
line with LLVM's general coding style.
No functionality change.
llvm-svn: 133645
2011-06-22 21:07:27 +00:00
Bill Wendling
c04086de5c
Remove the subclassing. This will be moved to the ASM printer.
...
llvm-svn: 133473
2011-06-20 22:12:24 +00:00
Benjamin Kramer
1525b80eef
Directly print to a raw_ostream instead of printing to a buffer first.
...
llvm-svn: 133352
2011-06-18 14:42:47 +00:00
Hans Wennborg
6229bbd9c0
MC: Allow .common as alias for .comm assembler directive. PR10116.
...
llvm-svn: 133349
2011-06-18 13:51:54 +00:00
Bill Wendling
265a3f9032
* Override the "EmitBytes" function, since it can sneak values in that way.
...
* Make this used only if CFI is used.
llvm-svn: 133319
2011-06-18 00:19:35 +00:00
Bill Wendling
83d5b74f00
Remove false assertion.
...
llvm-svn: 133314
2011-06-17 23:42:01 +00:00
Bill Wendling
918a35a41b
Disable for another investigation.
...
llvm-svn: 133299
2011-06-17 21:44:15 +00:00
Bill Wendling
be4fd10d84
Support only DwarfCFI or SjLj exception handling in LSDA decoder.
...
llvm-svn: 133297
2011-06-17 21:31:43 +00:00
Bill Wendling
530eece33e
SjLj exception handling LSDA decoding support wasn't represented correctly. Use
...
the correct values, etc. In particular, the exception handling type is SjLj, not
ARM.
llvm-svn: 133296
2011-06-17 21:29:06 +00:00
Bill Wendling
a31de72e6a
Disable to investigate ARM failure.
...
llvm-svn: 133293
2011-06-17 21:09:50 +00:00
Bill Wendling
1d4e48661b
Use the verbose asm flag instead of a new flag for decoding the LSDA.
...
llvm-svn: 133292
2011-06-17 20:55:01 +00:00