Next: Code Macros, Up: Macros
14.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
SFmode
patterns tend to be very similar to theDFmode
ones. - If a port uses
SImode
pointers in one configuration andDImode
pointers in another, it will usually have very similarSImode
andDImode
patterns 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
.