Add well-known names for runtime library functions.

Add a LibCall type which represents runtime library functions that many
be synthesized by Cretonne from pure instructions.

Add a LibCall variant to ExternalName to represent one of these runtime
functions.
This commit is contained in:
Jakob Stoklund Olesen
2017-12-07 17:50:22 -08:00
parent 60c456c1ec
commit 362a4bdc4c
4 changed files with 159 additions and 18 deletions

View File

@@ -885,7 +885,9 @@ impl<'a> Parser<'a> {
match self.token() {
Some(Token::Name(s)) => {
self.consume();
Ok(ExternalName::testcase(s))
s.parse().map_err(
|_| self.error("invalid test case or libcall name"),
)
}
Some(Token::UserRef(namespace)) => {
self.consume();