[llvm-commits] [PATCH 07/11] (patch) Mips specific inline asm: constraint 'N'
Eric Christopher
echristo at apple.com
Thu Apr 26 14:42:11 PDT 2012
On Apr 12, 2012, at 1:51 PM, Jack Carter <jcarter at mips.com> wrote:
> A constant in the range of -65535 to -1 inclusive.
>
> Example:
>
> int i_input = 7; int i_result = 0;
>
> // Good: i_val falls in the correct range
> int i_val = -3;
> __asm__ __volatile__(
> "addi %0,%1,%2" : "=r" (i_result) : "r" (i_input), "N" (i_val));
>
> // Bad: llc should produce an error
> int i_val = 3;
> __asm__ __volatile__(
> "addi %0,%1,%2" : "=r" (i_result) : "r" (i_input), "N" (i_val));
> ---
> lib/Target/Mips/MipsISelLowering.cpp | 11 +++++++++++
> test/CodeGen/Mips/inlineasm-cnstrnt-bad-N.ll | 15 +++++++++++++++
> test/CodeGen/Mips/inlineasm_constraint.ll | 6 ++++++
> 3 files changed, 32 insertions(+), 0 deletions(-)
> create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-bad-N.ll
>
> <Constraint_N.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
This is fine.
-eric
More information about the llvm-commits
mailing list