@@ -10,7 +10,7 @@ use target_lexicon::BinaryFormat;
1010
1111use crate :: prelude:: * ;
1212
13- enum CInlineAsmOperand < ' tcx > {
13+ pub ( crate ) enum CInlineAsmOperand < ' tcx > {
1414 In {
1515 reg : InlineAsmRegOrRegClass ,
1616 value : Value ,
@@ -146,7 +146,7 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
146146 }
147147}
148148
149- fn codegen_inline_asm_inner < ' tcx > (
149+ pub ( crate ) fn codegen_inline_asm_inner < ' tcx > (
150150 fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
151151 template : & [ InlineAsmTemplatePiece ] ,
152152 operands : & [ CInlineAsmOperand < ' tcx > ] ,
@@ -737,44 +737,3 @@ fn call_inline_asm<'tcx>(
737737 place. write_cvalue ( fx, CValue :: by_val ( value, place. layout ( ) ) ) ;
738738 }
739739}
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