fmt
This commit is contained in:
parent
45aa965bd5
commit
f7622d11a7
10
src/asm.rs
10
src/asm.rs
@ -485,9 +485,8 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
InlineAsmOperandRef::Label { label } => {
|
InlineAsmOperandRef::Label { label } => {
|
||||||
let label_gcc_index = labels.iter()
|
let label_gcc_index =
|
||||||
.position(|&l| l == label)
|
labels.iter().position(|&l| l == label).expect("wrong rust index");
|
||||||
.expect("wrong rust index");
|
|
||||||
let gcc_index = label_gcc_index + outputs.len() + inputs.len();
|
let gcc_index = label_gcc_index + outputs.len() + inputs.len();
|
||||||
push_to_template(Some('l'), gcc_index);
|
push_to_template(Some('l'), gcc_index);
|
||||||
}
|
}
|
||||||
@ -538,9 +537,8 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
|||||||
}
|
}
|
||||||
if dest.is_none() && options.contains(InlineAsmOptions::NORETURN) {
|
if dest.is_none() && options.contains(InlineAsmOptions::NORETURN) {
|
||||||
let builtin_unreachable = self.context.get_builtin_function("__builtin_unreachable");
|
let builtin_unreachable = self.context.get_builtin_function("__builtin_unreachable");
|
||||||
let builtin_unreachable: RValue<'gcc> = unsafe {
|
let builtin_unreachable: RValue<'gcc> =
|
||||||
std::mem::transmute(builtin_unreachable)
|
unsafe { std::mem::transmute(builtin_unreachable) };
|
||||||
};
|
|
||||||
self.call(self.type_void(), None, None, builtin_unreachable, &[], None);
|
self.call(self.type_void(), None, None, builtin_unreachable, &[], None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user