Skip to content

Commit 943dc2f

Browse files
committed
Fix building std_detect on s390x
1 parent 0d70724 commit 943dc2f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/inline_asm.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
5151
return;
5252
}
5353

54+
if fx.tcx.sess.target.arch == "s390x"
55+
&& template.len() == 3
56+
&& template[0] == InlineAsmTemplatePiece::String("stfle 0(".into())
57+
&& let InlineAsmTemplatePiece::Placeholder { operand_idx: 0, modifier: None, span: _ } =
58+
template[1]
59+
&& template[2] == InlineAsmTemplatePiece::String(")".into())
60+
{
61+
// FIXME no inline asm support for s390x yet, but stdarch needs it for feature detection
62+
return;
63+
}
64+
5465
let operands = operands
5566
.iter()
5667
.map(|operand| match *operand {

0 commit comments

Comments
 (0)