Skip to content

lb,lh not working #13

Description

@ramo48859

Hi,
there is an issue when parsing lb and lh instructions:

   lw s2, 8(sp) #works
   lb s2, 8(sp) #throws error
   lh s2, 8(sp) #throws error

the issue is in line 454 of convert.py:

elif clean[0] == "lw":  #<--lb and lh should be added
	res.append(self.I_type(clean[0], self.__reg_map(clean[3]), clean[2], self.__reg_map(clean[1])))

it works when changing this line:

elif clean[0] == "lw" or clean[0] == "lb" or clean[0] == "lh":
	res.append(self.I_type(clean[0], self.__reg_map(clean[3]), clean[2], self.__reg_map(clean[1])))

BR,
David

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions