Skip to content

Merge I128/Ixx and U128/Uxx variants#323

Merged
bors[bot] merged 5 commits intoknurling-rs:mainfrom
Sh3Rm4n:u128i128
Jan 4, 2021
Merged

Merge I128/Ixx and U128/Uxx variants#323
bors[bot] merged 5 commits intoknurling-rs:mainfrom
Sh3Rm4n:u128i128

Conversation

@Sh3Rm4n
Copy link
Copy Markdown
Contributor

@Sh3Rm4n Sh3Rm4n commented Dec 20, 2020

Closes #314

Also lift 32 bit range for bitfields introduced in #13
Could be split into another PR, if concerns are raised.

@Sh3Rm4n Sh3Rm4n changed the title Merge I128/Ixx and U28/Uxx variants Merge I128/Ixx and U128/Uxx variants Dec 20, 2020
@Sh3Rm4n Sh3Rm4n force-pushed the u128i128 branch 2 times, most recently from 017784b to 330cd0a Compare December 20, 2020 23:38
@jonas-schievink
Copy link
Copy Markdown
Contributor

Looks reasonable, thanks!

I think we should add a QEMU test for the larger bitfield range.

Range is exclusive. To match the MSB 32 for `range.end` has to be
allowed.
#[clippy(warn::or_fun_call)]
@Sh3Rm4n
Copy link
Copy Markdown
Contributor Author

Sh3Rm4n commented Dec 21, 2020

I've added a qemu test and as it showed, some more places had to be changed to support 128 bitfields.

I've also added ascii hint support for bitfields :)

@japaric japaric self-assigned this Jan 4, 2021
Comment thread decoder/src/lib.rs
}

#[test]
fn bitfields_u128() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit surprised about this test because expected that {0=119..124:b} is encoded as 2 bytes instead of as 16 bytes. After checking locally, this test also works if I remove the last 14 bytes. It would be nice to make decode_and_expect check that the input data was fully consumed to ensure we are not passing extra bytes that will be ignored.

Copy link
Copy Markdown
Member

@japaric japaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. This looks good!

@japaric
Copy link
Copy Markdown
Member

japaric commented Jan 4, 2021

bors r+

bors Bot added a commit that referenced this pull request Jan 4, 2021
323: Merge I128/Ixx and U128/Uxx variants r=japaric a=Sh3Rm4n

Closes #314 

Also lift 32 bit range for bitfields introduced in #13
Could be split into another PR, if concerns are raised.

Co-authored-by: Fabian Viöl <f.vioel@googlemail.com>
@bors
Copy link
Copy Markdown
Contributor

bors Bot commented Jan 4, 2021

Build failed:

@japaric
Copy link
Copy Markdown
Member

japaric commented Jan 4, 2021

CI should be fixed now
bors retry

@bors
Copy link
Copy Markdown
Contributor

bors Bot commented Jan 4, 2021

Build succeeded:

@bors bors Bot merged commit 41a5937 into knurling-rs:main Jan 4, 2021
@Sh3Rm4n Sh3Rm4n deleted the u128i128 branch January 4, 2021 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge I128/Ixx and U28/Uxx variants

3 participants