@@ -10,7 +10,7 @@ use target_lexicon::BinaryFormat;
10
10
11
11
use crate :: prelude:: * ;
12
12
13
- enum CInlineAsmOperand < ' tcx > {
13
+ pub ( crate ) enum CInlineAsmOperand < ' tcx > {
14
14
In {
15
15
reg : InlineAsmRegOrRegClass ,
16
16
value : Value ,
@@ -146,7 +146,7 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
146
146
}
147
147
}
148
148
149
- fn codegen_inline_asm_inner < ' tcx > (
149
+ pub ( crate ) fn codegen_inline_asm_inner < ' tcx > (
150
150
fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
151
151
template : & [ InlineAsmTemplatePiece ] ,
152
152
operands : & [ CInlineAsmOperand < ' tcx > ] ,
@@ -737,44 +737,3 @@ fn call_inline_asm<'tcx>(
737
737
place. write_cvalue ( fx, CValue :: by_val ( value, place. layout ( ) ) ) ;
738
738
}
739
739
}
740
-
741
- pub ( crate ) fn codegen_xgetbv < ' tcx > (
742
- fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
743
- xcr_no : Value ,
744
- ret : CPlace < ' tcx > ,
745
- ) {
746
- // FIXME add .eh_frame unwind info directives
747
-
748
- let operands = vec ! [
749
- CInlineAsmOperand :: In {
750
- reg: InlineAsmRegOrRegClass :: Reg ( InlineAsmReg :: X86 ( X86InlineAsmReg :: cx) ) ,
751
- value: xcr_no,
752
- } ,
753
- CInlineAsmOperand :: Out {
754
- reg: InlineAsmRegOrRegClass :: Reg ( InlineAsmReg :: X86 ( X86InlineAsmReg :: ax) ) ,
755
- late: true ,
756
- place: Some ( ret) ,
757
- } ,
758
- CInlineAsmOperand :: Out {
759
- reg: InlineAsmRegOrRegClass :: Reg ( InlineAsmReg :: X86 ( X86InlineAsmReg :: dx) ) ,
760
- late: true ,
761
- place: None ,
762
- } ,
763
- ] ;
764
- let options = InlineAsmOptions :: NOSTACK | InlineAsmOptions :: PURE | InlineAsmOptions :: NOMEM ;
765
-
766
- codegen_inline_asm_inner (
767
- fx,
768
- & [ InlineAsmTemplatePiece :: String (
769
- "
770
- xgetbv
771
- // out = rdx << 32 | rax
772
- shl rdx, 32
773
- or rax, rdx
774
- "
775
- . to_string ( ) ,
776
- ) ] ,
777
- & operands,
778
- options,
779
- ) ;
780
- }
0 commit comments