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

lookupswitch accepts floats as case in operand label #9

Open
jitsedesmet opened this issue Jul 7, 2023 · 0 comments
Open

lookupswitch accepts floats as case in operand label #9

jitsedesmet opened this issue Jul 7, 2023 · 0 comments

Comments

@jitsedesmet
Copy link
Contributor

The assembler will accept a floating number as a case in the lookupswitch instruction.
The specification defines the following format for a switchCase:

switchCase := case number : label
switchCase := default : label

Number here can be viewed broadly, since it also accepts floating point numbers. This however does not make any sense since the argument of lookupswitch needs to be an int according to the spec.

For example, a code snippet that works but should not is:

iconst_0
lookupswitch { default : lab_a case 3.1415: lab_b}
lab_a:
lab_b:
    return
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

1 participant