Skip to content

sizes, 64bit #341

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

Merged
merged 1 commit into from
Jul 27, 2019
Merged

sizes, 64bit #341

merged 1 commit into from
Jul 27, 2019

Conversation

burrbull
Copy link
Member

r? @therealprof

Right use of cluster.size + better support of 64bit registers.

See #299 , partially closed in #325 .

Not tested yet.

@burrbull burrbull requested a review from a team as a code owner July 27, 2019 14:30
@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools labels Jul 27, 2019
@burrbull
Copy link
Member Author

изображение

src/util.rs Outdated
t.append(if h2 != 0 {
let (h4, h3, h2, h1) = ((n >> 48) & 0xffff, (n >> 32) & 0xffff, (n >> 16) & 0xffff, n & 0xffff);
t.append(if n == 1 {
Ident::from("1")
Copy link
Contributor

Choose a reason for hiding this comment

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

This special case is weird...

Copy link
Member Author

Choose a reason for hiding this comment

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

What are you offering?

Copy link
Contributor

Choose a reason for hiding this comment

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

Getting rid of it? I'd fully expect this function to always return a real hex literal, not a hex literal or "1".

Copy link
Member Author

Choose a reason for hiding this comment

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

Or you about "1"? I can delete this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I don't like a function called hex to treat the number 1 special and not turn it into hex. ;)

@therealprof
Copy link
Contributor

I was kind of hoping that at some point we could get rid of the custom formatting hacks but at the moment there still seems to be no way to generate lint-less long literals with the built-in formatting mechanics...

@burrbull
Copy link
Member Author

Don't merge. Something wrong.

@burrbull
Copy link
Member Author

Fixed.

@therealprof
Copy link
Contributor

Looks great. Can you pleasse add a CHANGELOG entry, too? That way we don't have to hunt down all changes after the fact. ;)

@burrbull
Copy link
Member Author

Done.

Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@therealprof
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Jul 27, 2019
341: sizes, 64bit r=therealprof a=burrbull

r? @therealprof 

Right use of cluster.size + better support of 64bit registers.

See #299 , partially closed in #325 .

Not tested yet.

Co-authored-by: Andrey Zgarbul <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jul 27, 2019

Build succeeded

@bors bors bot merged commit b27ec4d into rust-embedded:master Jul 27, 2019
@burrbull burrbull deleted the sizes branch July 28, 2019 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants