提交 6c0d5f58 编写于 作者: K kennytm 提交者: GitHub

Rollup merge of #47875 - jcowgill:mips-clobber-at, r=rkruppe

rustc_trans: clobber $1 (aka $at) on mips

This copies what clang does. There is a long explanation as to why this is needed in the clang source (tools/clang/lib/Basic/Targets/Mips.h).
...@@ -60,6 +60,7 @@ pub fn trans_inline_asm<'a, 'tcx>( ...@@ -60,6 +60,7 @@ pub fn trans_inline_asm<'a, 'tcx>(
// Basically what clang does // Basically what clang does
let arch_clobbers = match &bx.sess().target.target.arch[..] { let arch_clobbers = match &bx.sess().target.target.arch[..] {
"x86" | "x86_64" => vec!["~{dirflag}", "~{fpsr}", "~{flags}"], "x86" | "x86_64" => vec!["~{dirflag}", "~{fpsr}", "~{flags}"],
"mips" | "mips64" => vec!["~{$1}"],
_ => Vec::new() _ => Vec::new()
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册