-
Notifications
You must be signed in to change notification settings - Fork 108
add the llvm.x86.sse42.crc32.32.32
intrinsic
#1488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -832,6 +832,32 @@ pub(crate) fn codegen_x86_llvm_intrinsic_call<'tcx>( | |
} | ||
} | ||
|
||
"llvm.x86.sse42.crc32.32.32" => { | ||
// https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#ig_expand=939,1419,1419&text=_mm_crc32_u32 | ||
intrinsic_args!(fx, args => (crc, v); intrinsic); | ||
|
||
let crc = crc.load_scalar(fx); | ||
let v = v.load_scalar(fx); | ||
|
||
codegen_inline_asm_inner( | ||
fx, | ||
&[InlineAsmTemplatePiece::String("crc32 eax, edx".to_string())], | ||
&[ | ||
CInlineAsmOperand::InOut { | ||
reg: InlineAsmRegOrRegClass::Reg(InlineAsmReg::X86(X86InlineAsmReg::ax)), | ||
_late: true, | ||
in_value: crc, | ||
out_place: Some(ret), | ||
}, | ||
CInlineAsmOperand::In { | ||
reg: InlineAsmRegOrRegClass::Reg(InlineAsmReg::X86(X86InlineAsmReg::dx)), | ||
value: v, | ||
}, | ||
Comment on lines
+846
to
+855
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there any particular reason to choose particular register names here? this seemed to be the ordering used in some of the other examples. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no particular reason for the choice of registers. |
||
], | ||
InlineAsmOptions::NOSTACK | InlineAsmOptions::PURE | InlineAsmOptions::NOMEM, | ||
); | ||
} | ||
|
||
"llvm.x86.sse42.pcmpestri128" => { | ||
// https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_cmpestri&ig_expand=939 | ||
intrinsic_args!(fx, args => (a, la, b, lb, _imm8); intrinsic); | ||
|
Uh oh!
There was an error while loading. Please reload this page.