oscourse-tsinghua / rcore_plus

Rust version of THU uCore OS. Linux compatible.
MIT License
172 stars 26 forks source link

Rust user programs cannot run in release mode #31

Closed jiegec closed 5 years ago

jiegec commented 5 years ago

After reading assembly and some searching, it is fixed in https://github.com/rcore-os/rcore-user/commit/a8497fb692ca9e9ac1717ebeb05f73508d9d6ca3.

Reason: syscall clobbers rcx and r11 registers. Tell compiler about this. Ref: https://stackoverflow.com/questions/50571275/why-does-a-syscall-clobber-rcx