Skip to content
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

rustc 1.27.0-nightly breaks the debug version #6

Closed
Xudong-Huang opened this issue May 7, 2018 · 1 comment
Closed

rustc 1.27.0-nightly breaks the debug version #6

Xudong-Huang opened this issue May 7, 2018 · 1 comment
Labels

Comments

@Xudong-Huang
Copy link
Owner

rustc 1.27.0-nightly generate unwanted code for naked functions, this affect the logic of swap_registers by using inline assembly.

// why save the rcx and rdx in stack? this will overwite something!
// the naked function should only use the asm block, debug version breaks
// since rustc 1.27.0-nightly, we have to use O2 level optimization
        :
        : "{rcx}"(out_regs), "{rdx}"(in_regs) 
        : "memory"
        : "volatile");
@Xudong-Huang
Copy link
Owner Author

rustc 1.27.0-nightly (79252ff4e 2018-04-29) works fine
rustc 1.27.0-nightly (f9bfe840f 2018-05-05) not work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant