[mips] Distinguish 'R', 'ZC', and 'm' inline assembly memory constraint.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 24 Mar 2015 11:26:34 +0000 (11:26 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 24 Mar 2015 11:26:34 +0000 (11:26 +0000)
commitb1058310c114f7de2e2192d220cd49814fba1ea5
tree0bdd16e61d1588fa8a52d1be57e36272e3016886
parenta54c5b44893b4bf0ae5ebb8df494b96adeb71687
[mips] Distinguish 'R', 'ZC', and 'm' inline assembly memory constraint.

Summary:
Previous behaviour of 'R' and 'm' has been preserved for now. They will be
improved in subsequent commits.

The offset permitted by ZC varies according to the subtarget since it is
intended to match the restrictions of the pref, ll, and sc instructions.

The restrictions on these instructions are:
* For microMIPS: 12-bit signed offset.
* For Mips32r6/Mips64r6: 9-bit signed offset.
* Otherwise: 16-bit signed offset.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8414

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233063 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/InlineAsm.h
lib/Target/Mips/MipsAsmPrinter.cpp
lib/Target/Mips/MipsISelDAGToDAG.cpp
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsISelLowering.h
lib/Target/Mips/MipsSEISelDAGToDAG.cpp
lib/Target/Mips/MipsSEISelDAGToDAG.h
test/CodeGen/Mips/inlineasm_constraint_ZC.ll [new file with mode: 0644]