File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -45,19 +45,21 @@ pub(crate) fn codegen_inline_asm<'tcx>(
45
45
) {
46
46
// FIXME add .eh_frame unwind info directives
47
47
48
+ // Used by panic_abort on Windows, but uses a syntax which only happens to work with
49
+ // asm!() by accident and breaks with the GNU assembler as well as global_asm!() for
50
+ // the LLVM backend.
51
+ if template[ 0 ] == InlineAsmTemplatePiece :: String ( "int $$0x29" . to_string ( ) ) {
52
+ fx. bcx . ins ( ) . trap ( TrapCode :: User ( 1 ) ) ;
53
+ return ;
54
+ }
55
+
48
56
if !asm_supported ( fx. tcx ) {
49
57
if template. is_empty ( ) {
50
58
let destination_block = fx. get_block ( destination. unwrap ( ) ) ;
51
59
fx. bcx . ins ( ) . jump ( destination_block, & [ ] ) ;
52
60
return ;
53
61
}
54
62
55
- // Used by panic_abort
56
- if template[ 0 ] == InlineAsmTemplatePiece :: String ( "int $$0x29" . to_string ( ) ) {
57
- fx. bcx . ins ( ) . trap ( TrapCode :: User ( 1 ) ) ;
58
- return ;
59
- }
60
-
61
63
// Used by stdarch
62
64
if template[ 0 ] == InlineAsmTemplatePiece :: String ( "mov " . to_string ( ) )
63
65
&& matches ! (
You can’t perform that action at this time.
0 commit comments