Don't silently ignore argument or value locations. (#157)
No current tests actually rely on this, and it's surprising.
This commit is contained in:
@@ -1010,9 +1010,7 @@ impl<'a> Parser<'a> {
|
|||||||
.map(ArgumentLoc::Reg)
|
.map(ArgumentLoc::Reg)
|
||||||
.ok_or(self.error("invalid register name"))
|
.ok_or(self.error("invalid register name"))
|
||||||
} else {
|
} else {
|
||||||
// We are unable to parse the register without a TargetISA, so we quietly
|
err!(self.loc, "argument location requires exactly one isa")
|
||||||
// ignore it.
|
|
||||||
Ok(ArgumentLoc::Unassigned)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some(Token::Integer(_)) => {
|
Some(Token::Integer(_)) => {
|
||||||
@@ -1491,8 +1489,7 @@ impl<'a> Parser<'a> {
|
|||||||
.map(ValueLoc::Reg)
|
.map(ValueLoc::Reg)
|
||||||
.ok_or(self.error("invalid register value location"))
|
.ok_or(self.error("invalid register value location"))
|
||||||
} else {
|
} else {
|
||||||
// For convenience we ignore value locations when no unique ISA is specified
|
err!(self.loc, "value location requires exactly one isa")
|
||||||
Ok(ValueLoc::Unassigned)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some(Token::Minus) => {
|
Some(Token::Minus) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user