Next: Code Macros, Up: Macros
12.22.1 Mode Macros
Ports often need to define similar patterns for two or more different modes. For example:
- If a processor has hardware support for both single and double
floating-point arithmetic, the
SFmodepatterns tend to be very similar to theDFmodeones. - If a port uses
SImodepointers in one configuration andDImodepointers in another, it will usually have very similarSImodeandDImodepatterns for manipulating pointers.
Mode macros allow several patterns to be instantiated from one
.md file template. They can be used with any type of
rtx-based construct, such as a define_insn,
define_split, or define_peephole2.