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

52 Commits

Author SHA1 Message Date
Chandler Carruth
55850cad48 Remove remaining uses of ATTRIBUTE_UNUSED on variables, and delete three
#includes in the process.

llvm-svn: 116919
2010-10-20 08:27:02 +00:00
Chris Lattner
cbecb9a4d3 implement rdar://8456378 and PR7557 - support for the fstsw,
an instruction that requires a WHOLE NEW wonderful kind of alias.

llvm-svn: 115015
2010-09-29 01:50:45 +00:00
Chris Lattner
9b9a847b8c change the protocol TargetAsmPArser::MatchInstruction method to take an
MCStreamer to emit into instead of an MCInst to fill in.  This allows the
matcher extra flexibility and is more convenient.

llvm-svn: 115014
2010-09-29 01:42:58 +00:00
Michael J. Spencer
90f807fda5 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Chris Lattner
ffe1efe7ef fix the asmparser so that the target is responsible for skipping to
the end of the line on a parser error, allowing skipping to happen
for syntactic errors but not for semantic errors.  Before we would
miss emitting a diagnostic about the second line, because we skipped
it due to the semantic error on the first line:

  foo %eax
  bar %al

This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors

llvm-svn: 113688
2010-09-11 16:18:25 +00:00
Michael J. Spencer
98ad3f2ea7 CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Chris Lattner
0e0f9094e9 change the MC "ParseInstruction" interface to make it the
implementation's job to check for and lex the EndOfStatement
marker.

llvm-svn: 113347
2010-09-08 05:10:46 +00:00
Chris Lattner
6bfa0d9988 in the case where an instruction only has one implementation
of a mneumonic, report operand errors with better location
info.  For example, we now report:

t.s:6:14: error: invalid operand for instruction
        cwtl $1
             ^

but we fail for common cases like:

t.s:11:4: error: invalid operand for instruction
   addl $1, $1
   ^

because we don't know if this is supposed to be the reg/imm or imm/reg
form.

llvm-svn: 113178
2010-09-06 22:11:18 +00:00
Chris Lattner
22bb9cb511 change MatchInstructionImpl to return an enum instead of bool.
llvm-svn: 113165
2010-09-06 19:22:17 +00:00
Chris Lattner
45a204be76 have AsmMatcherEmitter.cpp produce the hunk of code that gets included
into the middle of the class, and rework how the different sections of
the generated file are conditionally included for simplicity.

llvm-svn: 113163
2010-09-06 19:11:01 +00:00
Chris Lattner
b911e51b26 zap dead code.
llvm-svn: 112712
2010-09-01 16:04:34 +00:00
Daniel Dunbar
f2b4982344 MC/AsmParser: Push the burdon of emitting diagnostics about unmatched
instructions onto the target specific parser, which can do a better job.

llvm-svn: 110889
2010-08-12 00:55:38 +00:00
Daniel Dunbar
0a98bc5619 tblgen/AsmMatcher: Always emit the match function as 'MatchInstructionImpl',
target specific parsers can adapt the TargetAsmParser to this.

llvm-svn: 110888
2010-08-12 00:55:32 +00:00
Daniel Dunbar
bc7c0a60da MC/ARM: Add basic support for handling predication by parsing it out of the mnemonic into a separate operand form.
llvm-svn: 110794
2010-08-11 06:37:20 +00:00
Daniel Dunbar
63628f1443 MC/ARM: Split mnemonic on '.' characters.
llvm-svn: 110793
2010-08-11 06:37:16 +00:00
Daniel Dunbar
bbaa88a848 MC/ARM: Fill in ARMOperand::dump a bit.
llvm-svn: 110792
2010-08-11 06:37:12 +00:00
Daniel Dunbar
ee80a239ed MCAsmParser: Add dump() hook to MCParsedAsmOperand.
llvm-svn: 110790
2010-08-11 06:37:04 +00:00
Daniel Dunbar
74ed9321a3 MC/ARM: Add an ARMOperand class for condition codes.
llvm-svn: 110788
2010-08-11 06:36:53 +00:00
Daniel Dunbar
89a64ee590 MC/ARM: Switch to using the generated match functions instead of stub implementations.
llvm-svn: 110783
2010-08-11 05:24:50 +00:00
Daniel Dunbar
150021561c Target: Give the TargetAsmParser access to the TargetMachine.
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.

llvm-svn: 108664
2010-07-19 00:33:49 +00:00
Benjamin Kramer
da3e6cdb26 Don't pass StringRef by reference.
llvm-svn: 108366
2010-07-14 22:38:02 +00:00
Duncan Sands
f7b98e2b1e Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Duncan Sands
9eff796264 Remove unused variable Loc and pointless variables unified_syntax
and thumb_mode.

llvm-svn: 107133
2010-06-29 13:04:35 +00:00
Ted Kremenek
cce8f54757 Update CMake build.
llvm-svn: 100714
2010-04-07 23:05:23 +00:00
Sean Callanan
8ac8cf3f10 Added an AsmLexer for the ARM target, which uses
a simple mapping of register names to IDs to
identify register tokens.

llvm-svn: 100685
2010-04-07 20:29:34 +00:00
Sean Callanan
d04b3e0657 Added support for reporting operand token ranges
to the ARM AsmParser.

llvm-svn: 100232
2010-04-02 22:27:05 +00:00
Jeffrey Yasskin
876e602378 Fix LLVM build when the user specifies CPPFLAGS on the make command line.
llvm-svn: 98394
2010-03-12 21:42:14 +00:00
Chris Lattner
5a57121631 make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Chris Lattner
276811b58a Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.

llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Chris Lattner
9a84d96edf create a new MCParser library and move some stuff into it.
llvm-svn: 94129
2010-01-22 01:44:57 +00:00
Sean Callanan
4bb95fd7d6 Promoted the getTok() method to MCAsmParser so that
the two token accessor functions are declared consistently.
Modified the clients of MCAsmParser to reflect this change.

llvm-svn: 93916
2010-01-19 21:44:56 +00:00
Sean Callanan
7fa5ebbed0 Propagated the parser-side Lex function's declaration to
MCAsmParser, and changed the target-specific AsmParsers
to use it.

llvm-svn: 93900
2010-01-19 20:27:46 +00:00
Chris Lattner
336c2b0d47 Generalize mcasmstreamer data emission APIs to take an address space
identifier.  There is no way to work around it.

llvm-svn: 93896
2010-01-19 19:46:13 +00:00
Chris Lattner
882cb240a6 Split the TargetAsmParser "ParseInstruction" interface in half:
the new ParseInstruction method just parses and returns a list of
target operands.  A new MatchInstruction interface is used to
turn the operand list into an MCInst.

This requires new/deleting all the operands, but it also gives 
targets the ability to use polymorphic operands if they want to. 

llvm-svn: 93469
2010-01-14 22:21:20 +00:00
Chris Lattner
ceabb11a5e prune #includes in TargetAsmParser.h
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.

llvm-svn: 93457
2010-01-14 21:32:45 +00:00
Chris Lattner
c0321eb1aa introduce MCParsedAsmOperand
llvm-svn: 93455
2010-01-14 21:21:40 +00:00
Bill Wendling
baec6e54f4 Add an "ATTRIBUTE_UNUSED" macro (and use it). It's for variables which are
mainly used in debugging and/or assert situations. It should make the compiler
and the static analyzer stop nagging us about them.

llvm-svn: 92181
2009-12-28 01:20:29 +00:00
John McCall
e3df19422d Every anonymous namespace is different. Caught by clang++.
llvm-svn: 91481
2009-12-16 00:15:28 +00:00
Kevin Enderby
633b294095 Fix ARMAsmParser::ParseMemoryOffsetReg() where the parameter OffsetRegNum should
have been passed as a reference.

llvm-svn: 85823
2009-11-02 20:14:39 +00:00
Kevin Enderby
c8d047130a Updates to the ARM target assembler for llvm-mc per review comments from
Daniel Dunbar.
- Reordered the fields in the ARMOperand Mem struct to make the struct smaller.
Making bool's into 1 bit fields and put the MCExpr* fields adjacent to each
other.
- Fixed a number of places in ARMAsmParser.cpp so they have doxygen comments.
- Change the name of ARMAsmParser::ParseRegister() to MaybeParseRegister and
added the bool ParseWriteBack parameter.
- Changed ARMAsmParser::ParseMemory() to call MaybeParseRegister().
- Added ARMAsmParser::ParseMemoryOffsetReg to factor out parsing the offset of a
memory operand.  And use it for both parsing both preindexed and post indexing
addressing forms in ARMAsmParser::ParseMemory.
- Changed the first argument to ParseShift() to a reference.
- Changed ParseShift() to check for Rrx first and return to reduce nesting.

llvm-svn: 85632
2009-10-30 22:55:57 +00:00
Daniel Dunbar
87b361d3d6 Wire up the ARM MCInst printer, for llvm-mc.
llvm-svn: 84600
2009-10-20 05:15:36 +00:00
Kevin Enderby
f2a8226515 Fix ARM memory operand parsing of post indexing with just a base register, that
is just "[Rn]" and no tailing comma with an offset, etc.

llvm-svn: 84205
2009-10-15 21:42:45 +00:00
Kevin Enderby
48a0aac679 More bits of the ARM target assembler for llvm-mc, code added to parse labels
as expressions, code for parsing a few arm specific directives (still needs
the MCStreamer calls for these).  Some clean up of the operand parsing code
and adding some comments.

llvm-svn: 84201
2009-10-15 20:48:48 +00:00
Kevin Enderby
8d8e57983a Correct comment about ARM immediates using '#' not '$' and TODO for modifiers.
llvm-svn: 84055
2009-10-13 23:33:38 +00:00
Kevin Enderby
959ec973ad More bits of the ARM target assembler for llvm-mc to parse immediates.
Also fixed a couple of coding style things that crept in.  And added more
to the temporary hacked up ARMAsmParser::MatchInstruction() method for testing.

llvm-svn: 84040
2009-10-13 22:19:02 +00:00
Kevin Enderby
c4125fbeb8 Fix two warnings about unused variables that are only used in assert() calls.
llvm-svn: 83917
2009-10-12 22:51:49 +00:00
Kevin Enderby
29f78ac638 Fix a problem in the code where ARMAsmParser::ParseShift() second argument
should have been a pointer to a reference.

llvm-svn: 83915
2009-10-12 22:39:54 +00:00
Kevin Enderby
430e05312d Added another bit of the ARM target assembler to llvm-mc to parse register
lists.  Changed ARMAsmParser::MatchRegisterName to return -1 instead of 0 on
errors so 0-15 values could be returned as register numbers.  Also added the
rest of the arm register names to the currently hacked up version to allow more
testing.  Some changes to ARMAsmParser::ParseOperand to give different errors
for things not yet supported and some additions to the hacked
ARMAsmParser::MatchInstruction to allow more testing for now.

llvm-svn: 83673
2009-10-09 21:12:28 +00:00
Kevin Enderby
c0d0a1ec58 Add another bit of the ARM target assembler to llvm-mc to parse registers
with writeback, things like "sp!", etc.  Also added some more stuff to the
temporarily hacked methods ARMAsmParser::MatchRegisterName and
ARMAsmParser::MatchInstruction to allow more parser testing.

llvm-svn: 83477
2009-10-07 18:01:35 +00:00
Kevin Enderby
2c772c1ae9 Added bits of the ARM target assembler to llvm-mc to parse some load instruction
operands.  Some parsing of arm memory operands for preindexing and postindexing
forms including with register controled shifts.  This is a work in progress.

llvm-svn: 83424
2009-10-06 22:26:42 +00:00