Skip to main content

asmpeach/assembler/tests/opcode_tests/
neg_tests.rs

1use crate::assembler::resource::*;
2
3#[allow(dead_code)]
4const NEGRM64_CASES: [Instruction; 1] = [Instruction {
5    opcode: Opcode::NEGRM64 {
6        rm64: Operand::GENERALREGISTER(GeneralPurposeRegister::RAX),
7    },
8}];
9
10#[cfg(test)]
11mod to_bytes_tests {
12    use super::*;
13
14    #[test]
15    fn negrm64_test() {
16        let inst = &NEGRM64_CASES[0];
17
18        assert_eq!(inst.to_bytes(), vec![0x48, 0xf7, 0xd8]);
19    }
20}