mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
test: andpd_freg64_freg64 X86
This commit is contained in:
parent
db11453327
commit
a263f1eac3
1 changed files with 29 additions and 0 deletions
|
@ -1427,6 +1427,35 @@ mod tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_andpd_freg64_freg64() {
|
||||||
|
let arena = bumpalo::Bump::new();
|
||||||
|
let mut buf = bumpalo::vec![in &arena];
|
||||||
|
|
||||||
|
for ((dst, src), expected) in &[
|
||||||
|
(
|
||||||
|
(X86_64FloatReg::XMM0, X86_64FloatReg::XMM0),
|
||||||
|
vec![0x66, 0x0F, 0x54, 0xC0],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
(X86_64FloatReg::XMM0, X86_64FloatReg::XMM15),
|
||||||
|
vec![0x66, 0x41, 0x0F, 0x54, 0xC7],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
(X86_64FloatReg::XMM15, X86_64FloatReg::XMM0),
|
||||||
|
vec![0x66, 0x44, 0x0F, 0x54, 0xF8],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
(X86_64FloatReg::XMM15, X86_64FloatReg::XMM15),
|
||||||
|
vec![0x66, 0x45, 0x0F, 0x54, 0xFF],
|
||||||
|
),
|
||||||
|
] {
|
||||||
|
buf.clear();
|
||||||
|
andpd_freg64_freg64(&mut buf, *dst, *src);
|
||||||
|
assert_eq!(&expected[..], &buf[..]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_xor_reg64_reg64() {
|
fn test_xor_reg64_reg64() {
|
||||||
let arena = bumpalo::Bump::new();
|
let arena = bumpalo::Bump::new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue