Skip to content

Fix memset arguments for MSP430 target. #129

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
Dec 19, 2016
Merged

Conversation

pftbest
Copy link
Contributor

@pftbest pftbest commented Dec 19, 2016

On MSP430 second argument to memset has i16 type instead of i32.

@japaric
Copy link
Member

japaric commented Dec 19, 2016

I think we could simplify the logic by creating a "conditional" (cfg) type c_int = i32 or = i16 and using that in the function signature because the implementations are the same.

On MSP430 second argument to memset has i16 type instead of i32.
@japaric
Copy link
Member

japaric commented Dec 19, 2016

Thanks, @pftbest!

@bors r+

@bors
Copy link
Contributor

bors commented Dec 19, 2016

📌 Commit 9897bfb has been approved by japaric

@bors
Copy link
Contributor

bors commented Dec 19, 2016

⌛ Testing commit 9897bfb with merge 501d93f...

bors added a commit that referenced this pull request Dec 19, 2016
Fix memset arguments for MSP430 target.

On MSP430 second argument to memset has `i16` type instead of `i32`.
@bors
Copy link
Contributor

bors commented Dec 19, 2016

☀️ Test successful - status-appveyor, status-travis
Approved by: japaric
Pushing 501d93f to master...

@bors bors merged commit 9897bfb into rust-lang:master Dec 19, 2016
@pftbest pftbest deleted the memset branch February 11, 2017 00:35
tgross35 pushed a commit to tgross35/compiler-builtins that referenced this pull request Feb 23, 2025
this eliminates panicking branches in the optimized version of the functions. We keep the bounds
checks when running the test suite to check that we never do an out of bounds access.

This commit also adds a "must link" test that ensures that future changes in our implementation
won't add panicking branches.

closes rust-lang#129
tgross35 pushed a commit to tgross35/compiler-builtins that referenced this pull request Feb 23, 2025
131: omit bounds check in release mode r=japaric a=japaric

this eliminates panicking branches in the optimized version of the functions. We keep the bounds
checks when running the test suite to check that we never do an out of bounds access.

This commit also adds a "must link" test that ensures that future changes in our implementation
won't add panicking branches.

closes rust-lang#129

Co-authored-by: Jorge Aparicio <[email protected]>
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.

3 participants