rust-lang/stdarch

unexpected 9 Segmentation fault error

ashWhiteHat opened this issue · 2 comments

I am trying to move the inline assembly as following.
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=6125251536c5d91da02a94ce00d1f592
On LL20 "mov rdx, {0}",, I loaded the variable but it caused error.
When I changed it to r8, rax and rbx, it worked but when rcx, it didn't work.
Is this my implementation problem?
Could you indicate corresponding code?
I can discover the problem by myself.
Thank you!

You are missing a lot of clobbers. r12, r13, r14, r15, rdx and rax are clobbered. You need to declare this, otherwise the compiler will think that you either didn't change their value or restored it and thus it thinks it can keep values in these registers just fine.

Thank you so much!
I was successful for compile!