Skip to content

lookupswitch accepts floats as case in operand label #9

@jitsedesmet

Description

@jitsedesmet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions