-@c Copyright (C) 1988-2021 Free Software Foundation, Inc.
+@c Copyright (C) 1988-2024 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@item RTX_OBJ
An RTX code that represents an actual object, such as a register
(@code{REG}) or a memory location (@code{MEM}, @code{SYMBOL_REF}).
-@code{LO_SUM}) is also included; instead, @code{SUBREG} and
+@code{LO_SUM} is also included; instead, @code{SUBREG} and
@code{STRICT_LOW_PART} are not in this class, but in class
@code{RTX_EXTRA}.
@findex volatil
@cindex @samp{/v} in RTL dump
-@item volatil
@cindex volatile memory references
+@item volatil
In a @code{mem}, @code{asm_operands}, or @code{asm_input}
expression, it is 1 if the memory
reference is volatile. Volatile memory references may not be deleted,
two target macros, @code{WORDS_BIG_ENDIAN} and @code{BYTES_BIG_ENDIAN}:
@itemize
-@item
@cindex @code{WORDS_BIG_ENDIAN}, effect on @code{subreg}
+@item
@code{WORDS_BIG_ENDIAN}, if set to 1, says that byte number zero is
part of the most significant word; otherwise, it is part of the least
significant word.
-@item
@cindex @code{BYTES_BIG_ENDIAN}, effect on @code{subreg}
+@item
@code{BYTES_BIG_ENDIAN}, if set to 1, says that byte number zero is
the most significant byte within a word; otherwise, it is the least
significant byte within a word.
@code{WORDS_BIG_ENDIAN}. However, most parts of the compiler treat
floating point values as if they had the same endianness as integer
values. This works because they handle them solely as a collection of
-integer values, with no particular numerical value. Only real.c and
+integer values, with no particular numerical value. Only real.cc and
the runtime libraries care about @code{FLOAT_WORDS_BIG_ENDIAN}.
Thus,
For examples, search for @samp{addcc} and @samp{andcc} in @file{sparc.md}.
@findex pc
-@item (pc)
@cindex program counter
+@item (pc)
This represents the machine's program counter. It has no operands and
may not have a machine mode. @code{(pc)} may be validly used only in
certain specific contexts in jump instructions.
For unsigned widening multiplication, use the same idiom, but with
@code{zero_extend} instead of @code{sign_extend}.
+@findex smul_highpart
+@findex umul_highpart
+@cindex high-part multiplication
+@cindex multiplication high part
+@item (smul_highpart:@var{m} @var{x} @var{y})
+@itemx (umul_highpart:@var{m} @var{x} @var{y})
+Represents the high-part multiplication of @var{x} and @var{y} carried
+out in machine mode @var{m}. @code{smul_highpart} returns the high part
+of a signed multiplication, @code{umul_highpart} returns the high part
+of an unsigned multiplication.
+
@findex fma
+@cindex fused multiply-add
@item (fma:@var{m} @var{x} @var{y} @var{z})
Represents the @code{fma}, @code{fmaf}, and @code{fmal} builtin
functions, which compute @samp{@var{x} * @var{y} + @var{z}}
Represents the value @var{x} with the order of bytes reversed, carried out
in mode @var{m}, which must be a fixed-point machine mode.
The mode of @var{x} must be @var{m} or @code{VOIDmode}.
+
+@findex bitreverse
+@item (bitreverse:@var{m} @var{x})
+Represents the value @var{x} with the order of bits reversed, carried out
+in mode @var{m}, which must be a fixed-point machine mode.
+The mode of @var{x} must be @var{m} or @code{VOIDmode}.
+
+@findex copysign
+@item (copysign:@var{m} @var{x} @var{y})
+Represents the value @var{x} with the sign of @var{y}.
+Both @var{x} and @var{y} must have floating point machine mode @var{m}.
@end table
@node Comparisons
The only place that cares about the distinction between static, global,
and weak alternate entry points, besides the front-end code that creates
them, is the function @code{output_alternate_entry_point}, in
-@file{final.c}.
+@file{final.cc}.
To set the kind of a label, use the @code{SET_LABEL_KIND} macro.
The pass should also tentatively change the pattern of the instruction
to whatever form the pass wants the instruction to have. This should use
-the facilities provided by @file{recog.c}. For example:
+the facilities provided by @file{recog.cc}. For example:
@smallexample
rtl_insn *rtl = insn->rtl ();
instruction or satisfies the requirements of an inline asm:
@smallexample
-if (!rtl_ssa::recog (change))
+if (!rtl_ssa::recog (attempt, change))
return false;
@end smallexample
insn_change_watermark watermark;
// Use validate_change etc. to change INSN's pattern.
@dots{}
-if (!rtl_ssa::recog (change)
+if (!rtl_ssa::recog (attempt, change)
|| !rtl_ssa::change_is_worthwhile (change))
return false;
it might do:
@smallexample
-rtl_ssa::insn_change *changes[] = @{ &change1, change2 @};
+rtl_ssa::insn_change *changes[] = @{ &change1, &change2 @};
@end smallexample
where @code{change1}'s instruction must come before @code{change2}'s.
The way to do this is:
@smallexample
-if (!rtl_ssa::restrict_movement (change, insn_is_changing (changes)))
+if (!rtl_ssa::restrict_movement_ignoring (change, insn_is_changing (changes)))
return false;
@end smallexample
to clobber the flags register). The way to do this is:
@smallexample
-if (!rtl_ssa::recog (change, insn_is_changing (changes)))
+if (!rtl_ssa::recog_ignoring (attempt, change, insn_is_changing (changes)))
return false;
@end smallexample
@smallexample
auto attempt = crtl->ssa->new_change_attempt ();
-rtl_ssa::insn_change change (insn1);
+rtl_ssa::insn_change change1 (insn1);
change1.new_defs = @dots{};
change1.new_uses = @dots{};
change1.move_range = @dots{};
-rtl_ssa::insn_change change (insn2);
+rtl_ssa::insn_change change2 (insn2);
change2.new_defs = @dots{};
change2.new_uses = @dots{};
change2.move_range = @dots{};
-rtl_ssa::insn_change *changes[] = @{ &change1, change2 @};
+rtl_ssa::insn_change *changes[] = @{ &change1, &change2 @};
auto is_changing = insn_is_changing (changes);
-if (!rtl_ssa::restrict_movement (change1, is_changing)
- || !rtl_ssa::restrict_movement (change2, is_changing))
+if (!rtl_ssa::restrict_movement_ignoring (change1, is_changing)
+ || !rtl_ssa::restrict_movement_ignoring (change2, is_changing))
return false;
insn_change_watermark watermark;
// Use validate_change etc. to change INSN1's and INSN2's patterns.
@dots{}
-if (!rtl_ssa::recog (change1, is_changing)
- || !rtl_ssa::recog (change2, is_changing)
+if (!rtl_ssa::recog_ignoring (attempt, change1, is_changing)
+ || !rtl_ssa::recog_ignoring (attempt, change2, is_changing)
|| !rtl_ssa::changes_are_worthwhile (changes)
|| !crtl->ssa->verify_insn_changes (changes))
return false;
@item
During initial RTL generation, shared structure is freely introduced.
After all the RTL for a function has been generated, all shared
-structure is copied by @code{unshare_all_rtl} in @file{emit-rtl.c},
+structure is copied by @code{unshare_all_rtl} in @file{emit-rtl.cc},
after which the above rules are guaranteed to be followed.
@findex copy_rtx_if_shared
To read an RTL object from a file, call @code{read_rtx}. It takes one
argument, a stdio stream, and returns a single RTL object. This routine
-is defined in @file{read-rtl.c}. It is not available in the compiler
+is defined in @file{read-rtl.cc}. It is not available in the compiler
itself, only the various programs that generate the compiler back end
from the machine description.