mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Check register class matching instead of width of type matching
when determining validity of matching constraint. Allow i1 types access to the GR8 reg class for x86. Fixes PR10352 and rdar://9777108 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2966,10 +2966,13 @@ TargetLowering::AsmOperandInfoVector TargetLowering::ParseConstraints(
|
||||
AsmOperandInfo &Input = ConstraintOperands[OpInfo.MatchingInput];
|
||||
|
||||
if (OpInfo.ConstraintVT != Input.ConstraintVT) {
|
||||
std::pair<unsigned, const TargetRegisterClass*> MatchRC =
|
||||
getRegForInlineAsmConstraint(OpInfo.ConstraintCode, OpInfo.ConstraintVT);
|
||||
std::pair<unsigned, const TargetRegisterClass*> InputRC =
|
||||
getRegForInlineAsmConstraint(Input.ConstraintCode, Input.ConstraintVT);
|
||||
if ((OpInfo.ConstraintVT.isInteger() !=
|
||||
Input.ConstraintVT.isInteger()) ||
|
||||
(OpInfo.ConstraintVT.getSizeInBits() !=
|
||||
Input.ConstraintVT.getSizeInBits())) {
|
||||
(MatchRC.second != InputRC.second)) {
|
||||
report_fatal_error("Unsupported asm: input constraint"
|
||||
" with a matching output constraint of"
|
||||
" incompatible type!");
|
||||
|
||||
Reference in New Issue
Block a user