Path: blob/main/cranelift/assembler-x64/meta/src/instructions/neg.rs
1693 views
use crate::dsl::{Feature::*, Inst, Location::*};1use crate::dsl::{fmt, inst, rex, rw};23#[rustfmt::skip] // Keeps instructions on a single line.4pub fn list() -> Vec<Inst> {5vec![6// Two's complement negation.7inst("negb", fmt("M", [rw(rm8)]), rex(0xF6).digit(3), _64b | compat),8inst("negw", fmt("M", [rw(rm16)]), rex([0x66, 0xF7]).digit(3), _64b | compat),9inst("negl", fmt("M", [rw(rm32)]), rex(0xF7).digit(3), _64b | compat),10inst("negq", fmt("M", [rw(rm64)]), rex(0xF7).w().digit(3), _64b),11// One's complement negation.12inst("notb", fmt("M", [rw(rm8)]), rex(0xF6).digit(2), _64b | compat),13inst("notw", fmt("M", [rw(rm16)]), rex([0x66, 0xF7]).digit(2), _64b | compat),14inst("notl", fmt("M", [rw(rm32)]), rex(0xF7).digit(2), _64b | compat),15inst("notq", fmt("M", [rw(rm64)]), rex(0xF7).w().digit(2), _64b),16]17}181920