Commit Graph

10 Commits

Author SHA1 Message Date
Akira Hatanaka 7877b51ba4 [X86, inlineasm] Do not allow using constraint 'x' for a variable larger than
128-bit unless the target CPU supports AVX.

rdar://problem/11846140


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218082 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-18 21:58:54 +00:00
Hans Wennborg dba2234b1b [X86, inline-asm] Allow 256-bit wide operands for the 'x' constraints
The 'x' constraint is for "any SSE register", and GCC seems to include the
256-bit ymm registers in that concept.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218073 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-18 20:24:04 +00:00
Akira Hatanaka cd588f07da [X86, inlineasm] Check that the output size is correct for the given constraint.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218064 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-18 18:17:18 +00:00
Akira Hatanaka 381a99ee4c [X86, inline-asm] Check that the input size is correct for constraints R, q, Q,
S, D, A, y, x, f, t, and u.

This is a follow-up patch for r167717.

rdar://problem/11846140
rdar://problem/17476970


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217994 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-17 23:35:14 +00:00
Bill Wendling 14df23bd11 Emit an error message instead of crashing when dereferencing an incomplete pointer type.
If the ASM statement is dereferencing an incomplete pointer type, issue an error
instead of crashing.
<rdar://problem/12700799>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177915 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:09:49 +00:00
Bill Wendling 984f2783ad Use RequireCompleteType() instead of isIncompleteType().
isIncompleteType() returns true or false for template types depending on whether
the type is instantiated yet. In this context, that's arbitrary. The better way
to check for a complete type is RequireCompleteType().

Thanks to Eli Friedman for noticing this!

<rdar://problem/12700799>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177768 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 21:33:46 +00:00
Bill Wendling 41296e8a63 That's causing an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167763 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-12 22:14:27 +00:00
Bill Wendling 5ece32e335 Don't test for incomplete types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167761 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-12 22:01:56 +00:00
Bill Wendling ba541d36f6 Update testcase to show that we don't emit an error for sizes <= 32-bits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167748 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-12 21:13:35 +00:00
Bill Wendling 68fd608c2c Check that the input size is correct for the given constraint.
The 'a', 'c', and 'd' constraints on i386 mean a 32-bit register. We cannot
place a 64-bit value into the 32-bit register. Error out instead of causing the
compiler to spew general badness.
<rdar://problem/12415959>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167717 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-12 06:42:51 +00:00