pub struct Fold {
pub from: &'static str,
pub into: &'static str,
pub load: &'static str,
pub swapped: Option<&'static str>,
}Expand description
One arithmetic instruction that could read its second source out of memory, and the load that would fill it.
A table rather than a rule about spellings, because the three names in each row are three things
the target describes on their own and nothing about add_rr_64 says that mov_rm_64 is the
load of the same width. Writing the three together is what makes a mismatched width a line
somebody can see rather than a string that was built at run time.
Fields§
§from: &'static strThe arithmetic as the selector wrote it, reading both its sources from registers.
into: &'static strThe same arithmetic reading its second source out of memory.
load: &'static strThe load that would have filled that register, which has to be of the same width.
swapped: Option<&'static str>The same arithmetic reading its first source out of memory, where there is one.
None where the two sources may not be swapped at all, which is subtraction: the
instruction that reads memory reads it as the right hand side and there is no encoding
that puts it on the left, so a load feeding the left hand side stays where it is.
The same name as into for an operation that commutes, since writing the two sources in
either order computes the same answer and one instruction covers both.
A different name for a comparison, which is the reason this is a name rather than a flag.
A comparison does not commute and is still foldable on either side: reading the two sides
the other way round asks the same question backwards, so the condition turns over with
them and a < b with the load on the left is b > a.