GCC Middle and Back End API Reference
|
Public Member Functions | |
pieces_addr (rtx, bool, by_pieces_constfn, void *) | |
rtx | adjust (fixed_size_mode, HOST_WIDE_INT, by_pieces_prev *=nullptr) |
void | increment_address (HOST_WIDE_INT) |
void | maybe_predec (HOST_WIDE_INT) |
void | maybe_postinc (HOST_WIDE_INT) |
void | decide_autoinc (machine_mode, bool, HOST_WIDE_INT) |
int | get_addr_inc () |
Private Attributes | |
rtx | m_obj |
rtx | m_addr |
signed char | m_addr_inc |
signed char | m_explicit_inc |
bool | m_auto |
bool | m_is_load |
by_pieces_constfn | m_constfn |
void * | m_cfndata |
Used when performing piecewise block operations, holds information about one of the memory objects involved. The member functions can be used to generate code for loading from the object and updating the address when iterating.
pieces_addr::pieces_addr | ( | rtx | obj, |
bool | is_load, | ||
by_pieces_constfn | constfn, | ||
void * | cfndata ) |
Initialize a pieces_addr structure from an object OBJ. IS_LOAD is true if the operation to be performed on this object is a load rather than a store. For stores, OBJ can be NULL, in which case we assume the operation is a stack push. For loads, the optional CONSTFN and its associated CFNDATA can be used in place of the memory load.
References gcc_assert, GET_CODE, m_addr, m_addr_inc, m_auto, m_explicit_inc, NULL, NULL_RTX, STACK_GROWS_DOWNWARD, and XEXP.
rtx pieces_addr::adjust | ( | fixed_size_mode | mode, |
HOST_WIDE_INT | offset, | ||
by_pieces_prev * | prev = nullptr ) |
Adjust the address to refer to the data at OFFSET in MODE. If we are using autoincrement for this address, we don't add the offset, but we still modify the MEM's properties.
References adjust_address, adjust_automodify_address, m_addr, m_auto, m_cfndata, m_constfn, m_obj, NULL_RTX, and offset.
Referenced by move_by_pieces_d::finish_retmode(), store_by_pieces_d::finish_retmode(), and op_by_pieces_d::run().
void pieces_addr::decide_autoinc | ( | machine_mode | , |
bool | , | ||
HOST_WIDE_INT | ) |
Decide whether to use autoinc for an address involved in a memory op. MODE is the mode of the accesses, REVERSE is true if we've decided to perform the operation starting from the end, and LEN is the length of the operation. Don't override an earlier decision to set m_auto.
References CONSTANT_P, copy_to_mode_reg(), get_address_mode(), m_addr, m_auto, m_explicit_inc, m_is_load, m_obj, NULL_RTX, plus_constant(), USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_DECREMENT, USE_STORE_POST_INCREMENT, and USE_STORE_PRE_DECREMENT.
Referenced by op_by_pieces_d::op_by_pieces_d().
|
inline |
References m_addr_inc.
Referenced by op_by_pieces_d::op_by_pieces_d().
void pieces_addr::increment_address | ( | HOST_WIDE_INT | size | ) |
Emit an add instruction to increment the address by SIZE.
References emit_insn(), gen_add2_insn(), gen_int_mode(), GET_MODE, and m_addr.
Referenced by maybe_postinc(), and maybe_predec().
void pieces_addr::maybe_postinc | ( | HOST_WIDE_INT | size | ) |
If we are supposed to decrement the address after each access, emit code to do so now. Increment by SIZE.
References gcc_assert, HAVE_POST_INCREMENT, increment_address(), and m_explicit_inc.
Referenced by move_by_pieces_d::finish_retmode(), store_by_pieces_d::finish_retmode(), and op_by_pieces_d::run().
void pieces_addr::maybe_predec | ( | HOST_WIDE_INT | size | ) |
If we are supposed to decrement the address after each access, emit code to do so now. Increment by SIZE (which has should have the correct sign already).
References gcc_assert, HAVE_PRE_DECREMENT, increment_address(), and m_explicit_inc.
Referenced by op_by_pieces_d::run().
|
private |
Referenced by adjust(), decide_autoinc(), increment_address(), and pieces_addr().
|
private |
Referenced by get_addr_inc(), and pieces_addr().
|
private |
Referenced by adjust(), decide_autoinc(), and pieces_addr().
|
private |
Referenced by adjust().
|
private |
Referenced by adjust().
|
private |
Referenced by decide_autoinc(), maybe_postinc(), maybe_predec(), and pieces_addr().
|
private |
Referenced by decide_autoinc().
|
private |
Referenced by adjust(), and decide_autoinc().