llvm-6502/lib
Eric Christopher 1a54c57cf6 Fix crashing on invalid inline asm with matching constraints.
For a testcase like the following:

 typedef unsigned long uint64_t;

 typedef struct {
   uint64_t lo;
   uint64_t hi;
 } blob128_t;

 void add_128_to_128(const blob128_t *in, blob128_t *res) {
   asm ("PAND %1, %0" : "+Q"(*res) : "Q"(*in));
 }

where we'll fail to allocate the register for the output constraint,
our matching input constraint will not find a register to match,
and could try to search past the end of the current operands array.

On the idea that we'd like to attempt to keep compilation going
to find more errors in the module, change the error cases when
we're visiting inline asm IR to return immediately and avoid
trying to create a node in the DAG. This leaves us with only
a single error message per inline asm instruction, but allows us
to safely keep going in the general case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187470 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 01:26:24 +00:00
..
Analysis isKnownToBeAPowerOfTwo: Strengthen isKnownToBeAPowerOfTwo's analysis on add instructions 2013-07-30 21:01:36 +00:00
AsmParser Target/X86: Add explicit Win64 and System V/x86-64 calling conventions. 2013-07-12 06:02:35 +00:00
Bitcode Make .bc en/decoding of AttrKind stable 2013-07-26 04:16:55 +00:00
CodeGen Fix crashing on invalid inline asm with matching constraints. 2013-07-31 01:26:24 +00:00
DebugInfo DebugInfo: Factor out parsing compile unit DIEs to a separate function. Improve code style and comments. 2013-07-15 08:43:35 +00:00
ExecutionEngine [PowerPC] Support powerpc64le as a syntax-checking target. 2013-07-26 01:35:43 +00:00
IR Fix ptr vector inconsistency in CreatePointerCast 2013-07-31 00:17:33 +00:00
IRReader Add 'const' qualifiers to static const char* variables. 2013-07-16 01:17:10 +00:00
Linker
MC MC: Support larger COFF string tables 2013-07-29 12:30:12 +00:00
Object Add support for the 's' operation to llvm-ar. 2013-07-29 12:40:31 +00:00
Option Silence gcc warning. 2013-07-22 21:29:28 +00:00
Support Fix windows' implementation of status when a file doesn't exist. 2013-07-31 00:10:25 +00:00
TableGen keep only the StringRef version of getFileOrSTDIN. 2013-06-25 05:28:34 +00:00
Target [mips] Rename instruction DANDi to ANDi64. 2013-07-31 00:57:41 +00:00
Transforms Preserve fast-math flags when folding (fsub x, (fneg y)) to (fadd x, y). 2013-07-30 23:53:17 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile