1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

46 Commits

Author SHA1 Message Date
Colin LeMahieu
9510d4e30b [MC] Allowing operands to be erased from MCInst.
llvm-svn: 239079
2015-06-04 19:49:52 +00:00
Jim Grosbach
0376fcb135 MC: Tidy up formatting a bit. NFC.
llvm-svn: 238799
2015-06-01 23:55:02 +00:00
Jim Grosbach
b635db1046 MC: Modernize MCOperand API naming. NFC.
MCOperand::Create*() methods renamed to MCOperand::create*().

llvm-svn: 237275
2015-05-13 18:37:00 +00:00
Jim Grosbach
82391c3e5a MC: Tidy up comments and clean up formatting a bit. NFC.
llvm-svn: 236368
2015-05-02 00:44:14 +00:00
Colin LeMahieu
f18b2da2a1 [MC] Constifying MCInst::size()
llvm-svn: 229524
2015-02-17 19:46:23 +00:00
Sean Silva
9d2bea5968 [MC] Remove various unused MCAsmInfo parameters.
llvm-svn: 228244
2015-02-05 00:58:51 +00:00
Pete Cooper
6f80c6bc55 Use C++ typed enums instead of 'unsigned char' for MCInst Kind. NFC.
This makes it much easier to see the value of operands in the debugger.

llvm-svn: 223060
2014-12-01 18:46:43 +00:00
Colin LeMahieu
db2d3620d0 Adding const iterator to MCInst. http://reviews.llvm.org/D6359
llvm-svn: 222661
2014-11-24 16:50:40 +00:00
Craig Topper
bd0a634bba [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206129
2014-04-13 04:57:38 +00:00
Jim Grosbach
3c2cf9b6eb Simplify the MCInst operator iterator declaration.
llvm-svn: 179541
2013-04-15 17:40:45 +00:00
Dmitri Gribenko
93c7ec80b7 Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph);
* use \param instead of \arg to document parameters in order to be consistent
  with the rest of the codebase.

llvm-svn: 163902
2012-09-14 14:57:36 +00:00
Jim Grosbach
a3c09652c6 Add simple support for keeping MCFixup source information.
Can be used to issue more user friendly diagnostics for faulty
relocation constructs and such.

llvm-svn: 149092
2012-01-26 23:20:11 +00:00
Owen Anderson
61bdf3c55c Add a new form of MCOperand, for representing sub-instructions. This is intended for supporting bundles through the MC layer, rather than lowering them pre-MC as we currently do for Thumb2 IT blocks. Since these sub-instruction operands hold pointers to the sub-instructions, it is the responsibility of the target's AsmPrinter to provide storage for them for the duration of the EmitInstruction() call.
llvm-svn: 148492
2012-01-19 19:24:37 +00:00
Benjamin Kramer
a470ea0828 MCOperand is pod-like.
llvm-svn: 142253
2011-10-17 21:18:03 +00:00
Owen Anderson
e54c4beb5a Don't attach annotations to MCInst's. Instead, have the disassembler return, and the printer accept, an annotation string which can be passed through if the client cares about annotations.
llvm-svn: 139876
2011-09-15 23:38:46 +00:00
Owen Anderson
84d4e5d0e2 Add support for stored annotations to MCInst, and provide facilities for MC-based InstPrinters to print them out. Enhance the ARM and X86 InstPrinter's to do so in verbose mode.
llvm-svn: 139820
2011-09-15 18:36:29 +00:00
Owen Anderson
2331040816 Add accessors for manipulating an MCInst's operands.
llvm-svn: 136818
2011-08-03 21:52:15 +00:00
Owen Anderson
4ee266955a Add a clear() operation to MCInst, to drop all of its operands. Useful for the disassembler, where we may realize fairly late into decoding that something is wrong and need to reset.
llvm-svn: 136634
2011-08-01 18:43:18 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Jim Grosbach
b328f0ab04 Allow << streaming of MCOperand.
llvm-svn: 116107
2010-10-08 21:36:13 +00:00
Jim Grosbach
ea4028ac17 Add output stream operator for MCInst.
llvm-svn: 115974
2010-10-07 20:38:37 +00:00
Jim Grosbach
d7aec03bb1 make this non brain dead...
llvm-svn: 114100
2010-09-16 17:48:08 +00:00
Jim Grosbach
de7a4b08ad Remove unnecessary by-reference return.
llvm-svn: 114099
2010-09-16 17:45:21 +00:00
Jim Grosbach
1c3e1420e1 store MC FP immediates as a double instead of as an APFloat, thus avoiding an
unnecessary dtor for MCOperand.

llvm-svn: 114064
2010-09-16 03:45:21 +00:00
Jim Grosbach
62fb975e6e Add support for floating point immediates to MC instruction printing. ARM
VFP instructions use it for loading some constants, so implement that
handling.

Not thrilled with adding a member to MCOperand, but not sure there's much of
a better option that's not pretty fragile (like putting a double in the
union instead and just assuming that's good enough). Suggestions welcome...

llvm-svn: 113996
2010-09-15 18:47:08 +00:00
Jim Grosbach
b72d8c744a trailing whitespace and 80 column cleanup
llvm-svn: 113977
2010-09-15 16:24:01 +00:00
Daniel Dunbar
38fd48e06b MCInst: Add ::dump_pretty.
llvm-svn: 99216
2010-03-22 21:49:34 +00:00
Dan Gohman
acbd7911fb Remove a redundant copy constructor.
llvm-svn: 85547
2009-10-30 00:14:33 +00:00
Chandler Carruth
766362c707 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Chris Lattner
53cca8590c eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
MBB labels like everything else.

llvm-svn: 81628
2009-09-12 20:45:03 +00:00
Chris Lattner
951ae07703 default construct MCInst's ctor to 0, which is "PHI" which is invalid for MCInsts.
llvm-svn: 81525
2009-09-11 16:33:58 +00:00
Chris Lattner
b9aca1a178 remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter.  Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter.  This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.

llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Chris Lattner
8dd3d8b930 add a gross hack to get "SrcLine" comments to show up with the
new asmprinter.  Differently gross hack coming next.

llvm-svn: 81379
2009-09-09 20:45:42 +00:00
Chris Lattner
d4f19950e3 Thread an MCAsmInfo pointer through the various MC printing APIs,
and fix a few things using << on MCSymbols to use ->print(). No
functionality change other than unbreaking my previous patch.

llvm-svn: 80890
2009-09-03 05:46:51 +00:00
Daniel Dunbar
fcb32716eb llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.
Also, use MCInst::print instead of custom code in MCAsmPrinter.

llvm-svn: 80575
2009-08-31 08:08:38 +00:00
Daniel Dunbar
ed9714d9eb Add {MCInst,MCOperand}::{print,dump}
llvm-svn: 80231
2009-08-27 07:57:12 +00:00
Daniel Dunbar
8a0b05b396 Change MCOperand to use Create style instead of Make style for constructing
operands.

llvm-svn: 77837
2009-08-02 00:09:22 +00:00
Daniel Dunbar
cf67d9ed78 Fill in some methods for the MCValue field of an MCOperand.
llvm-svn: 74572
2009-06-30 23:37:44 +00:00
Chris Lattner
3962231b43 rename MCImm ->MCValue.
llvm-svn: 74023
2009-06-23 23:31:52 +00:00
Chris Lattner
196bfd3908 add a simple MCImm class.
llvm-svn: 73984
2009-06-23 18:58:00 +00:00
Chris Lattner
2b8ea5e0c8 add an accessor.
llvm-svn: 73966
2009-06-23 17:50:34 +00:00
Chris Lattner
7b43ca847d implement support for lowering subregs when preparing to print
LEA64_32r, eliminating a bunch of modifier logic stuff on addr modes.

Implement support for printing mbb labels as operands.

llvm-svn: 73817
2009-06-20 07:03:18 +00:00
Chris Lattner
fba2cdee3d make immediates be int64_t like machineoperand. Add some apis
llvm-svn: 73809
2009-06-20 00:47:37 +00:00
Chris Lattner
2e95d43f24 stub out some hacky code for wiring up the new asmprinter interfaces
on X86.  Not useful yet.

llvm-svn: 73799
2009-06-19 23:59:57 +00:00
Zhongxing Xu
d290ff9411 Include DataTypes.h for 'uint64_t'.
llvm-svn: 73748
2009-06-19 01:56:53 +00:00
Chris Lattner
3624754e23 Add some scaffolding for a new experimental asmprinter
implementation.  The idea is that we want asmprinting to
work by converting MachineInstrs into a new MCInst class,
then the per-instruction asmprinter works on MCInst.  MCInst
and the new asmprinters will not depend on most of the 
llvm code generators.  This allows building diassemblers
that don't link in the whole llvm code generator.  This is
step #1 of many.

llvm-svn: 73743
2009-06-19 00:47:33 +00:00