Skip to content

i8 in CodeAssembler #235

Answered by wtfsck
Kixiron asked this question in Q&A
Discussion options

You must be logged in to vote

I've noticed that i8 aren't accepted for imm8 operands and instead there's checks to see if the given operand of 32 or 64 bit size fits into 8 bits, is that on purpose?

To reduce the number of functions, it only accepts i32/u32 operands and sometimes i64/u64 operands.

Additionally, unsigned integers don't have any trait implementations when they could

All functions that accept i32 operands also accept u32 operands. In other words, the same trait is implemented twice once for i32 and once for u32.

* There's no way to get a `Register` from any of the `CodeAssembler` register types

Sounds like a feature request so it's better to create an issue.

Should be easy to fix, eg. impl From<As…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wtfsck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants