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

w1 ₃₂→₁₆ w2 #713

Open
mn200 opened this issue Jan 6, 2020 · 4 comments
Open

w1 ₃₂→₁₆ w2 #713

mn200 opened this issue Jan 6, 2020 · 4 comments

Comments

@mn200
Copy link
Contributor

mn200 commented Jan 6, 2020

Make it so. Depends on #499

@mn200
Copy link
Contributor Author

mn200 commented Jan 8, 2020

Actually, casts are unary, so perhaps we could have this as a suffix, so that

     w1 ₃₂→₁₆

would be the 16 bit value corresponding to w1.

Alternatively, and this is the one that Magnus prefers, have

        ₃₂←₁₆ w2

which would be the 32 bit version of (16 bit value) w2.

@konrad-slind
Copy link
Contributor

konrad-slind commented Jan 8, 2020 via email

@mn200
Copy link
Contributor Author

mn200 commented Jan 8, 2020

You actually need to know both source and destination sizes, so in some sense it's a ternary operation. Moreover, the source and dest numbers have to be literals; they're not really arguments in the way that the w is.

(This is all supposing that we have words of arbitrary widths floating around (as per issue #499).)

@konrad-slind
Copy link
Contributor

konrad-slind commented Jan 8, 2020 via email

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

No branches or pull requests

2 participants