[llvm-commits] [PATCH 05/11] (patch) Mips specific inline asm: constraint 'K':
Eric Christopher
echristo at apple.com
Thu Apr 26 14:41:13 PDT 2012
On Apr 12, 2012, at 1:50 PM, Jack Carter <jcarter at mips.com> wrote:
> An unsigned 16 bit constant.
>
> Example:
> int i_input = 0x00000400; int i_result = 0; int i_tmp = 0;
>
> // Good: i_val fits the criteria
> int i_val = 64;
> __asm__ __volatile__(
> "add %0,%1,%3\n\t" : "=r" (i_result) : "r" (i_input), "K" (i_val), "r" (i_tmp));
>
> // Bad: llc should complain
> int i_val = 0x00100003;
> __asm__ __volatile__(
> "add %0,%1,%3\n\t" : "=r" (i_result) : "r" (i_input), "K" (i_val), "r" (i_tmp));
> ---
> lib/Target/Mips/MipsISelLowering.cpp | 11 +++++++++++
> test/CodeGen/Mips/inlineasm-cnstrnt-bad-K.ll | 13 +++++++++++++
> test/CodeGen/Mips/inlineasm_constraint.ll | 6 ++++++
> 3 files changed, 30 insertions(+), 0 deletions(-)
> create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-bad-K.ll
>
> <Constraint_K.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