Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Is vmsbc exactly the same as vmsltu with vm=1? #894

Open
liangkaiwang opened this issue Jun 23, 2023 · 2 comments
Open

Is vmsbc exactly the same as vmsltu with vm=1? #894

liangkaiwang opened this issue Jun 23, 2023 · 2 comments

Comments

@liangkaiwang
Copy link

Hi all,

I recently start reviewing some instructions, and it looks to me that the functionality of vmsbc can be replaced completely with the vmsltu and vm set to 1. Am I missing something here?

thanks,
Liang-Kai

@nick-knight
Copy link
Contributor

This may be the case for the vm=1 forms of vmsbc. But I don't think the vm=0 forms are so readily synthesized. For example, if v1 = v2, and v0 has all bits set, then vmsbc.vvm v3, v1, v2, v0 returns v3 with all bits set. Whereas vmsltu.vv v3, v1, v2, v0.t returns all zeros.

@aswaterman
Copy link
Member

Yeah, I came here to say what Nick said.

Obviously, uarches can take advantage of the similarities between any instructions if they’re so inclined.

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

No branches or pull requests

3 participants