/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (c) 2010 Cavium Networks, Inc.
*/
/* * Define parameters for the standard MIPS and the microMIPS jump * instruction encoding respectively: * * - the ISA bit of the target, either 0 or 1 respectively, * * - the amount the jump target address is shifted right to fit in the * immediate field of the machine instruction, either 2 or 1, * * - the mask determining the size of the jump region relative to the * delay-slot instruction, either 256MB or 128MB, * * - the jump target alignment, either 4 or 2 bytes.
*/ #define J_ISA_BIT IS_ENABLED(CONFIG_CPU_MICROMIPS) #define J_RANGE_SHIFT (2 - J_ISA_BIT) #define J_RANGE_MASK ((1ul << (26 + J_RANGE_SHIFT)) - 1) #define J_ALIGN_MASK ((1ul << J_RANGE_SHIFT) - 1)
void arch_jump_label_transform(struct jump_entry *e, enum jump_label_type type)
{ union mips_instruction *insn_p; union mips_instruction insn; long offset;
/* * The branch offset must fit in the instruction's 26 * bit field.
*/
WARN_ON((offset >= (long)BIT(25)) ||
(offset < -(long)BIT(25)));
insn.j_format.opcode = bc6_op;
insn.j_format.target = offset;
} else { /* * Jump only works within an aligned region its delay * slot is in.
*/
WARN_ON((e->target & ~J_RANGE_MASK) !=
((e->code + 4) & ~J_RANGE_MASK));
/* if the module doesn't have jump label entries, just return */ if (iter_start == iter_stop) return;
for (iter = iter_start; iter < iter_stop; iter++) { /* Only write NOPs for arch_branch_static(). */ if (jump_label_init_type(iter) == JUMP_LABEL_NOP)
arch_jump_label_transform(iter, JUMP_LABEL_NOP);
}
} #endif
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.18Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.