Skip to content

rustc_target: avoid negative register counts in the SysV x86_64 ABI. - #62380

Merged
bors merged 1 commit into
rust-lang:masterfrom
eddyb:x64-sysv-regs
Jul 5, 2019
Merged

rustc_target: avoid negative register counts in the SysV x86_64 ABI.#62380
bors merged 1 commit into
rust-lang:masterfrom
eddyb:x64-sysv-regs

Conversation

@eddyb

@eddybeddyb commented Jul 4, 2019

Copy link
Copy Markdown
Contributor

Because needed_{int,sse} and {int,sse}_regs were only used with integer literals, they were inferred to i32 and {int,sse}_regs could therefore be negative.
There was a check which prevented that, but only for aggregate arguments, not scalars.

Fixes#62350.

r? @nagisa or @rkruppe

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 4, 2019
Comment threadsrc/librustc_target/abi/call/x86_64.rs Outdated
Comment threadsrc/test/run-pass/issues/issue-62350.rs Outdated
@Centril

Copy link
Copy Markdown
Contributor

cc #62401

@nagisa

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Jul 5, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 050a71b has been approved by nagisa

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 5, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
rustc_target: avoid negative register counts in the SysV x86_64 ABI.
Because `needed_{int,sse}` and `{int,sse}_regs` were only used with integer literals, they were inferred to `i32` and `{int,sse}_regs` could therefore be negative.
There was a check which prevented that, but *only* for aggregate arguments, not scalars.
Fixesrust-lang#62350.
r? @nagisa or @rkruppe
@CentrilCentril mentioned this pull request Jul 5, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
rustc_target: avoid negative register counts in the SysV x86_64 ABI.
Because `needed_{int,sse}` and `{int,sse}_regs` were only used with integer literals, they were inferred to `i32` and `{int,sse}_regs` could therefore be negative.
There was a check which prevented that, but *only* for aggregate arguments, not scalars.
Fixesrust-lang#62350.
r? @nagisa or @rkruppe
@CentrilCentril mentioned this pull request Jul 5, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
rustc_target: avoid negative register counts in the SysV x86_64 ABI.
Because `needed_{int,sse}` and `{int,sse}_regs` were only used with integer literals, they were inferred to `i32` and `{int,sse}_regs` could therefore be negative.
There was a check which prevented that, but *only* for aggregate arguments, not scalars.
Fixesrust-lang#62350.
r? @nagisa or @rkruppe
@CentrilCentril mentioned this pull request Jul 5, 2019
bors added a commit that referenced this pull request Jul 5, 2019
Rollup of 13 pull requests
Successful merges:
- #61545 (Implement another internal lints)
- #62110 (Improve -Ztime-passes)
- #62133 (Feature gate `rustc` attributes harder)
- #62158 (Add MemoryExtra in InterpretCx constructor params)
- #62168 (The (almost) culmination of HirIdification)
- #62193 (Create async version of the dynamic-drop test)
- #62369 (Remove `compile-pass` from compiletest)
- #62380 (rustc_target: avoid negative register counts in the SysV x86_64 ABI.)
- #62381 (Fix a typo in Write::write_vectored docs)
- #62390 (Update README.md)
- #62396 (remove Scalar::is_null_ptr)
- #62406 (Lint on invalid values passed to x.py --warnings)
- #62414 (Remove last use of mem::uninitialized in SGX)
Failed merges:
r? @ghost
@bors
bors merged commit 050a71b into rust-lang:masterJul 5, 2019
@eddyb
eddyb deleted the x64-sysv-regs branch July 10, 2019 05:35
@eddybeddyb added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 12, 2019
@eddyb

Copy link
Copy Markdown
ContributorAuthor

Nominated for backporting to beta as per #62350 (comment) and @gankro's reply.

@emilyalbiniemilyalbini added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 16, 2019
@nagisanagisa added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 18, 2019
@emilyalbiniemilyalbini mentioned this pull request Jul 22, 2019
@emilyalbiniemilyalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 22, 2019
bors added a commit that referenced this pull request Jul 22, 2019
[beta] Rollup backports
Cherry picked:
* rustc_target: avoid negative register counts in the SysV x86_64 ABI. #62380
* Fix ICEs when `Self` is used in type aliases #62417
* Raise the default recursion limit to 128 #62450
* Handle errors during error recovery gracefully #62604
* Correctly break out of recovery loop #62607
* Cancel unemitted diagnostics during error recovery #62666
* ci: pin awscli dependencies #62856
* Ensure that checkout is with \n line endings #62564
Rolled up:
* [beta] Backport #62615#62793
* [beta] Fix#62660#62792
r? @ghost
bors added a commit that referenced this pull request Jul 22, 2019
[beta] Rollup backports
Cherry picked:
* rustc_target: avoid negative register counts in the SysV x86_64 ABI. #62380
* Fix ICEs when `Self` is used in type aliases #62417
* Raise the default recursion limit to 128 #62450
* Handle errors during error recovery gracefully #62604
* Correctly break out of recovery loop #62607
* Cancel unemitted diagnostics during error recovery #62666
* ci: pin awscli dependencies #62856
* Ensure that checkout is with \n line endings #62564
Rolled up:
* [beta] Backport #62615#62793
* [beta] Fix#62660#62792
r? @ghost
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FFI broken with many parameters

6 participants

@eddyb@Centril@nagisa@bors@emilyalbini@rust-highfive