Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message for unimplemented instructions #46

Open
chazy opened this issue Aug 26, 2020 · 5 comments
Open

Misleading error message for unimplemented instructions #46

chazy opened this issue Aug 26, 2020 · 5 comments

Comments

@chazy
Copy link

chazy commented Aug 26, 2020

Consider the following example used with the aarch64.cat model:

{
0:X1=x; 0:X3=y;
1:X1=y; 1:X3=x;
}
 P0                     | P1          ;
 STLXP W0, X1, X2, [X3] |             ;

exists (0:X0=1)

herd7 will complain because the STLXP instruction is not implemented, but the error message given is:
File "unknown-instr.litmus", line 7, characters 7-9: unexpected 'W0' (in prog) (User error)

If possible, it would improve usability in this scenario if the tool could report "Unrecognized statement 'STLXP'" or something like that instead.

@maranget
Copy link
Member

maranget commented Sep 9, 2020

Hi, I see your point,

However, I have no idea of how to get better error messages here. This probably means quite a lot of work and many tasks on herd7 are urgent. Hence this issue is not a high priority one,

@chazy
Copy link
Author

chazy commented Sep 9, 2020 via email

@lukeg101
Copy link
Contributor

one thought is that we could implement the parsing for instructions like this (I have implemented stlxp on my branch), and then add a 'not implemented' pattern in AArch64Sem:

somewhere around?

(* Cannot handle *)

of course it's up to us to add all the instruction variants, but this might work?

@jalglave
Copy link
Member

hi Luke, if you've got an idea, please prepare a PR and we'll review then.
Thanks,
Jade

@Jichao
Copy link

Jichao commented Mar 7, 2023

same problem on test for arch x86_64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants