|
|
accbbf |
diff -rupN binutils.orig/gas/config/tc-i386.c binutils-2.30/gas/config/tc-i386.c
|
|
|
accbbf |
--- binutils.orig/gas/config/tc-i386.c 2019-11-20 10:59:21.586883777 +0000
|
|
|
accbbf |
+++ binutils-2.30/gas/config/tc-i386.c 2019-11-20 15:25:34.197910787 +0000
|
|
|
accbbf |
@@ -392,6 +392,9 @@ struct _i386_insn
|
|
|
accbbf |
|
|
|
accbbf |
/* Error message. */
|
|
|
accbbf |
enum i386_error error;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Has GOTPC relocation. */
|
|
|
accbbf |
+ bfd_boolean has_gotpc_reloc;
|
|
|
accbbf |
};
|
|
|
accbbf |
|
|
|
accbbf |
typedef struct _i386_insn i386_insn;
|
|
|
accbbf |
@@ -521,6 +524,8 @@ static enum flag_code flag_code;
|
|
|
accbbf |
static unsigned int object_64bit;
|
|
|
accbbf |
static unsigned int disallow_64bit_reloc;
|
|
|
accbbf |
static int use_rela_relocations = 0;
|
|
|
accbbf |
+/* __tls_get_addr/___tls_get_addr symbol for TLS. */
|
|
|
accbbf |
+static const char *tls_get_addr;
|
|
|
accbbf |
|
|
|
accbbf |
#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
|
|
|
accbbf |
|| defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
|
|
|
accbbf |
@@ -584,6 +589,21 @@ static int omit_lock_prefix = 0;
|
|
|
accbbf |
"lock addl $0, (%{re}sp)". */
|
|
|
accbbf |
static int avoid_fence = 0;
|
|
|
accbbf |
|
|
|
accbbf |
+/* Type of the previous instruction. */
|
|
|
accbbf |
+static struct
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ segT seg;
|
|
|
accbbf |
+ const char *file;
|
|
|
accbbf |
+ const char *name;
|
|
|
accbbf |
+ unsigned int line;
|
|
|
accbbf |
+ enum last_insn_kind
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ last_insn_other = 0,
|
|
|
accbbf |
+ last_insn_directive,
|
|
|
accbbf |
+ last_insn_prefix
|
|
|
accbbf |
+ } kind;
|
|
|
accbbf |
+} last_insn;
|
|
|
accbbf |
+
|
|
|
accbbf |
/* 1 if the assembler should generate relax relocations. */
|
|
|
accbbf |
|
|
|
accbbf |
static int generate_relax_relocations
|
|
|
accbbf |
@@ -597,6 +617,31 @@ static enum check_kind
|
|
|
accbbf |
}
|
|
|
accbbf |
sse_check, operand_check = check_warning;
|
|
|
accbbf |
|
|
|
accbbf |
+/* Non-zero if branches should be aligned within power of 2 boundary. */
|
|
|
accbbf |
+static int align_branch_power = 0;
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* Types of branches to align. */
|
|
|
accbbf |
+enum align_branch_kind
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ align_branch_none = 0,
|
|
|
accbbf |
+ align_branch_jcc = 1 << 0,
|
|
|
accbbf |
+ align_branch_fused = 1 << 1,
|
|
|
accbbf |
+ align_branch_jmp = 1 << 2,
|
|
|
accbbf |
+ align_branch_call = 1 << 3,
|
|
|
accbbf |
+ align_branch_indirect = 1 << 4,
|
|
|
accbbf |
+ align_branch_ret = 1 << 5
|
|
|
accbbf |
+ };
|
|
|
accbbf |
+
|
|
|
accbbf |
+static unsigned int align_branch = (align_branch_jcc
|
|
|
accbbf |
+ | align_branch_fused
|
|
|
accbbf |
+ | align_branch_jmp);
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* The maximum padding size for fused jcc. */
|
|
|
accbbf |
+#define MAX_FUSED_JCC_PADDING_SIZE 20
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* The maximum number of prefixes added for an instruction. */
|
|
|
accbbf |
+static unsigned int align_branch_prefix_size = 5;
|
|
|
accbbf |
+
|
|
|
accbbf |
/* Register prefix used for error message. */
|
|
|
accbbf |
static const char *register_prefix = "%";
|
|
|
accbbf |
|
|
|
accbbf |
@@ -677,12 +722,19 @@ int x86_cie_data_alignment;
|
|
|
accbbf |
/* Interface to relax_segment.
|
|
|
accbbf |
There are 3 major relax states for 386 jump insns because the
|
|
|
accbbf |
different types of jumps add different sizes to frags when we're
|
|
|
accbbf |
- figuring out what sort of jump to choose to reach a given label. */
|
|
|
accbbf |
+ figuring out what sort of jump to choose to reach a given label.
|
|
|
accbbf |
+
|
|
|
accbbf |
+ BRANCH_PADDING, BRANCH_PREFIX and FUSED_JCC_PADDING are used to align
|
|
|
accbbf |
+ branches which are handled by md_estimate_size_before_relax() and
|
|
|
accbbf |
+ i386_generic_table_relax_frag(). */
|
|
|
accbbf |
|
|
|
accbbf |
/* Types. */
|
|
|
accbbf |
#define UNCOND_JUMP 0
|
|
|
accbbf |
#define COND_JUMP 1
|
|
|
accbbf |
#define COND_JUMP86 2
|
|
|
accbbf |
+#define BRANCH_PADDING 3
|
|
|
accbbf |
+#define BRANCH_PREFIX 4
|
|
|
accbbf |
+#define FUSED_JCC_PADDING 5
|
|
|
accbbf |
|
|
|
accbbf |
/* Sizes. */
|
|
|
accbbf |
#define CODE16 1
|
|
|
accbbf |
@@ -1402,7 +1454,9 @@ i386_align_code (fragS *fragP, int count
|
|
|
accbbf |
patt [padding - 1], padding);
|
|
|
accbbf |
}
|
|
|
accbbf |
}
|
|
|
accbbf |
- fragP->fr_var = count;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (fragP->fr_type != rs_machine_dependent)
|
|
|
accbbf |
+ fragP->fr_var = count;
|
|
|
accbbf |
}
|
|
|
accbbf |
|
|
|
accbbf |
static INLINE int
|
|
|
accbbf |
@@ -2807,6 +2861,11 @@ md_begin (void)
|
|
|
accbbf |
x86_dwarf2_return_column = 8;
|
|
|
accbbf |
x86_cie_data_alignment = -4;
|
|
|
accbbf |
}
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* NB: FUSED_JCC_PADDING frag must have sufficient room so that it
|
|
|
accbbf |
+ can be turned into BRANCH_PREFIX frag. */
|
|
|
accbbf |
+ if (align_branch_prefix_size > MAX_FUSED_JCC_PADDING_SIZE)
|
|
|
accbbf |
+ abort ();
|
|
|
accbbf |
}
|
|
|
accbbf |
|
|
|
accbbf |
void
|
|
|
accbbf |
@@ -3929,6 +3988,17 @@ md_assemble (char *line)
|
|
|
accbbf |
|
|
|
accbbf |
/* We are ready to output the insn. */
|
|
|
accbbf |
output_insn ();
|
|
|
accbbf |
+
|
|
|
accbbf |
+ last_insn.seg = now_seg;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (i.tm.opcode_modifier.isprefix)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ last_insn.kind = last_insn_prefix;
|
|
|
accbbf |
+ last_insn.name = i.tm.name;
|
|
|
accbbf |
+ last_insn.file = as_where (&last_insn.line);
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ last_insn.kind = last_insn_other;
|
|
|
accbbf |
}
|
|
|
accbbf |
|
|
|
accbbf |
static char *
|
|
|
accbbf |
@@ -7162,11 +7232,202 @@ output_interseg_jump (void)
|
|
|
accbbf |
md_number_to_chars (p + size, (valueT) i.op[0].imms->X_add_number, 2);
|
|
|
accbbf |
}
|
|
|
accbbf |
|
|
|
accbbf |
+/* Return TRUE for test, and, cmp, add, sub, inc and dec which may
|
|
|
accbbf |
+ be macro-fused with conditional jumps. */
|
|
|
accbbf |
+
|
|
|
accbbf |
+static bfd_boolean
|
|
|
accbbf |
+maybe_fused_with_jcc_p (void)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ /* No RIP address. */
|
|
|
accbbf |
+ if (i.base_reg && i.base_reg->reg_num == RegRip)
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* and, add, sub with destination register. */
|
|
|
accbbf |
+ if (!strcmp (i.tm.name, "and")
|
|
|
accbbf |
+ || !strcmp (i.tm.name, "add")
|
|
|
accbbf |
+ || !strcmp (i.tm.name, "sub"))
|
|
|
accbbf |
+ return i.types[1].bitfield.reg;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* test, cmp with any register. */
|
|
|
accbbf |
+ if (!strcmp (i.tm.name, "test") || !strcmp (i.tm.name, "cmp"))
|
|
|
accbbf |
+ return (i.types[0].bitfield.reg
|
|
|
accbbf |
+ || i.types[1].bitfield.reg);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* inc, dec with 16/32/64-bit register. */
|
|
|
accbbf |
+ if (!strcmp (i.tm.name, "inc") || !strcmp (i.tm.name, "dec"))
|
|
|
accbbf |
+ return i.types[0].bitfield.reg;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* Return TRUE if a FUSED_JCC_PADDING frag should be generated. */
|
|
|
accbbf |
+
|
|
|
accbbf |
+static bfd_boolean
|
|
|
accbbf |
+add_fused_jcc_padding_frag_p (void)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ if (!align_branch_power
|
|
|
accbbf |
+ || now_seg == absolute_section
|
|
|
accbbf |
+ || !cpu_arch_flags.bitfield.cpui386
|
|
|
accbbf |
+ || !(align_branch & align_branch_fused))
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (maybe_fused_with_jcc_p ())
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (last_insn.kind != last_insn_other
|
|
|
accbbf |
+ && last_insn.seg == now_seg)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (flag_debug)
|
|
|
accbbf |
+ as_warn_where (last_insn.file, last_insn.line,
|
|
|
accbbf |
+ _("`%s` skips -malign-branch-boundary on `%s`"),
|
|
|
accbbf |
+ last_insn.name, i.tm.name);
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ return TRUE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* Return TRUE if a BRANCH_PREFIX frag should be generated. */
|
|
|
accbbf |
+
|
|
|
accbbf |
+static bfd_boolean
|
|
|
accbbf |
+add_branch_prefix_frag_p (void)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ if (!align_branch_power
|
|
|
accbbf |
+ || now_seg == absolute_section
|
|
|
accbbf |
+ || i.tm.cpu_flags.bitfield.cpupadlock
|
|
|
accbbf |
+ || !cpu_arch_flags.bitfield.cpui386)
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Don't add prefix if it is a prefix or there is no operand. */
|
|
|
accbbf |
+ if (!i.operands || i.tm.opcode_modifier.isprefix)
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (last_insn.kind != last_insn_other
|
|
|
accbbf |
+ && last_insn.seg == now_seg)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (flag_debug)
|
|
|
accbbf |
+ as_warn_where (last_insn.file, last_insn.line,
|
|
|
accbbf |
+ _("`%s` skips -malign-branch-boundary on `%s`"),
|
|
|
accbbf |
+ last_insn.name, i.tm.name);
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return TRUE;
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* Return TRUE if a BRANCH_PADDING frag should be generated. */
|
|
|
accbbf |
+
|
|
|
accbbf |
+static int
|
|
|
accbbf |
+add_branch_padding_frag_p (enum align_branch_kind *branch_p)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ bfd_boolean add_padding;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (!align_branch_power
|
|
|
accbbf |
+ || now_seg == absolute_section
|
|
|
accbbf |
+ || !cpu_arch_flags.bitfield.cpui386)
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ add_padding = FALSE;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Check for jcc and direct jmp. */
|
|
|
accbbf |
+ if (i.tm.opcode_modifier.jump)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (i.tm.base_opcode == JUMP_PC_RELATIVE)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ *branch_p = align_branch_jmp;
|
|
|
accbbf |
+ add_padding = align_branch & align_branch_jmp;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ *branch_p = align_branch_jcc;
|
|
|
accbbf |
+ if ((align_branch & align_branch_jcc))
|
|
|
accbbf |
+ add_padding = TRUE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else if (i.tm.base_opcode == 0xc2
|
|
|
accbbf |
+ || i.tm.base_opcode == 0xc3
|
|
|
accbbf |
+ || i.tm.base_opcode == 0xca
|
|
|
accbbf |
+ || i.tm.base_opcode == 0xcb)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ *branch_p = align_branch_ret;
|
|
|
accbbf |
+ if ((align_branch & align_branch_ret))
|
|
|
accbbf |
+ add_padding = TRUE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (i.tm.base_opcode == 0xe8)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ *branch_p = align_branch_call;
|
|
|
accbbf |
+ if ((align_branch & align_branch_call))
|
|
|
accbbf |
+ add_padding = TRUE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else if (i.tm.base_opcode == 0xff
|
|
|
accbbf |
+ && (i.rm.reg == 2 || i.rm.reg == 4))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ *branch_p = align_branch_indirect;
|
|
|
accbbf |
+ if ((align_branch & align_branch_indirect))
|
|
|
accbbf |
+ add_padding = TRUE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Check for indirect jmp, direct and indirect calls. */
|
|
|
accbbf |
+ if (add_padding
|
|
|
accbbf |
+ && i.disp_operands
|
|
|
accbbf |
+ && tls_get_addr
|
|
|
accbbf |
+ && (i.op[0].disps->X_op == O_symbol
|
|
|
accbbf |
+ || (i.op[0].disps->X_op == O_subtract
|
|
|
accbbf |
+ && i.op[0].disps->X_op_symbol == GOT_symbol)))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ symbolS *s = i.op[0].disps->X_add_symbol;
|
|
|
accbbf |
+ /* No padding to call to global or undefined tls_get_addr. */
|
|
|
accbbf |
+ if ((S_IS_EXTERNAL (s) || !S_IS_DEFINED (s))
|
|
|
accbbf |
+ && strcmp (S_GET_NAME (s), tls_get_addr) == 0)
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (add_padding
|
|
|
accbbf |
+ && last_insn.kind != last_insn_other
|
|
|
accbbf |
+ && last_insn.seg == now_seg)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (flag_debug)
|
|
|
accbbf |
+ as_warn_where (last_insn.file, last_insn.line,
|
|
|
accbbf |
+ _("`%s` skips -malign-branch-boundary on `%s`"),
|
|
|
accbbf |
+ last_insn.name, i.tm.name);
|
|
|
accbbf |
+ return FALSE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return add_padding;
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
+static unsigned int
|
|
|
accbbf |
+encoding_length (const fragS *start_frag, offsetT start_off,
|
|
|
accbbf |
+ const char *frag_now_ptr)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ unsigned int len = 0;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (start_frag != frag_now)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ const fragS *fr = start_frag;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ do
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ len += fr->fr_fix;
|
|
|
accbbf |
+ fr = fr->fr_next;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ while (fr && fr != frag_now);
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return len - start_off + (frag_now_ptr - frag_now->fr_literal);
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
static void
|
|
|
accbbf |
output_insn (void)
|
|
|
accbbf |
{
|
|
|
accbbf |
fragS *insn_start_frag;
|
|
|
accbbf |
offsetT insn_start_off;
|
|
|
accbbf |
+ fragS *fragP = NULL;
|
|
|
accbbf |
+ enum align_branch_kind branch = align_branch_none;
|
|
|
accbbf |
|
|
|
accbbf |
/* Tie dwarf2 debug info to the address at the start of the insn.
|
|
|
accbbf |
We can't do this after the insn has been output as the current
|
|
|
accbbf |
@@ -7176,6 +7437,30 @@ output_insn (void)
|
|
|
accbbf |
insn_start_frag = frag_now;
|
|
|
accbbf |
insn_start_off = frag_now_fix ();
|
|
|
accbbf |
|
|
|
accbbf |
+ if (add_branch_padding_frag_p (&branch))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ char *p;
|
|
|
accbbf |
+ unsigned int max_branch_padding_size = 14;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Align section to boundary. */
|
|
|
accbbf |
+ record_alignment (now_seg, align_branch_power);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Make room for padding. */
|
|
|
accbbf |
+ frag_grow (max_branch_padding_size);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Start of the padding. */
|
|
|
accbbf |
+ p = frag_more (0);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ fragP = frag_now;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ frag_var (rs_machine_dependent, max_branch_padding_size, 0,
|
|
|
accbbf |
+ ENCODE_RELAX_STATE (BRANCH_PADDING, 0),
|
|
|
accbbf |
+ NULL, 0, p);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ fragP->tc_frag_data.branch_type = branch;
|
|
|
accbbf |
+ fragP->tc_frag_data.max_bytes = max_branch_padding_size;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
/* Output jumps. */
|
|
|
accbbf |
if (i.tm.opcode_modifier.jump)
|
|
|
accbbf |
output_branch ();
|
|
|
accbbf |
@@ -7217,6 +7502,44 @@ output_insn (void)
|
|
|
accbbf |
i.prefix[LOCK_PREFIX] = 0;
|
|
|
accbbf |
}
|
|
|
accbbf |
|
|
|
accbbf |
+ if (branch)
|
|
|
accbbf |
+ /* Skip if this is a branch. */
|
|
|
accbbf |
+ ;
|
|
|
accbbf |
+ else if (add_fused_jcc_padding_frag_p ())
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ unsigned int max_fused_padding_size
|
|
|
accbbf |
+ = MAX_FUSED_JCC_PADDING_SIZE;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Make room for padding. */
|
|
|
accbbf |
+ frag_grow (max_fused_padding_size);
|
|
|
accbbf |
+ p = frag_more (0);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ fragP = frag_now;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ frag_var (rs_machine_dependent, max_fused_padding_size, 0,
|
|
|
accbbf |
+ ENCODE_RELAX_STATE (FUSED_JCC_PADDING, 0),
|
|
|
accbbf |
+ NULL, 0, p);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ fragP->tc_frag_data.branch_type = align_branch_fused;
|
|
|
accbbf |
+ fragP->tc_frag_data.max_bytes = max_fused_padding_size;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else if (add_branch_prefix_frag_p ())
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ unsigned int max_prefix_size = align_branch_prefix_size;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Make room for padding. */
|
|
|
accbbf |
+ frag_grow (max_prefix_size);
|
|
|
accbbf |
+ p = frag_more (0);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ fragP = frag_now;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ frag_var (rs_machine_dependent, max_prefix_size, 0,
|
|
|
accbbf |
+ ENCODE_RELAX_STATE (BRANCH_PREFIX, 0),
|
|
|
accbbf |
+ NULL, 0, p);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ fragP->tc_frag_data.max_bytes = max_prefix_size;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
/* Since the VEX/EVEX prefix contains the implicit prefix, we
|
|
|
accbbf |
don't need the explicit prefix. */
|
|
|
accbbf |
if (!i.tm.opcode_modifier.vex && !i.tm.opcode_modifier.evex)
|
|
|
accbbf |
@@ -7358,6 +7681,83 @@ check_prefix:
|
|
|
accbbf |
|
|
|
accbbf |
if (i.imm_operands)
|
|
|
accbbf |
output_imm (insn_start_frag, insn_start_off);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (now_seg != absolute_section)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ j = encoding_length (insn_start_frag, insn_start_off, frag_more (0));
|
|
|
accbbf |
+ if (fragP)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* NB: Don't add prefix with GOTPC relocation since
|
|
|
accbbf |
+ output_disp() above depends on the fixed encoding
|
|
|
accbbf |
+ length. */
|
|
|
accbbf |
+ unsigned int max = i.has_gotpc_reloc ? 0 : 15 - j;
|
|
|
accbbf |
+ /* Prefix count on the current instruction. */
|
|
|
accbbf |
+ unsigned int count = 0;
|
|
|
accbbf |
+ unsigned int k;
|
|
|
accbbf |
+ for (k = 0; k < ARRAY_SIZE (i.prefix); k++)
|
|
|
accbbf |
+ if (i.prefix[k])
|
|
|
accbbf |
+ count++;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* NB: prefix count + instruction size must be <= 15. */
|
|
|
accbbf |
+ if (j > 15)
|
|
|
accbbf |
+ as_fatal (_("instruction length of %u bytes exceeds the limit of 15"),
|
|
|
accbbf |
+ j);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype)
|
|
|
accbbf |
+ == BRANCH_PREFIX)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* Set the maximum prefix size in BRANCH_PREFIX
|
|
|
accbbf |
+ frag. */
|
|
|
accbbf |
+ if (fragP->tc_frag_data.max_bytes > max)
|
|
|
accbbf |
+ fragP->tc_frag_data.max_bytes = max;
|
|
|
accbbf |
+ if (fragP->tc_frag_data.max_bytes > count)
|
|
|
accbbf |
+ fragP->tc_frag_data.max_bytes -= count;
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ fragP->tc_frag_data.max_bytes = 0;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* Remember the maximum prefix size in FUSED_JCC_PADDING
|
|
|
accbbf |
+ frag. */
|
|
|
accbbf |
+ unsigned int max_prefix_size;
|
|
|
accbbf |
+ if (align_branch_prefix_size > max)
|
|
|
accbbf |
+ max_prefix_size = max;
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ max_prefix_size = align_branch_prefix_size;
|
|
|
accbbf |
+ if (max_prefix_size > count)
|
|
|
accbbf |
+ fragP->tc_frag_data.max_prefix_length
|
|
|
accbbf |
+ = max_prefix_size - count;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Use existing segment prefix if possible. Use CS
|
|
|
accbbf |
+ segment prefix in 64-bit mode. In 32-bit mode, use SS
|
|
|
accbbf |
+ segment prefix with ESP/EBP base register and use DS
|
|
|
accbbf |
+ segment prefix without ESP/EBP base register. */
|
|
|
accbbf |
+ if (i.prefix[SEG_PREFIX])
|
|
|
accbbf |
+ fragP->tc_frag_data.default_prefix = i.prefix[SEG_PREFIX];
|
|
|
accbbf |
+ else if (flag_code == CODE_64BIT)
|
|
|
accbbf |
+ fragP->tc_frag_data.default_prefix = CS_PREFIX_OPCODE;
|
|
|
accbbf |
+ else if (i.base_reg
|
|
|
accbbf |
+ && (i.base_reg->reg_num == 4
|
|
|
accbbf |
+ || i.base_reg->reg_num == 5))
|
|
|
accbbf |
+ fragP->tc_frag_data.default_prefix = SS_PREFIX_OPCODE;
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ fragP->tc_frag_data.default_prefix = DS_PREFIX_OPCODE;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else if (j > 15)
|
|
|
accbbf |
+ as_warn (_("instruction length of %u bytes exceeds the limit of 15"),
|
|
|
accbbf |
+ j);
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (align_branch_power
|
|
|
accbbf |
+ && now_seg != absolute_section
|
|
|
accbbf |
+ && cpu_arch_flags.bitfield.cpui386)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* Terminate each frag so that we can add prefix and check for
|
|
|
accbbf |
+ fused jcc. */
|
|
|
accbbf |
+ frag_wane (frag_now);
|
|
|
accbbf |
+ frag_new (0);
|
|
|
accbbf |
}
|
|
|
accbbf |
|
|
|
accbbf |
#ifdef DEBUG386
|
|
|
accbbf |
@@ -7484,6 +7884,7 @@ output_disp (fragS *insn_start_frag, off
|
|
|
accbbf |
{
|
|
|
accbbf |
reloc_type = BFD_RELOC_386_GOTPC;
|
|
|
accbbf |
i.op[n].imms->X_add_number += add;
|
|
|
accbbf |
+ i.has_gotpc_reloc = TRUE;
|
|
|
accbbf |
}
|
|
|
accbbf |
else if (reloc_type == BFD_RELOC_64)
|
|
|
accbbf |
reloc_type = BFD_RELOC_X86_64_GOTPC64;
|
|
|
accbbf |
@@ -7649,6 +8050,7 @@ output_imm (fragS *insn_start_frag, offs
|
|
|
accbbf |
reloc_type = BFD_RELOC_X86_64_GOTPC32;
|
|
|
accbbf |
else if (size == 8)
|
|
|
accbbf |
reloc_type = BFD_RELOC_X86_64_GOTPC64;
|
|
|
accbbf |
+ i.has_gotpc_reloc = TRUE;
|
|
|
accbbf |
i.op[n].imms->X_add_number += add;
|
|
|
accbbf |
}
|
|
|
accbbf |
fix_new_exp (frag_now, p - frag_now->fr_literal, size,
|
|
|
accbbf |
@@ -9264,6 +9666,355 @@ elf_symbol_resolved_in_segment_p (symbol
|
|
|
accbbf |
}
|
|
|
accbbf |
#endif
|
|
|
accbbf |
|
|
|
accbbf |
+/* Return the next non-empty frag. */
|
|
|
accbbf |
+
|
|
|
accbbf |
+static fragS *
|
|
|
accbbf |
+i386_next_non_empty_frag (fragS *fragP)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ /* There may be a frag with a ".fill 0" when there is no room in
|
|
|
accbbf |
+ the current frag for frag_grow in output_insn. */
|
|
|
accbbf |
+ for (fragP = fragP->fr_next;
|
|
|
accbbf |
+ (fragP != NULL
|
|
|
accbbf |
+ && fragP->fr_type == rs_fill
|
|
|
accbbf |
+ && fragP->fr_fix == 0);
|
|
|
accbbf |
+ fragP = fragP->fr_next)
|
|
|
accbbf |
+ ;
|
|
|
accbbf |
+ return fragP;
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* Return the next jcc frag after BRANCH_PADDING. */
|
|
|
accbbf |
+
|
|
|
accbbf |
+static fragS *
|
|
|
accbbf |
+i386_next_jcc_frag (fragS *fragP)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ if (!fragP)
|
|
|
accbbf |
+ return NULL;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (fragP->fr_type == rs_machine_dependent
|
|
|
accbbf |
+ && (TYPE_FROM_RELAX_STATE (fragP->fr_subtype)
|
|
|
accbbf |
+ == BRANCH_PADDING))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ fragP = i386_next_non_empty_frag (fragP);
|
|
|
accbbf |
+ if (fragP->fr_type != rs_machine_dependent)
|
|
|
accbbf |
+ return NULL;
|
|
|
accbbf |
+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == COND_JUMP)
|
|
|
accbbf |
+ return fragP;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return NULL;
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* Classify BRANCH_PADDING, BRANCH_PREFIX and FUSED_JCC_PADDING frags. */
|
|
|
accbbf |
+
|
|
|
accbbf |
+static void
|
|
|
accbbf |
+i386_classify_machine_dependent_frag (fragS *fragP)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ fragS *cmp_fragP;
|
|
|
accbbf |
+ fragS *pad_fragP;
|
|
|
accbbf |
+ fragS *branch_fragP;
|
|
|
accbbf |
+ fragS *next_fragP;
|
|
|
accbbf |
+ unsigned int max_prefix_length;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (fragP->tc_frag_data.classified)
|
|
|
accbbf |
+ return;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* First scan for BRANCH_PADDING and FUSED_JCC_PADDING. Convert
|
|
|
accbbf |
+ FUSED_JCC_PADDING and merge BRANCH_PADDING. */
|
|
|
accbbf |
+ for (next_fragP = fragP;
|
|
|
accbbf |
+ next_fragP != NULL;
|
|
|
accbbf |
+ next_fragP = next_fragP->fr_next)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ next_fragP->tc_frag_data.classified = 1;
|
|
|
accbbf |
+ if (next_fragP->fr_type == rs_machine_dependent)
|
|
|
accbbf |
+ switch (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ case BRANCH_PADDING:
|
|
|
accbbf |
+ /* The BRANCH_PADDING frag must be followed by a branch
|
|
|
accbbf |
+ frag. */
|
|
|
accbbf |
+ branch_fragP = i386_next_non_empty_frag (next_fragP);
|
|
|
accbbf |
+ next_fragP->tc_frag_data.u.branch_fragP = branch_fragP;
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case FUSED_JCC_PADDING:
|
|
|
accbbf |
+ /* Check if this is a fused jcc:
|
|
|
accbbf |
+ FUSED_JCC_PADDING
|
|
|
accbbf |
+ CMP
|
|
|
accbbf |
+ BRANCH_PADDING
|
|
|
accbbf |
+ COND_JUMP
|
|
|
accbbf |
+ */
|
|
|
accbbf |
+ cmp_fragP = i386_next_non_empty_frag (next_fragP);
|
|
|
accbbf |
+ pad_fragP = i386_next_non_empty_frag (cmp_fragP);
|
|
|
accbbf |
+ branch_fragP = i386_next_jcc_frag (pad_fragP);
|
|
|
accbbf |
+ if (branch_fragP)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* The BRANCH_PADDING frag is merged with the
|
|
|
accbbf |
+ FUSED_JCC_PADDING frag. */
|
|
|
accbbf |
+ next_fragP->tc_frag_data.u.branch_fragP = branch_fragP;
|
|
|
accbbf |
+ /* CMP instruction size. */
|
|
|
accbbf |
+ next_fragP->tc_frag_data.cmp_size = cmp_fragP->fr_fix;
|
|
|
accbbf |
+ frag_wane (pad_fragP);
|
|
|
accbbf |
+ /* Skip to branch_fragP. */
|
|
|
accbbf |
+ next_fragP = branch_fragP;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else if (next_fragP->tc_frag_data.max_prefix_length)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* Turn FUSED_JCC_PADDING into BRANCH_PREFIX if it isn't
|
|
|
accbbf |
+ a fused jcc. */
|
|
|
accbbf |
+ next_fragP->fr_subtype
|
|
|
accbbf |
+ = ENCODE_RELAX_STATE (BRANCH_PREFIX, 0);
|
|
|
accbbf |
+ next_fragP->tc_frag_data.max_bytes
|
|
|
accbbf |
+ = next_fragP->tc_frag_data.max_prefix_length;
|
|
|
accbbf |
+ /* This will be updated in the BRANCH_PREFIX scan. */
|
|
|
accbbf |
+ next_fragP->tc_frag_data.max_prefix_length = 0;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ frag_wane (next_fragP);
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Scan for BRANCH_PREFIX. */
|
|
|
accbbf |
+ for (; fragP != NULL; fragP = fragP->fr_next)
|
|
|
accbbf |
+ if (fragP->fr_type == rs_machine_dependent
|
|
|
accbbf |
+ && (TYPE_FROM_RELAX_STATE (fragP->fr_subtype)
|
|
|
accbbf |
+ == BRANCH_PREFIX))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* Count all BRANCH_PREFIX frags before BRANCH_PADDING and
|
|
|
accbbf |
+ COND_JUMP_PREFIX. */
|
|
|
accbbf |
+ max_prefix_length = 0;
|
|
|
accbbf |
+ for (next_fragP = fragP;
|
|
|
accbbf |
+ next_fragP != NULL;
|
|
|
accbbf |
+ next_fragP = next_fragP->fr_next)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (next_fragP->fr_type == rs_fill)
|
|
|
accbbf |
+ /* Skip rs_fill frags. */
|
|
|
accbbf |
+ ;
|
|
|
accbbf |
+ else if (next_fragP->fr_type == rs_machine_dependent)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype)
|
|
|
accbbf |
+ == BRANCH_PREFIX)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* Count BRANCH_PREFIX frags. */
|
|
|
accbbf |
+ if (max_prefix_length >= MAX_FUSED_JCC_PADDING_SIZE)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ max_prefix_length = MAX_FUSED_JCC_PADDING_SIZE;
|
|
|
accbbf |
+ frag_wane (next_fragP);
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ max_prefix_length
|
|
|
accbbf |
+ += next_fragP->tc_frag_data.max_bytes;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else if ((TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype)
|
|
|
accbbf |
+ == BRANCH_PADDING)
|
|
|
accbbf |
+ || (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype)
|
|
|
accbbf |
+ == FUSED_JCC_PADDING))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* Stop at BRANCH_PADDING and FUSED_JCC_PADDING. */
|
|
|
accbbf |
+ fragP->tc_frag_data.u.padding_fragP = next_fragP;
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ /* Stop for other rs_machine_dependent frags. */
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ /* Stop for all other frags. */
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ fragP->tc_frag_data.max_prefix_length = max_prefix_length;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Skip to the next frag. */
|
|
|
accbbf |
+ fragP = next_fragP;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* Compute padding size for
|
|
|
accbbf |
+
|
|
|
accbbf |
+ FUSED_JCC_PADDING
|
|
|
accbbf |
+ CMP
|
|
|
accbbf |
+ BRANCH_PADDING
|
|
|
accbbf |
+ COND_JUMP/UNCOND_JUMP
|
|
|
accbbf |
+
|
|
|
accbbf |
+ or
|
|
|
accbbf |
+
|
|
|
accbbf |
+ BRANCH_PADDING
|
|
|
accbbf |
+ COND_JUMP/UNCOND_JUMP
|
|
|
accbbf |
+ */
|
|
|
accbbf |
+
|
|
|
accbbf |
+static int
|
|
|
accbbf |
+i386_branch_padding_size (fragS *fragP, offsetT address)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ unsigned int offset, size, padding_size;
|
|
|
accbbf |
+ fragS *branch_fragP = fragP->tc_frag_data.u.branch_fragP;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* The start address of the BRANCH_PADDING or FUSED_JCC_PADDING frag. */
|
|
|
accbbf |
+ if (!address)
|
|
|
accbbf |
+ address = fragP->fr_address;
|
|
|
accbbf |
+ address += fragP->fr_fix;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* CMP instrunction size. */
|
|
|
accbbf |
+ size = fragP->tc_frag_data.cmp_size;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* The base size of the branch frag. */
|
|
|
accbbf |
+ size += branch_fragP->fr_fix;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Add opcode and displacement bytes for the rs_machine_dependent
|
|
|
accbbf |
+ branch frag. */
|
|
|
accbbf |
+ if (branch_fragP->fr_type == rs_machine_dependent)
|
|
|
accbbf |
+ size += md_relax_table[branch_fragP->fr_subtype].rlx_length;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Check if branch is within boundary and doesn't end at the last
|
|
|
accbbf |
+ byte. */
|
|
|
accbbf |
+ offset = address & ((1U << align_branch_power) - 1);
|
|
|
accbbf |
+ if ((offset + size) >= (1U << align_branch_power))
|
|
|
accbbf |
+ /* Padding needed to avoid crossing boundary. */
|
|
|
accbbf |
+ padding_size = (1 << align_branch_power) - offset;
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ /* No padding needed. */
|
|
|
accbbf |
+ padding_size = 0;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (!fits_in_signed_byte (padding_size))
|
|
|
accbbf |
+ abort ();
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return padding_size;
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
+/* i386_generic_table_relax_frag()
|
|
|
accbbf |
+
|
|
|
accbbf |
+ Handle BRANCH_PADDING, BRANCH_PREFIX and FUSED_JCC_PADDING frags to
|
|
|
accbbf |
+ grow/shrink padding to align branch frags. Hand others to
|
|
|
accbbf |
+ relax_frag(). */
|
|
|
accbbf |
+
|
|
|
accbbf |
+long
|
|
|
accbbf |
+i386_generic_table_relax_frag (segT segment, fragS *fragP, long stretch)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING
|
|
|
accbbf |
+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ long padding_size = i386_branch_padding_size (fragP, 0);
|
|
|
accbbf |
+ long grow = padding_size - fragP->tc_frag_data.length;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* When the BRANCH_PREFIX frag is used, the computed address
|
|
|
accbbf |
+ must match the actual address and there should be no padding. */
|
|
|
accbbf |
+ if (fragP->tc_frag_data.padding_address
|
|
|
accbbf |
+ && (fragP->tc_frag_data.padding_address != fragP->fr_address
|
|
|
accbbf |
+ || padding_size))
|
|
|
accbbf |
+ abort ();
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Update the padding size. */
|
|
|
accbbf |
+ if (grow)
|
|
|
accbbf |
+ fragP->tc_frag_data.length = padding_size;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return grow;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ fragS *padding_fragP, *next_fragP;
|
|
|
accbbf |
+ long padding_size, left_size, last_size;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ padding_fragP = fragP->tc_frag_data.u.padding_fragP;
|
|
|
accbbf |
+ if (!padding_fragP)
|
|
|
accbbf |
+ /* Use the padding set by the leading BRANCH_PREFIX frag. */
|
|
|
accbbf |
+ return (fragP->tc_frag_data.length
|
|
|
accbbf |
+ - fragP->tc_frag_data.last_length);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Compute the relative address of the padding frag in the very
|
|
|
accbbf |
+ first time where the BRANCH_PREFIX frag sizes are zero. */
|
|
|
accbbf |
+ if (!fragP->tc_frag_data.padding_address)
|
|
|
accbbf |
+ fragP->tc_frag_data.padding_address
|
|
|
accbbf |
+ = padding_fragP->fr_address - (fragP->fr_address - stretch);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* First update the last length from the previous interation. */
|
|
|
accbbf |
+ left_size = fragP->tc_frag_data.prefix_length;
|
|
|
accbbf |
+ for (next_fragP = fragP;
|
|
|
accbbf |
+ next_fragP != padding_fragP;
|
|
|
accbbf |
+ next_fragP = next_fragP->fr_next)
|
|
|
accbbf |
+ if (next_fragP->fr_type == rs_machine_dependent
|
|
|
accbbf |
+ && (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype)
|
|
|
accbbf |
+ == BRANCH_PREFIX))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (left_size)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ int max = next_fragP->tc_frag_data.max_bytes;
|
|
|
accbbf |
+ if (max)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ int size;
|
|
|
accbbf |
+ if (max > left_size)
|
|
|
accbbf |
+ size = left_size;
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ size = max;
|
|
|
accbbf |
+ left_size -= size;
|
|
|
accbbf |
+ next_fragP->tc_frag_data.last_length = size;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ next_fragP->tc_frag_data.last_length = 0;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Check the padding size for the padding frag. */
|
|
|
accbbf |
+ padding_size = i386_branch_padding_size
|
|
|
accbbf |
+ (padding_fragP, (fragP->fr_address
|
|
|
accbbf |
+ + fragP->tc_frag_data.padding_address));
|
|
|
accbbf |
+
|
|
|
accbbf |
+ last_size = fragP->tc_frag_data.prefix_length;
|
|
|
accbbf |
+ /* Check if there is change from the last interation. */
|
|
|
accbbf |
+ if (padding_size == last_size)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* Update the expected address of the padding frag. */
|
|
|
accbbf |
+ padding_fragP->tc_frag_data.padding_address
|
|
|
accbbf |
+ = (fragP->fr_address + padding_size
|
|
|
accbbf |
+ + fragP->tc_frag_data.padding_address);
|
|
|
accbbf |
+ return 0;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (padding_size > fragP->tc_frag_data.max_prefix_length)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* No padding if there is no sufficient room. Clear the
|
|
|
accbbf |
+ expected address of the padding frag. */
|
|
|
accbbf |
+ padding_fragP->tc_frag_data.padding_address = 0;
|
|
|
accbbf |
+ padding_size = 0;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ /* Store the expected address of the padding frag. */
|
|
|
accbbf |
+ padding_fragP->tc_frag_data.padding_address
|
|
|
accbbf |
+ = (fragP->fr_address + padding_size
|
|
|
accbbf |
+ + fragP->tc_frag_data.padding_address);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ fragP->tc_frag_data.prefix_length = padding_size;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ /* Update the length for the current interation. */
|
|
|
accbbf |
+ left_size = padding_size;
|
|
|
accbbf |
+ for (next_fragP = fragP;
|
|
|
accbbf |
+ next_fragP != padding_fragP;
|
|
|
accbbf |
+ next_fragP = next_fragP->fr_next)
|
|
|
accbbf |
+ if (next_fragP->fr_type == rs_machine_dependent
|
|
|
accbbf |
+ && (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype)
|
|
|
accbbf |
+ == BRANCH_PREFIX))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (left_size)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ int max = next_fragP->tc_frag_data.max_bytes;
|
|
|
accbbf |
+ if (max)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ int size;
|
|
|
accbbf |
+ if (max > left_size)
|
|
|
accbbf |
+ size = left_size;
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ size = max;
|
|
|
accbbf |
+ left_size -= size;
|
|
|
accbbf |
+ next_fragP->tc_frag_data.length = size;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ next_fragP->tc_frag_data.length = 0;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return (fragP->tc_frag_data.length
|
|
|
accbbf |
+ - fragP->tc_frag_data.last_length);
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ return relax_frag (segment, fragP, stretch);
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
/* md_estimate_size_before_relax()
|
|
|
accbbf |
|
|
|
accbbf |
Called just before relax() for rs_machine_dependent frags. The x86
|
|
|
accbbf |
@@ -9280,6 +10031,14 @@ elf_symbol_resolved_in_segment_p (symbol
|
|
|
accbbf |
int
|
|
|
accbbf |
md_estimate_size_before_relax (fragS *fragP, segT segment)
|
|
|
accbbf |
{
|
|
|
accbbf |
+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING
|
|
|
accbbf |
+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX
|
|
|
accbbf |
+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ i386_classify_machine_dependent_frag (fragP);
|
|
|
accbbf |
+ return fragP->tc_frag_data.length;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
/* We've already got fragP->fr_subtype right; all we have to do is
|
|
|
accbbf |
check for un-relaxable symbols. On an ELF system, we can't relax
|
|
|
accbbf |
an externally visible symbol, because it may be overridden by a
|
|
|
accbbf |
@@ -9409,6 +10168,109 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNU
|
|
|
accbbf |
unsigned int extension = 0;
|
|
|
accbbf |
offsetT displacement_from_opcode_start;
|
|
|
accbbf |
|
|
|
accbbf |
+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING
|
|
|
accbbf |
+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING
|
|
|
accbbf |
+ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ /* Generate nop padding. */
|
|
|
accbbf |
+ unsigned int size = fragP->tc_frag_data.length;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (size == 0)
|
|
|
accbbf |
+ return;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (size > fragP->tc_frag_data.max_bytes)
|
|
|
accbbf |
+ abort ();
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (flag_debug)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ const char *msg;
|
|
|
accbbf |
+ const char *branch = "branch";
|
|
|
accbbf |
+ const char *prefix = "";
|
|
|
accbbf |
+ fragS *padding_fragP;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype)
|
|
|
accbbf |
+ == BRANCH_PREFIX)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ padding_fragP = fragP->tc_frag_data.u.padding_fragP;
|
|
|
accbbf |
+ switch (fragP->tc_frag_data.default_prefix)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ default:
|
|
|
accbbf |
+ abort ();
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case CS_PREFIX_OPCODE:
|
|
|
accbbf |
+ prefix = " cs";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case DS_PREFIX_OPCODE:
|
|
|
accbbf |
+ prefix = " ds";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case ES_PREFIX_OPCODE:
|
|
|
accbbf |
+ prefix = " es";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case FS_PREFIX_OPCODE:
|
|
|
accbbf |
+ prefix = " fs";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case GS_PREFIX_OPCODE:
|
|
|
accbbf |
+ prefix = " gs";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case SS_PREFIX_OPCODE:
|
|
|
accbbf |
+ prefix = " ss";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ if (padding_fragP)
|
|
|
accbbf |
+ msg = _("%s:%u: add %d%s at 0x%llx to align "
|
|
|
accbbf |
+ "%s within %d-byte boundary\n");
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ msg = _("%s:%u: add additional %d%s at 0x%llx to "
|
|
|
accbbf |
+ "align %s within %d-byte boundary\n");
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ padding_fragP = fragP;
|
|
|
accbbf |
+ msg = _("%s:%u: add %d%s-byte nop at 0x%llx to align "
|
|
|
accbbf |
+ "%s within %d-byte boundary\n");
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (padding_fragP)
|
|
|
accbbf |
+ switch (padding_fragP->tc_frag_data.branch_type)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ case align_branch_jcc:
|
|
|
accbbf |
+ branch = "jcc";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case align_branch_fused:
|
|
|
accbbf |
+ branch = "fused jcc";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case align_branch_jmp:
|
|
|
accbbf |
+ branch = "jmp";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case align_branch_call:
|
|
|
accbbf |
+ branch = "call";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case align_branch_indirect:
|
|
|
accbbf |
+ branch = "indiret branch";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ case align_branch_ret:
|
|
|
accbbf |
+ branch = "ret";
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ default:
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ fprintf (stdout, msg,
|
|
|
accbbf |
+ fragP->fr_file, fragP->fr_line, size, prefix,
|
|
|
accbbf |
+ (long long) fragP->fr_address, branch,
|
|
|
accbbf |
+ 1 << align_branch_power);
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX)
|
|
|
accbbf |
+ memset (fragP->fr_opcode,
|
|
|
accbbf |
+ fragP->tc_frag_data.default_prefix, size);
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ i386_align_code (fragP, size);
|
|
|
accbbf |
+ fragP->fr_fix += size;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ return;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
opcode = (unsigned char *) fragP->fr_opcode;
|
|
|
accbbf |
|
|
|
accbbf |
/* Address we want to reach in file space. */
|
|
|
accbbf |
@@ -9963,6 +10825,10 @@ const char *md_shortopts = "qn";
|
|
|
accbbf |
#define OPTION_MINTEL64 (OPTION_MD_BASE + 23)
|
|
|
accbbf |
#define OPTION_MFENCE_AS_LOCK_ADD (OPTION_MD_BASE + 24)
|
|
|
accbbf |
#define OPTION_MRELAX_RELOCATIONS (OPTION_MD_BASE + 25)
|
|
|
accbbf |
+#define OPTION_MALIGN_BRANCH_BOUNDARY (OPTION_MD_BASE + 27)
|
|
|
accbbf |
+#define OPTION_MALIGN_BRANCH_PREFIX_SIZE (OPTION_MD_BASE + 28)
|
|
|
accbbf |
+#define OPTION_MALIGN_BRANCH (OPTION_MD_BASE + 29)
|
|
|
accbbf |
+#define OPTION_MBRANCHES_WITH_32B_BOUNDARIES (OPTION_MD_BASE + 30)
|
|
|
accbbf |
|
|
|
accbbf |
struct option md_longopts[] =
|
|
|
accbbf |
{
|
|
|
accbbf |
@@ -9997,6 +10863,10 @@ struct option md_longopts[] =
|
|
|
accbbf |
{"mfence-as-lock-add", required_argument, NULL, OPTION_MFENCE_AS_LOCK_ADD},
|
|
|
accbbf |
{"mrelax-relocations", required_argument, NULL, OPTION_MRELAX_RELOCATIONS},
|
|
|
accbbf |
{"mevexrcig", required_argument, NULL, OPTION_MEVEXRCIG},
|
|
|
accbbf |
+ {"malign-branch-boundary", required_argument, NULL, OPTION_MALIGN_BRANCH_BOUNDARY},
|
|
|
accbbf |
+ {"malign-branch-prefix-size", required_argument, NULL, OPTION_MALIGN_BRANCH_PREFIX_SIZE},
|
|
|
accbbf |
+ {"malign-branch", required_argument, NULL, OPTION_MALIGN_BRANCH},
|
|
|
accbbf |
+ {"mbranches-within-32B-boundaries", no_argument, NULL, OPTION_MBRANCHES_WITH_32B_BOUNDARIES},
|
|
|
accbbf |
{"mamd64", no_argument, NULL, OPTION_MAMD64},
|
|
|
accbbf |
{"mintel64", no_argument, NULL, OPTION_MINTEL64},
|
|
|
accbbf |
{NULL, no_argument, NULL, 0}
|
|
|
accbbf |
@@ -10007,7 +10877,7 @@ int
|
|
|
accbbf |
md_parse_option (int c, const char *arg)
|
|
|
accbbf |
{
|
|
|
accbbf |
unsigned int j;
|
|
|
accbbf |
- char *arch, *next, *saved;
|
|
|
accbbf |
+ char *arch, *next, *saved, *type;
|
|
|
accbbf |
|
|
|
accbbf |
switch (c)
|
|
|
accbbf |
{
|
|
|
accbbf |
@@ -10110,6 +10980,82 @@ md_parse_option (int c, const char *arg)
|
|
|
accbbf |
#endif
|
|
|
accbbf |
break;
|
|
|
accbbf |
|
|
|
accbbf |
+ case OPTION_MALIGN_BRANCH_BOUNDARY:
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ char *end;
|
|
|
accbbf |
+ int align = strtoul (arg, &end, 0);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (*end == '\0')
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ if (align == 0)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ align_branch_power = 0;
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ else if (align >= 32)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ int align_power;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ for (align_power = 0;
|
|
|
accbbf |
+ (align & 1) == 0;
|
|
|
accbbf |
+ align >>= 1, align_power++)
|
|
|
accbbf |
+ continue;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (align == 1)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ align_branch_power = align_power;
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ as_fatal (_("invalid -malign-branch-boundary= value: %s"), arg);
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ case OPTION_MALIGN_BRANCH_PREFIX_SIZE:
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ char *end;
|
|
|
accbbf |
+ int align = strtoul (arg, &end, 0);
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if (*end == '\0' && align >= 0 && align < 6)
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ align_branch_prefix_size = align;
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ as_fatal (_("invalid -malign-branch-prefix-size= value: %s"),
|
|
|
accbbf |
+ arg);
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+
|
|
|
accbbf |
+ case OPTION_MALIGN_BRANCH:
|
|
|
accbbf |
+ align_branch = 0;
|
|
|
accbbf |
+ saved = xstrdup (arg);
|
|
|
accbbf |
+ type = saved;
|
|
|
accbbf |
+ do
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ next = strchr (type, '+');
|
|
|
accbbf |
+ if (next)
|
|
|
accbbf |
+ *next++ = '\0';
|
|
|
accbbf |
+ if (strcasecmp (type, "jcc") == 0)
|
|
|
accbbf |
+ align_branch |= align_branch_jcc;
|
|
|
accbbf |
+ else if (strcasecmp (type, "fused") == 0)
|
|
|
accbbf |
+ align_branch |= align_branch_fused;
|
|
|
accbbf |
+ else if (strcasecmp (type, "jmp") == 0)
|
|
|
accbbf |
+ align_branch |= align_branch_jmp;
|
|
|
accbbf |
+ else if (strcasecmp (type, "call") == 0)
|
|
|
accbbf |
+ align_branch |= align_branch_call;
|
|
|
accbbf |
+ else if (strcasecmp (type, "ret") == 0)
|
|
|
accbbf |
+ align_branch |= align_branch_ret;
|
|
|
accbbf |
+ else if (strcasecmp (type, "indirect") == 0)
|
|
|
accbbf |
+ align_branch |= align_branch_indirect;
|
|
|
accbbf |
+ else
|
|
|
accbbf |
+ as_fatal (_("invalid -malign-branch= option: `%s'"), arg);
|
|
|
accbbf |
+ type = next;
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+ while (next != NULL);
|
|
|
accbbf |
+ free (saved);
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+
|
|
|
accbbf |
case OPTION_MARCH:
|
|
|
accbbf |
saved = xstrdup (arg);
|
|
|
accbbf |
arch = saved;
|
|
|
accbbf |
@@ -10363,6 +11309,14 @@ md_parse_option (int c, const char *arg)
|
|
|
accbbf |
as_fatal (_("invalid -mrelax-relocations= option: `%s'"), arg);
|
|
|
accbbf |
break;
|
|
|
accbbf |
|
|
|
accbbf |
+ case OPTION_MBRANCHES_WITH_32B_BOUNDARIES:
|
|
|
accbbf |
+ align_branch_power = 5;
|
|
|
accbbf |
+ align_branch_prefix_size = 5;
|
|
|
accbbf |
+ align_branch = (align_branch_jcc
|
|
|
accbbf |
+ | align_branch_fused
|
|
|
accbbf |
+ | align_branch_jmp);
|
|
|
accbbf |
+ break;
|
|
|
accbbf |
+
|
|
|
accbbf |
case OPTION_MAMD64:
|
|
|
accbbf |
intel64 = 0;
|
|
|
accbbf |
break;
|
|
|
accbbf |
@@ -10567,6 +11521,20 @@ md_show_usage (FILE *stream)
|
|
|
accbbf |
-mrelax-relocations=[no|yes]\n\
|
|
|
accbbf |
generate relax relocations\n"));
|
|
|
accbbf |
fprintf (stream, _("\
|
|
|
accbbf |
+ -malign-branch-boundary=NUM (default: 0)\n\
|
|
|
accbbf |
+ align branches within NUM byte boundary\n"));
|
|
|
accbbf |
+ fprintf (stream, _("\
|
|
|
accbbf |
+ -malign-branch=TYPE[+TYPE...] (default: jcc+fused+jmp)\n\
|
|
|
accbbf |
+ TYPE is combination of jcc, fused, jmp, call, ret,\n\
|
|
|
accbbf |
+ indirect\n\
|
|
|
accbbf |
+ specify types of branches to align\n"));
|
|
|
accbbf |
+ fprintf (stream, _("\
|
|
|
accbbf |
+ -malign-branch-prefix-size=NUM (default: 5)\n\
|
|
|
accbbf |
+ align branches with NUM prefixes per instruction\n"));
|
|
|
accbbf |
+ fprintf (stream, _("\
|
|
|
accbbf |
+ -mbranches-within-32B-boundaries\n\
|
|
|
accbbf |
+ align branches within 32 byte boundary\n"));
|
|
|
accbbf |
+ fprintf (stream, _("\
|
|
|
accbbf |
-mamd64 accept only AMD64 ISA\n"));
|
|
|
accbbf |
fprintf (stream, _("\
|
|
|
accbbf |
-mintel64 accept only Intel64 ISA\n"));
|
|
|
accbbf |
@@ -10650,17 +11618,26 @@ i386_target_format (void)
|
|
|
accbbf |
{
|
|
|
accbbf |
default:
|
|
|
accbbf |
format = ELF_TARGET_FORMAT;
|
|
|
accbbf |
+#ifndef TE_SOLARIS
|
|
|
accbbf |
+ tls_get_addr = "___tls_get_addr";
|
|
|
accbbf |
+#endif
|
|
|
accbbf |
break;
|
|
|
accbbf |
case X86_64_ABI:
|
|
|
accbbf |
use_rela_relocations = 1;
|
|
|
accbbf |
object_64bit = 1;
|
|
|
accbbf |
format = ELF_TARGET_FORMAT64;
|
|
|
accbbf |
+#ifndef TE_SOLARIS
|
|
|
accbbf |
+ tls_get_addr = "__tls_get_addr";
|
|
|
accbbf |
+#endif
|
|
|
accbbf |
break;
|
|
|
accbbf |
case X86_64_X32_ABI:
|
|
|
accbbf |
use_rela_relocations = 1;
|
|
|
accbbf |
object_64bit = 1;
|
|
|
accbbf |
disallow_64bit_reloc = 1;
|
|
|
accbbf |
format = ELF_TARGET_FORMAT32;
|
|
|
accbbf |
+#ifndef TE_SOLARIS
|
|
|
accbbf |
+ tls_get_addr = "__tls_get_addr";
|
|
|
accbbf |
+#endif
|
|
|
accbbf |
break;
|
|
|
accbbf |
}
|
|
|
accbbf |
if (cpu_arch_isa == PROCESSOR_L1OM)
|
|
|
accbbf |
@@ -10775,6 +11752,21 @@ s_bss (int ignore ATTRIBUTE_UNUSED)
|
|
|
accbbf |
|
|
|
accbbf |
#endif
|
|
|
accbbf |
|
|
|
accbbf |
+/* Remember constant diretive. */
|
|
|
accbbf |
+
|
|
|
accbbf |
+void
|
|
|
accbbf |
+i386_cons_worker (int ignore ATTRIBUTE_UNUSED)
|
|
|
accbbf |
+{
|
|
|
accbbf |
+ if (last_insn.kind != last_insn_directive
|
|
|
accbbf |
+ && (bfd_get_section_flags (NULL, now_seg) & SEC_CODE))
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ last_insn.seg = now_seg;
|
|
|
accbbf |
+ last_insn.kind = last_insn_directive;
|
|
|
accbbf |
+ last_insn.name = "constant diretive";
|
|
|
accbbf |
+ last_insn.file = as_where (&last_insn.line);
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+}
|
|
|
accbbf |
+
|
|
|
accbbf |
void
|
|
|
accbbf |
i386_validate_fix (fixS *fixp)
|
|
|
accbbf |
{
|
|
|
accbbf |
diff -rupN binutils.orig/gas/config/tc-i386.h binutils-2.30/gas/config/tc-i386.h
|
|
|
accbbf |
--- binutils.orig/gas/config/tc-i386.h 2019-11-20 10:59:21.585883785 +0000
|
|
|
accbbf |
+++ binutils-2.30/gas/config/tc-i386.h 2019-11-20 15:24:24.677440688 +0000
|
|
|
accbbf |
@@ -215,12 +215,19 @@ if (fragP->fr_type == rs_align_code)
|
|
|
accbbf |
- fragP->fr_address \
|
|
|
accbbf |
- fragP->fr_fix));
|
|
|
accbbf |
|
|
|
accbbf |
+extern void i386_cons_worker (int);
|
|
|
accbbf |
+#define md_cons_align(nbytes) i386_cons_worker (nbytes)
|
|
|
accbbf |
+
|
|
|
accbbf |
void i386_print_statistics (FILE *);
|
|
|
accbbf |
#define tc_print_statistics i386_print_statistics
|
|
|
accbbf |
|
|
|
accbbf |
extern unsigned int i386_frag_max_var (fragS *);
|
|
|
accbbf |
#define md_frag_max_var i386_frag_max_var
|
|
|
accbbf |
|
|
|
accbbf |
+extern long i386_generic_table_relax_frag (segT, fragS *, long);
|
|
|
accbbf |
+#define md_generic_table_relax_frag(segment, fragP, stretch) \
|
|
|
accbbf |
+ i386_generic_table_relax_frag (segment, fragP, stretch)
|
|
|
accbbf |
+
|
|
|
accbbf |
#define md_number_to_chars number_to_chars_littleendian
|
|
|
accbbf |
|
|
|
accbbf |
enum processor_type
|
|
|
accbbf |
@@ -255,9 +262,24 @@ extern i386_cpu_flags cpu_arch_isa_flags
|
|
|
accbbf |
|
|
|
accbbf |
struct i386_tc_frag_data
|
|
|
accbbf |
{
|
|
|
accbbf |
+ union
|
|
|
accbbf |
+ {
|
|
|
accbbf |
+ fragS *padding_fragP;
|
|
|
accbbf |
+ fragS *branch_fragP;
|
|
|
accbbf |
+ } u;
|
|
|
accbbf |
+ addressT padding_address;
|
|
|
accbbf |
enum processor_type isa;
|
|
|
accbbf |
i386_cpu_flags isa_flags;
|
|
|
accbbf |
+ unsigned int max_bytes;
|
|
|
accbbf |
enum processor_type tune;
|
|
|
accbbf |
+ signed char length;
|
|
|
accbbf |
+ signed char last_length;
|
|
|
accbbf |
+ signed char max_prefix_length;
|
|
|
accbbf |
+ signed char prefix_length;
|
|
|
accbbf |
+ signed char default_prefix;
|
|
|
accbbf |
+ signed char cmp_size;
|
|
|
accbbf |
+ unsigned int classified : 1;
|
|
|
accbbf |
+ unsigned int branch_type : 7;
|
|
|
accbbf |
};
|
|
|
accbbf |
|
|
|
accbbf |
/* We need to emit the right NOP pattern in .align frags. This is
|
|
|
accbbf |
@@ -268,9 +290,20 @@ struct i386_tc_frag_data
|
|
|
accbbf |
#define TC_FRAG_INIT(FRAGP) \
|
|
|
accbbf |
do \
|
|
|
accbbf |
{ \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.u.padding_fragP = NULL; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.padding_address = 0; \
|
|
|
accbbf |
(FRAGP)->tc_frag_data.isa = cpu_arch_isa; \
|
|
|
accbbf |
(FRAGP)->tc_frag_data.isa_flags = cpu_arch_isa_flags; \
|
|
|
accbbf |
(FRAGP)->tc_frag_data.tune = cpu_arch_tune; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.length = 0; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.max_bytes = max_chars; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.last_length = 0; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.max_prefix_length = 0; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.prefix_length = 0; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.default_prefix = 0; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.cmp_size = 0; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.classified = 0; \
|
|
|
accbbf |
+ (FRAGP)->tc_frag_data.branch_type = 0; \
|
|
|
accbbf |
} \
|
|
|
accbbf |
while (0)
|
|
|
accbbf |
|
|
|
accbbf |
diff -rupN binutils.orig/gas/doc/c-i386.texi binutils-2.30/gas/doc/c-i386.texi
|
|
|
accbbf |
--- binutils.orig/gas/doc/c-i386.texi 2019-11-20 10:59:21.590883746 +0000
|
|
|
accbbf |
+++ binutils-2.30/gas/doc/c-i386.texi 2019-11-20 15:08:24.874736461 +0000
|
|
|
accbbf |
@@ -389,6 +389,43 @@ R_X86_64_REX_GOTPCRELX, in 64-bit mode.
|
|
|
accbbf |
relocations. The default can be controlled by a configure option
|
|
|
accbbf |
@option{--enable-x86-relax-relocations}.
|
|
|
accbbf |
|
|
|
accbbf |
+@cindex @samp{-malign-branch-boundary=} option, i386
|
|
|
accbbf |
+@cindex @samp{-malign-branch-boundary=} option, x86-64
|
|
|
accbbf |
+@item -malign-branch-boundary=@var{NUM}
|
|
|
accbbf |
+This option controls how the assembler should align branches with segment
|
|
|
accbbf |
+prefixes or NOP. @var{NUM} must be a power of 2. It should be 0 or
|
|
|
accbbf |
+no less than 32. Branches will be aligned within @var{NUM} byte
|
|
|
accbbf |
+boundary. @option{-malign-branch-boundary=0}, which is the default,
|
|
|
accbbf |
+doesn't align branches.
|
|
|
accbbf |
+
|
|
|
accbbf |
+@cindex @samp{-malign-branch=} option, i386
|
|
|
accbbf |
+@cindex @samp{-malign-branch=} option, x86-64
|
|
|
accbbf |
+@item -malign-branch=@var{TYPE}[+@var{TYPE}...]
|
|
|
accbbf |
+This option specifies types of branches to align. @var{TYPE} is
|
|
|
accbbf |
+combination of @samp{jcc}, which aligns conditional jumps,
|
|
|
accbbf |
+@samp{fused}, which aligns fused conditional jumps, @samp{jmp},
|
|
|
accbbf |
+which aligns unconditional jumps, @samp{call} which aligns calls,
|
|
|
accbbf |
+@samp{ret}, which aligns rets, @samp{indirect}, which aligns indirect
|
|
|
accbbf |
+jumps and calls. The default is @option{-malign-branch=jcc+fused+jmp}.
|
|
|
accbbf |
+
|
|
|
accbbf |
+@cindex @samp{-malign-branch-prefix-size=} option, i386
|
|
|
accbbf |
+@cindex @samp{-malign-branch-prefix-size=} option, x86-64
|
|
|
accbbf |
+@item -malign-branch-prefix-size=@var{NUM}
|
|
|
accbbf |
+This option specifies the maximum number of prefixes on an instruction
|
|
|
accbbf |
+to align branches. @var{NUM} should be between 0 and 5. The default
|
|
|
accbbf |
+@var{NUM} is 5.
|
|
|
accbbf |
+
|
|
|
accbbf |
+@cindex @samp{-mbranches-within-32B-boundaries} option, i386
|
|
|
accbbf |
+@cindex @samp{-mbranches-within-32B-boundaries} option, x86-64
|
|
|
accbbf |
+@item -mbranches-within-32B-boundaries
|
|
|
accbbf |
+This option aligns conditional jumps, fused conditional jumps and
|
|
|
accbbf |
+unconditional jumps within 32 byte boundary with up to 5 segment prefixes
|
|
|
accbbf |
+on an instruction. It is equivalent to
|
|
|
accbbf |
+@option{-malign-branch-boundary=32}
|
|
|
accbbf |
+@option{-malign-branch=jcc+fused+jmp}
|
|
|
accbbf |
+@option{-malign-branch-prefix-size=5}.
|
|
|
accbbf |
+The default doesn't align branches.
|
|
|
accbbf |
+
|
|
|
accbbf |
@cindex @samp{-mevexrcig=} option, i386
|
|
|
accbbf |
@cindex @samp{-mevexrcig=} option, x86-64
|
|
|
accbbf |
@item -mevexrcig=@var{rne}
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-1a.d binutils-2.30/gas/testsuite/gas/i386/align-branch-1a.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-1a.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-1a.d 2019-11-20 14:09:25.593915106 +0000
|
|
|
accbbf |
@@ -0,0 +1,77 @@
|
|
|
accbbf |
+#source: align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 55 push %ebp
|
|
|
accbbf |
+ b: 55 push %ebp
|
|
|
accbbf |
+ c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ e: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 20: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 22: 74 5e je 82 <foo\+0x82>
|
|
|
accbbf |
+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\)
|
|
|
accbbf |
+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3d: 5d pop %ebp
|
|
|
accbbf |
+ 3e: 5d pop %ebp
|
|
|
accbbf |
+ 3f: 5d pop %ebp
|
|
|
accbbf |
+ 40: 74 40 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 42: 5d pop %ebp
|
|
|
accbbf |
+ 43: 74 3d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\)
|
|
|
accbbf |
+ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 50: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 53: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 56: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 59: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5f: 5d pop %ebp
|
|
|
accbbf |
+ 60: eb 26 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 62: eb 24 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 64: eb 22 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 66: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 69: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 75: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 78: 5d pop %ebp
|
|
|
accbbf |
+ 79: 5d pop %ebp
|
|
|
accbbf |
+ 7a: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 7c: 74 04 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 7e: 66 90 xchg %ax,%ax
|
|
|
accbbf |
+ 80: eb 06 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax
|
|
|
accbbf |
+ 85: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ a0: 89 75 0c mov %esi,0xc\(%ebp\)
|
|
|
accbbf |
+ a3: e9 [0-9a-f ]+ jmp .*
|
|
|
accbbf |
+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ c0: 89 75 00 mov %esi,0x0\(%ebp\)
|
|
|
accbbf |
+ c3: 74 c3 je 88 <foo\+0x88>
|
|
|
accbbf |
+ c5: 74 c1 je 88 <foo\+0x88>
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-1b.d binutils-2.30/gas/testsuite/gas/i386/align-branch-1b.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-1b.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-1b.d 2019-11-20 14:09:25.593915106 +0000
|
|
|
accbbf |
@@ -0,0 +1,77 @@
|
|
|
accbbf |
+#source: align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 55 push %ebp
|
|
|
accbbf |
+ b: 55 push %ebp
|
|
|
accbbf |
+ c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ e: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 20: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 22: 74 5e je 82 <foo\+0x82>
|
|
|
accbbf |
+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\)
|
|
|
accbbf |
+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3d: 5d pop %ebp
|
|
|
accbbf |
+ 3e: 5d pop %ebp
|
|
|
accbbf |
+ 3f: 5d pop %ebp
|
|
|
accbbf |
+ 40: 74 40 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 42: 5d pop %ebp
|
|
|
accbbf |
+ 43: 74 3d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\)
|
|
|
accbbf |
+ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 50: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 53: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 56: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 59: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5f: 5d pop %ebp
|
|
|
accbbf |
+ 60: eb 26 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 62: eb 24 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 64: eb 22 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 66: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 69: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 75: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 78: 5d pop %ebp
|
|
|
accbbf |
+ 79: 5d pop %ebp
|
|
|
accbbf |
+ 7a: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 7c: 74 04 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 7e: 66 90 xchg %ax,%ax
|
|
|
accbbf |
+ 80: eb 06 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax
|
|
|
accbbf |
+ 85: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ a0: 89 75 0c mov %esi,0xc\(%ebp\)
|
|
|
accbbf |
+ a3: e9 [0-9a-f ]+ jmp .*
|
|
|
accbbf |
+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ c0: 89 75 00 mov %esi,0x0\(%ebp\)
|
|
|
accbbf |
+ c3: 74 c3 je 88 <foo\+0x88>
|
|
|
accbbf |
+ c5: 74 c1 je 88 <foo\+0x88>
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-1c.d binutils-2.30/gas/testsuite/gas/i386/align-branch-1c.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-1c.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-1c.d 2019-11-20 14:09:25.594915098 +0000
|
|
|
accbbf |
@@ -0,0 +1,77 @@
|
|
|
accbbf |
+#source: align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch-prefix-size=1
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1
|
|
|
accbbf |
+ 6: 3e 55 ds push %ebp
|
|
|
accbbf |
+ 8: 3e 55 ds push %ebp
|
|
|
accbbf |
+ a: 55 push %ebp
|
|
|
accbbf |
+ b: 55 push %ebp
|
|
|
accbbf |
+ c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ e: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 20: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 22: 74 5e je 82 <foo\+0x82>
|
|
|
accbbf |
+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\)
|
|
|
accbbf |
+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3d: 5d pop %ebp
|
|
|
accbbf |
+ 3e: 5d pop %ebp
|
|
|
accbbf |
+ 3f: 5d pop %ebp
|
|
|
accbbf |
+ 40: 74 40 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 42: 5d pop %ebp
|
|
|
accbbf |
+ 43: 74 3d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\)
|
|
|
accbbf |
+ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 50: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 53: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 56: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 59: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5f: 5d pop %ebp
|
|
|
accbbf |
+ 60: eb 26 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 62: eb 24 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 64: eb 22 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 66: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 69: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 75: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 78: 5d pop %ebp
|
|
|
accbbf |
+ 79: 5d pop %ebp
|
|
|
accbbf |
+ 7a: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 7c: 74 04 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 7e: 66 90 xchg %ax,%ax
|
|
|
accbbf |
+ 80: eb 06 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax
|
|
|
accbbf |
+ 85: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ a0: 89 75 0c mov %esi,0xc\(%ebp\)
|
|
|
accbbf |
+ a3: e9 [0-9a-f ]+ jmp .*
|
|
|
accbbf |
+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ c0: 89 75 00 mov %esi,0x0\(%ebp\)
|
|
|
accbbf |
+ c3: 74 c3 je 88 <foo\+0x88>
|
|
|
accbbf |
+ c5: 74 c1 je 88 <foo\+0x88>
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-1d.d binutils-2.30/gas/testsuite/gas/i386/align-branch-1d.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-1d.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-1d.d 2019-11-20 14:09:25.594915098 +0000
|
|
|
accbbf |
@@ -0,0 +1,76 @@
|
|
|
accbbf |
+#source: align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 55 push %ebp
|
|
|
accbbf |
+ b: 55 push %ebp
|
|
|
accbbf |
+ c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ e: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 20: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 22: 74 5b je 7f <foo\+0x7f>
|
|
|
accbbf |
+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\)
|
|
|
accbbf |
+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3d: 5d pop %ebp
|
|
|
accbbf |
+ 3e: 5d pop %ebp
|
|
|
accbbf |
+ 3f: 5d pop %ebp
|
|
|
accbbf |
+ 40: 74 3d je 7f <foo\+0x7f>
|
|
|
accbbf |
+ 42: 5d pop %ebp
|
|
|
accbbf |
+ 43: 74 3a je 7f <foo\+0x7f>
|
|
|
accbbf |
+ 45: 89 44 24 fc mov %eax,-0x4\(%esp\)
|
|
|
accbbf |
+ 49: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 4c: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5e: 5d pop %ebp
|
|
|
accbbf |
+ 5f: eb 24 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 61: eb 22 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 63: eb 20 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 65: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 68: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 6b: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 71: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 74: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 77: 5d pop %ebp
|
|
|
accbbf |
+ 78: 5d pop %ebp
|
|
|
accbbf |
+ 79: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 7b: 74 02 je 7f <foo\+0x7f>
|
|
|
accbbf |
+ 7d: eb 06 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 7f: 8b 45 f4 mov -0xc\(%ebp\),%eax
|
|
|
accbbf |
+ 82: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 85: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 8b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 91: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 97: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 9d: 89 75 0c mov %esi,0xc\(%ebp\)
|
|
|
accbbf |
+ a0: e9 [0-9a-f ]+ jmp .*
|
|
|
accbbf |
+ a5: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ab: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b1: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b7: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ bd: 89 75 00 mov %esi,0x0\(%ebp\)
|
|
|
accbbf |
+ c0: 74 c3 je 85 <foo\+0x85>
|
|
|
accbbf |
+ c2: 74 c1 je 85 <foo\+0x85>
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-1e.d binutils-2.30/gas/testsuite/gas/i386/align-branch-1e.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-1e.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-1e.d 2019-11-20 14:09:25.594915098 +0000
|
|
|
accbbf |
@@ -0,0 +1,77 @@
|
|
|
accbbf |
+#source: align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=jcc
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1
|
|
|
accbbf |
+ 6: 55 push %ebp
|
|
|
accbbf |
+ 7: 55 push %ebp
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ c: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1e: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 20: 74 5a je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 22: 89 73 f4 mov %esi,-0xc\(%ebx\)
|
|
|
accbbf |
+ 25: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 28: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 2b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 5d pop %ebp
|
|
|
accbbf |
+ 3b: 5d pop %ebp
|
|
|
accbbf |
+ 3c: 5d pop %ebp
|
|
|
accbbf |
+ 3d: 74 3d je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 3f: 5d pop %ebp
|
|
|
accbbf |
+ 40: 74 3a je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 42: 89 44 24 fc mov %eax,-0x4\(%esp\)
|
|
|
accbbf |
+ 46: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 49: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 4c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5b: 5d pop %ebp
|
|
|
accbbf |
+ 5c: eb 24 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 5e: eb 22 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 60: eb 20 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 62: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 65: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 68: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 6b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 71: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 74: 5d pop %ebp
|
|
|
accbbf |
+ 75: 5d pop %ebp
|
|
|
accbbf |
+ 76: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 78: 74 02 je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 7a: eb 06 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 7c: 8b 45 f4 mov -0xc\(%ebp\),%eax
|
|
|
accbbf |
+ 7f: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 82: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 9a: 89 75 0c mov %esi,0xc\(%ebp\)
|
|
|
accbbf |
+ 9d: e9 [0-9a-f ]+ jmp .*
|
|
|
accbbf |
+ a2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ba: 89 75 00 mov %esi,0x0\(%ebp\)
|
|
|
accbbf |
+ bd: 74 c3 je 82 <foo\+0x82>
|
|
|
accbbf |
+ bf: 90 nop
|
|
|
accbbf |
+ c0: 74 c0 je 82 <foo\+0x82>
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-1f.d binutils-2.30/gas/testsuite/gas/i386/align-branch-1f.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-1f.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-1f.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,77 @@
|
|
|
accbbf |
+#source: align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=jcc+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1
|
|
|
accbbf |
+ 6: 55 push %ebp
|
|
|
accbbf |
+ 7: 55 push %ebp
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ c: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1e: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 20: 74 5c je 7e <foo\+0x7e>
|
|
|
accbbf |
+ 22: 89 73 f4 mov %esi,-0xc\(%ebx\)
|
|
|
accbbf |
+ 25: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 28: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 2b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 5d pop %ebp
|
|
|
accbbf |
+ 3b: 5d pop %ebp
|
|
|
accbbf |
+ 3c: 5d pop %ebp
|
|
|
accbbf |
+ 3d: 74 3f je 7e <foo\+0x7e>
|
|
|
accbbf |
+ 3f: 5d pop %ebp
|
|
|
accbbf |
+ 40: 74 3c je 7e <foo\+0x7e>
|
|
|
accbbf |
+ 42: 89 44 24 fc mov %eax,-0x4\(%esp\)
|
|
|
accbbf |
+ 46: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 49: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 4c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5b: 5d pop %ebp
|
|
|
accbbf |
+ 5c: eb 27 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 5e: 66 90 xchg %ax,%ax
|
|
|
accbbf |
+ 60: eb 23 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 62: eb 21 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 64: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 67: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 6a: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 6d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 70: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 73: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 76: 5d pop %ebp
|
|
|
accbbf |
+ 77: 5d pop %ebp
|
|
|
accbbf |
+ 78: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 7a: 74 02 je 7e <foo\+0x7e>
|
|
|
accbbf |
+ 7c: eb 07 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 7e: 36 8b 45 f4 mov %ss:-0xc\(%ebp\),%eax
|
|
|
accbbf |
+ 82: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 85: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 8b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 91: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 97: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 9d: 89 75 0c mov %esi,0xc\(%ebp\)
|
|
|
accbbf |
+ a0: e9 [0-9a-f ]+ jmp .*
|
|
|
accbbf |
+ a5: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ab: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b1: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b7: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ bd: 89 75 00 mov %esi,0x0\(%ebp\)
|
|
|
accbbf |
+ c0: 74 c3 je 85 <foo\+0x85>
|
|
|
accbbf |
+ c2: 74 c1 je 85 <foo\+0x85>
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-1g.d binutils-2.30/gas/testsuite/gas/i386/align-branch-1g.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-1g.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-1g.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,77 @@
|
|
|
accbbf |
+#source: align-branch-1.s
|
|
|
accbbf |
+#as: -mbranches-within-32B-boundaries
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 55 push %ebp
|
|
|
accbbf |
+ b: 55 push %ebp
|
|
|
accbbf |
+ c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ e: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 20: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 22: 74 5e je 82 <foo\+0x82>
|
|
|
accbbf |
+ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\)
|
|
|
accbbf |
+ 28: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3d: 5d pop %ebp
|
|
|
accbbf |
+ 3e: 5d pop %ebp
|
|
|
accbbf |
+ 3f: 5d pop %ebp
|
|
|
accbbf |
+ 40: 74 40 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 42: 5d pop %ebp
|
|
|
accbbf |
+ 43: 74 3d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\)
|
|
|
accbbf |
+ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 50: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 53: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 56: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 59: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5f: 5d pop %ebp
|
|
|
accbbf |
+ 60: eb 26 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 62: eb 24 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 64: eb 22 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 66: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 69: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 75: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 78: 5d pop %ebp
|
|
|
accbbf |
+ 79: 5d pop %ebp
|
|
|
accbbf |
+ 7a: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 7c: 74 04 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 7e: 66 90 xchg %ax,%ax
|
|
|
accbbf |
+ 80: eb 06 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax
|
|
|
accbbf |
+ 85: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ a0: 89 75 0c mov %esi,0xc\(%ebp\)
|
|
|
accbbf |
+ a3: e9 [0-9a-f ]+ jmp .*
|
|
|
accbbf |
+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ c0: 89 75 00 mov %esi,0x0\(%ebp\)
|
|
|
accbbf |
+ c3: 74 c3 je 88 <foo\+0x88>
|
|
|
accbbf |
+ c5: 74 c1 je 88 <foo\+0x88>
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-1h.d binutils-2.30/gas/testsuite/gas/i386/align-branch-1h.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-1h.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-1h.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,76 @@
|
|
|
accbbf |
+#source: align-branch-1.s
|
|
|
accbbf |
+#as: -mbranches-within-32B-boundaries -malign-branch-boundary=0
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1
|
|
|
accbbf |
+ 6: 55 push %ebp
|
|
|
accbbf |
+ 7: 55 push %ebp
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ c: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1e: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 20: 74 5a je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 22: 89 73 f4 mov %esi,-0xc\(%ebx\)
|
|
|
accbbf |
+ 25: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 28: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 2b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 5d pop %ebp
|
|
|
accbbf |
+ 3b: 5d pop %ebp
|
|
|
accbbf |
+ 3c: 5d pop %ebp
|
|
|
accbbf |
+ 3d: 74 3d je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 3f: 5d pop %ebp
|
|
|
accbbf |
+ 40: 74 3a je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 42: 89 44 24 fc mov %eax,-0x4\(%esp\)
|
|
|
accbbf |
+ 46: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 49: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 4c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5b: 5d pop %ebp
|
|
|
accbbf |
+ 5c: eb 24 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 5e: eb 22 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 60: eb 20 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 62: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 65: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 68: 89 7d f8 mov %edi,-0x8\(%ebp\)
|
|
|
accbbf |
+ 6b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 71: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 74: 5d pop %ebp
|
|
|
accbbf |
+ 75: 5d pop %ebp
|
|
|
accbbf |
+ 76: 39 c5 cmp %eax,%ebp
|
|
|
accbbf |
+ 78: 74 02 je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 7a: eb 06 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 7c: 8b 45 f4 mov -0xc\(%ebp\),%eax
|
|
|
accbbf |
+ 7f: 89 45 fc mov %eax,-0x4\(%ebp\)
|
|
|
accbbf |
+ 82: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ 9a: 89 75 0c mov %esi,0xc\(%ebp\)
|
|
|
accbbf |
+ 9d: e9 [0-9a-f ]+ jmp .*
|
|
|
accbbf |
+ a2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\)
|
|
|
accbbf |
+ ba: 89 75 00 mov %esi,0x0\(%ebp\)
|
|
|
accbbf |
+ bd: 74 c3 je 82 <foo\+0x82>
|
|
|
accbbf |
+ bf: 74 c1 je 82 <foo\+0x82>
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-1.s binutils-2.30/gas/testsuite/gas/i386/align-branch-1.s
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-1.s 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-1.s 2019-11-20 14:09:25.592915114 +0000
|
|
|
accbbf |
@@ -0,0 +1,72 @@
|
|
|
accbbf |
+ .text
|
|
|
accbbf |
+ .globl foo
|
|
|
accbbf |
+ .p2align 4
|
|
|
accbbf |
+foo:
|
|
|
accbbf |
+ movl %eax, %gs:0x1
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ movl %esp, %ebp
|
|
|
accbbf |
+ movl %edi, -8(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ cmp %eax, %ebp
|
|
|
accbbf |
+ je .L_2
|
|
|
accbbf |
+ movl %esi, -12(%ebx)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %edi, -8(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ popl %ebp
|
|
|
accbbf |
+ popl %ebp
|
|
|
accbbf |
+ popl %ebp
|
|
|
accbbf |
+ je .L_2
|
|
|
accbbf |
+ popl %ebp
|
|
|
accbbf |
+ je .L_2
|
|
|
accbbf |
+ movl %eax, -4(%esp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %edi, -8(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ popl %ebp
|
|
|
accbbf |
+ jmp .L_3
|
|
|
accbbf |
+ jmp .L_3
|
|
|
accbbf |
+ jmp .L_3
|
|
|
accbbf |
+ movl %eax, -4(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %edi, -8(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ popl %ebp
|
|
|
accbbf |
+ popl %ebp
|
|
|
accbbf |
+ cmp %eax, %ebp
|
|
|
accbbf |
+ je .L_2
|
|
|
accbbf |
+ jmp .L_3
|
|
|
accbbf |
+.L_2:
|
|
|
accbbf |
+ movl -12(%ebp), %eax
|
|
|
accbbf |
+ movl %eax, -4(%ebp)
|
|
|
accbbf |
+.L_3:
|
|
|
accbbf |
+ movl %esi, -1200(%ebp)
|
|
|
accbbf |
+ movl %esi, -1200(%ebp)
|
|
|
accbbf |
+ movl %esi, -1200(%ebp)
|
|
|
accbbf |
+ movl %esi, -1200(%ebp)
|
|
|
accbbf |
+ movl %esi, 12(%ebp)
|
|
|
accbbf |
+ jmp bar
|
|
|
accbbf |
+ movl %esi, -1200(%ebp)
|
|
|
accbbf |
+ movl %esi, -1200(%ebp)
|
|
|
accbbf |
+ movl %esi, -1200(%ebp)
|
|
|
accbbf |
+ movl %esi, -1200(%ebp)
|
|
|
accbbf |
+ movl %esi, (%ebp)
|
|
|
accbbf |
+ je .L_3
|
|
|
accbbf |
+ je .L_3
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-2a.d binutils-2.30/gas/testsuite/gas/i386/align-branch-2a.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-2a.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-2a.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,55 @@
|
|
|
accbbf |
+#source: align-branch-2.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 6: 55 push %ebp
|
|
|
accbbf |
+ 7: 55 push %ebp
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1e: ff e0 jmp \*%eax
|
|
|
accbbf |
+ 20: 55 push %ebp
|
|
|
accbbf |
+ 21: 55 push %ebp
|
|
|
accbbf |
+ 22: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 28: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 2a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 30: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 33: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 36: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 39: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3c: ff d0 call \*%eax
|
|
|
accbbf |
+ 3e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 41: 55 push %ebp
|
|
|
accbbf |
+ 42: 55 push %ebp
|
|
|
accbbf |
+ 43: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 49: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 4b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 4e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 51: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 54: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 57: e8 [0-9a-f ]+ call .*
|
|
|
accbbf |
+ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5f: 55 push %ebp
|
|
|
accbbf |
+ 60: 55 push %ebp
|
|
|
accbbf |
+ 61: 55 push %ebp
|
|
|
accbbf |
+ 62: 55 push %ebp
|
|
|
accbbf |
+ 63: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 69: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 6b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 71: ff 15 00 00 00 00 call \*0x0
|
|
|
accbbf |
+ 77: 55 push %ebp
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-2b.d binutils-2.30/gas/testsuite/gas/i386/align-branch-2b.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-2b.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-2b.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,55 @@
|
|
|
accbbf |
+#source: align-branch-2.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=indirect
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 64 a3 01 00 00 00 fs fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 55 push %ebp
|
|
|
accbbf |
+ b: 55 push %ebp
|
|
|
accbbf |
+ c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 20: ff e0 jmp \*%eax
|
|
|
accbbf |
+ 22: 3e 3e 55 ds ds push %ebp
|
|
|
accbbf |
+ 25: 55 push %ebp
|
|
|
accbbf |
+ 26: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 2c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 40: ff d0 call \*%eax
|
|
|
accbbf |
+ 42: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 45: 55 push %ebp
|
|
|
accbbf |
+ 46: 55 push %ebp
|
|
|
accbbf |
+ 47: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 4d: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5b: e8 [0-9a-f ]+ call .*
|
|
|
accbbf |
+ 60: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 63: 55 push %ebp
|
|
|
accbbf |
+ 64: 55 push %ebp
|
|
|
accbbf |
+ 65: 55 push %ebp
|
|
|
accbbf |
+ 66: 55 push %ebp
|
|
|
accbbf |
+ 67: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 6d: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 72: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 75: ff 15 00 00 00 00 call \*0x0
|
|
|
accbbf |
+ 7b: 55 push %ebp
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-2c.d binutils-2.30/gas/testsuite/gas/i386/align-branch-2c.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-2c.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-2c.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,55 @@
|
|
|
accbbf |
+#source: align-branch-2.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=indirect+call
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 64 a3 01 00 00 00 fs fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 55 push %ebp
|
|
|
accbbf |
+ b: 55 push %ebp
|
|
|
accbbf |
+ c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 20: ff e0 jmp \*%eax
|
|
|
accbbf |
+ 22: 3e 3e 55 ds ds push %ebp
|
|
|
accbbf |
+ 25: 55 push %ebp
|
|
|
accbbf |
+ 26: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 2c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 40: ff d0 call \*%eax
|
|
|
accbbf |
+ 42: 36 36 36 36 36 89 75 f4 ss ss ss ss mov %esi,%ss:-0xc\(%ebp\)
|
|
|
accbbf |
+ 4a: 55 push %ebp
|
|
|
accbbf |
+ 4b: 55 push %ebp
|
|
|
accbbf |
+ 4c: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 52: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 54: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 57: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 5d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 60: e8 [0-9a-f ]+ call .*
|
|
|
accbbf |
+ 65: 36 36 36 36 36 89 75 f4 ss ss ss ss mov %esi,%ss:-0xc\(%ebp\)
|
|
|
accbbf |
+ 6d: 3e 55 ds push %ebp
|
|
|
accbbf |
+ 6f: 55 push %ebp
|
|
|
accbbf |
+ 70: 55 push %ebp
|
|
|
accbbf |
+ 71: 55 push %ebp
|
|
|
accbbf |
+ 72: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 78: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 7a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 7d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 80: ff 15 00 00 00 00 call \*0x0
|
|
|
accbbf |
+ 86: 55 push %ebp
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-2.s binutils-2.30/gas/testsuite/gas/i386/align-branch-2.s
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-2.s 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-2.s 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,49 @@
|
|
|
accbbf |
+ .text
|
|
|
accbbf |
+ .globl foo
|
|
|
accbbf |
+ .p2align 4
|
|
|
accbbf |
+foo:
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ movl %esp, %ebp
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ jmp *%eax
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ movl %esp, %ebp
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ call *%eax
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ movl %esp, %ebp
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ call foo
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ movl %esp, %ebp
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ call *foo
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-3.d binutils-2.30/gas/testsuite/gas/i386/align-branch-3.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-3.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-3.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,33 @@
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=indirect+call
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 6: 55 push %ebp
|
|
|
accbbf |
+ 7: 55 push %ebp
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 12: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 15: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 18: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1e: e8 fc ff ff ff call 1f <foo\+0x1f>
|
|
|
accbbf |
+ 23: 55 push %ebp
|
|
|
accbbf |
+ 24: 55 push %ebp
|
|
|
accbbf |
+ 25: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 2b: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 2d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 30: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 33: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 36: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 39: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3c: ff 91 00 00 00 00 call \*0x0\(%ecx\)
|
|
|
accbbf |
+ 42: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-3.s binutils-2.30/gas/testsuite/gas/i386/align-branch-3.s
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-3.s 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-3.s 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,28 @@
|
|
|
accbbf |
+ .text
|
|
|
accbbf |
+ .globl foo
|
|
|
accbbf |
+ .p2align 4
|
|
|
accbbf |
+foo:
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ movl %esp, %ebp
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ call ___tls_get_addr
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ movl %esp, %ebp
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ call *___tls_get_addr@GOT(%ecx)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-4a.d binutils-2.30/gas/testsuite/gas/i386/align-branch-4a.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-4a.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-4a.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,36 @@
|
|
|
accbbf |
+#source: align-branch-4.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 6: 55 push %ebp
|
|
|
accbbf |
+ 7: 55 push %ebp
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 55 push %ebp
|
|
|
accbbf |
+ b: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 10: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 13: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 16: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 19: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1c: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1f: c3 ret
|
|
|
accbbf |
+ 20: 55 push %ebp
|
|
|
accbbf |
+ 21: 55 push %ebp
|
|
|
accbbf |
+ 22: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 28: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 2a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 2d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 30: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 33: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 36: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 39: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3c: c2 1e 00 ret \$0x1e
|
|
|
accbbf |
+ 3f: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-4b.d binutils-2.30/gas/testsuite/gas/i386/align-branch-4b.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-4b.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-4b.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,36 @@
|
|
|
accbbf |
+#source: align-branch-4.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=ret
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 a3 01 00 00 00 fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ 7: 55 push %ebp
|
|
|
accbbf |
+ 8: 55 push %ebp
|
|
|
accbbf |
+ 9: 55 push %ebp
|
|
|
accbbf |
+ a: 55 push %ebp
|
|
|
accbbf |
+ b: 55 push %ebp
|
|
|
accbbf |
+ c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 20: c3 ret
|
|
|
accbbf |
+ 21: 3e 3e 3e 55 ds ds ds push %ebp
|
|
|
accbbf |
+ 25: 55 push %ebp
|
|
|
accbbf |
+ 26: 64 a3 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 2c: 89 e5 mov %esp,%ebp
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 3d: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+ 40: c2 1e 00 ret \$0x1e
|
|
|
accbbf |
+ 43: 89 75 f4 mov %esi,-0xc\(%ebp\)
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-4.s binutils-2.30/gas/testsuite/gas/i386/align-branch-4.s
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-4.s 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-4.s 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,30 @@
|
|
|
accbbf |
+ .text
|
|
|
accbbf |
+ .globl foo
|
|
|
accbbf |
+ .p2align 4
|
|
|
accbbf |
+foo:
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ movl %esp, %ebp
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ ret
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ pushl %ebp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ movl %esp, %ebp
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
+ ret $30
|
|
|
accbbf |
+ movl %esi, -12(%ebp)
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-5.d binutils-2.30/gas/testsuite/gas/i386/align-branch-5.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-5.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-5.d 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,36 @@
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=jcc+fused+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 3: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 6: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 9: 89 d1 mov %edx,%ecx
|
|
|
accbbf |
+ b: 31 c0 xor %eax,%eax
|
|
|
accbbf |
+ d: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 10: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 13: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 16: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 19: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 1c: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 1f: f6 c2 02 test \$0x2,%dl
|
|
|
accbbf |
+ 22: f3 ab rep stos %eax,%es:\(%edi\)
|
|
|
accbbf |
+ 24: 75 dd jne 3 <foo\+0x3>
|
|
|
accbbf |
+ 26: 31 c0 xor %eax,%eax
|
|
|
accbbf |
+ 28: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 2b: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 2e: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 31: 89 d1 mov %edx,%ecx
|
|
|
accbbf |
+ 33: 31 c0 xor %eax,%eax
|
|
|
accbbf |
+ 35: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 38: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 3b: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 3e: f6 c2 02 test \$0x2,%dl
|
|
|
accbbf |
+ 41: e8 [0-9a-f ]+ call .*
|
|
|
accbbf |
+ 46: 75 e3 jne 2b <foo\+0x2b>
|
|
|
accbbf |
+ 48: 31 c0 xor %eax,%eax
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/align-branch-5.s binutils-2.30/gas/testsuite/gas/i386/align-branch-5.s
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/align-branch-5.s 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/align-branch-5.s 2019-11-20 14:09:25.595915091 +0000
|
|
|
accbbf |
@@ -0,0 +1,32 @@
|
|
|
accbbf |
+ .text
|
|
|
accbbf |
+ .p2align 4,,15
|
|
|
accbbf |
+foo:
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+.L1:
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ movl %edx, %ecx
|
|
|
accbbf |
+ xorl %eax, %eax
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ testb $2, %dl
|
|
|
accbbf |
+ rep stosl
|
|
|
accbbf |
+ jne .L1
|
|
|
accbbf |
+ xorl %eax, %eax
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+.L2:
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ movl %edx, %ecx
|
|
|
accbbf |
+ xorl %eax, %eax
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ shrl $2, %ecx
|
|
|
accbbf |
+ testb $2, %dl
|
|
|
accbbf |
+ call bar
|
|
|
accbbf |
+ jne .L2
|
|
|
accbbf |
+ xorl %eax, %eax
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/i386.exp binutils-2.30/gas/testsuite/gas/i386/i386.exp
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/i386.exp 2019-11-20 10:59:21.657883233 +0000
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/i386.exp 2019-11-20 14:09:39.865805050 +0000
|
|
|
accbbf |
@@ -425,6 +425,20 @@ if [expr ([istarget "i*86-*-*"] || [ist
|
|
|
accbbf |
run_dump_test "align-1a"
|
|
|
accbbf |
run_dump_test "align-1b"
|
|
|
accbbf |
run_list_test "inval-pseudo" "-al"
|
|
|
accbbf |
+ run_dump_test "align-branch-1a"
|
|
|
accbbf |
+ run_dump_test "align-branch-1b"
|
|
|
accbbf |
+ run_dump_test "align-branch-1c"
|
|
|
accbbf |
+ run_dump_test "align-branch-1d"
|
|
|
accbbf |
+ run_dump_test "align-branch-1e"
|
|
|
accbbf |
+ run_dump_test "align-branch-1f"
|
|
|
accbbf |
+ run_dump_test "align-branch-1g"
|
|
|
accbbf |
+ run_dump_test "align-branch-1h"
|
|
|
accbbf |
+ run_dump_test "align-branch-2a"
|
|
|
accbbf |
+ run_dump_test "align-branch-2b"
|
|
|
accbbf |
+ run_dump_test "align-branch-2c"
|
|
|
accbbf |
+ run_dump_test "align-branch-4a"
|
|
|
accbbf |
+ run_dump_test "align-branch-4b"
|
|
|
accbbf |
+ run_dump_test "align-branch-5"
|
|
|
accbbf |
|
|
|
accbbf |
# These tests require support for 8 and 16 bit relocs,
|
|
|
accbbf |
# so we only run them for ELF and COFF targets.
|
|
|
accbbf |
@@ -489,6 +503,10 @@ if [expr ([istarget "i*86-*-*"] || [ist
|
|
|
accbbf |
|
|
|
accbbf |
run_dump_test "addend"
|
|
|
accbbf |
|
|
|
accbbf |
+ if {[istarget "*-*-linux*"]} then {
|
|
|
accbbf |
+ run_dump_test "align-branch-3"
|
|
|
accbbf |
+ }
|
|
|
accbbf |
+
|
|
|
accbbf |
if { [gas_64_check] } then {
|
|
|
accbbf |
run_dump_test "att-regs"
|
|
|
accbbf |
run_dump_test "intel-regs"
|
|
|
accbbf |
@@ -892,6 +910,20 @@ if [expr ([istarget "i*86-*-*"] || [ista
|
|
|
accbbf |
run_list_test "x86-64-notrackbad" "-al"
|
|
|
accbbf |
run_dump_test "x86-64-movd"
|
|
|
accbbf |
run_dump_test "x86-64-movd-intel"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-1a"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-1b"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-1c"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-1d"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-1e"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-1f"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-1g"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-1h"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-2a"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-2b"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-2c"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-4a"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-4b"
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-5"
|
|
|
accbbf |
|
|
|
accbbf |
if { ![istarget "*-*-aix*"]
|
|
|
accbbf |
&& ![istarget "*-*-beos*"]
|
|
|
accbbf |
@@ -949,6 +981,10 @@ if [expr ([istarget "i*86-*-*"] || [ista
|
|
|
accbbf |
run_dump_test "x86-64-gotpcrel-no-relax"
|
|
|
accbbf |
|
|
|
accbbf |
run_dump_test "x86-64-addend"
|
|
|
accbbf |
+
|
|
|
accbbf |
+ if {[istarget "*-*-linux*"]} then {
|
|
|
accbbf |
+ run_dump_test "x86-64-align-branch-3"
|
|
|
accbbf |
+ }
|
|
|
accbbf |
}
|
|
|
accbbf |
|
|
|
accbbf |
set ASFLAGS "$old_ASFLAGS"
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1a.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1a.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1a.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1a.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,75 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ b: 55 push %rbp
|
|
|
accbbf |
+ c: 55 push %rbp
|
|
|
accbbf |
+ d: 55 push %rbp
|
|
|
accbbf |
+ e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 20: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 23: 74 5d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\)
|
|
|
accbbf |
+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3e: 5d pop %rbp
|
|
|
accbbf |
+ 3f: 5d pop %rbp
|
|
|
accbbf |
+ 40: 74 40 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 42: 5d pop %rbp
|
|
|
accbbf |
+ 43: 74 3d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\)
|
|
|
accbbf |
+ 49: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5e: 5d pop %rbp
|
|
|
accbbf |
+ 5f: 5d pop %rbp
|
|
|
accbbf |
+ 60: eb 26 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 62: eb 24 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 64: eb 22 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 66: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 69: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 72: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 75: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 78: 5d pop %rbp
|
|
|
accbbf |
+ 79: 5d pop %rbp
|
|
|
accbbf |
+ 7a: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 7d: 74 03 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 7f: 90 nop
|
|
|
accbbf |
+ 80: eb 06 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax
|
|
|
accbbf |
+ 85: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ c4: eb c2 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ c6: 5d pop %rbp
|
|
|
accbbf |
+ c7: c3 retq
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1b.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1b.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1b.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1b.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,75 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ b: 55 push %rbp
|
|
|
accbbf |
+ c: 55 push %rbp
|
|
|
accbbf |
+ d: 55 push %rbp
|
|
|
accbbf |
+ e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 20: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 23: 74 5d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\)
|
|
|
accbbf |
+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3e: 5d pop %rbp
|
|
|
accbbf |
+ 3f: 5d pop %rbp
|
|
|
accbbf |
+ 40: 74 40 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 42: 5d pop %rbp
|
|
|
accbbf |
+ 43: 74 3d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\)
|
|
|
accbbf |
+ 49: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5e: 5d pop %rbp
|
|
|
accbbf |
+ 5f: 5d pop %rbp
|
|
|
accbbf |
+ 60: eb 26 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 62: eb 24 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 64: eb 22 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 66: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 69: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 72: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 75: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 78: 5d pop %rbp
|
|
|
accbbf |
+ 79: 5d pop %rbp
|
|
|
accbbf |
+ 7a: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 7d: 74 03 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 7f: 90 nop
|
|
|
accbbf |
+ 80: eb 06 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax
|
|
|
accbbf |
+ 85: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ c4: eb c2 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ c6: 5d pop %rbp
|
|
|
accbbf |
+ c7: c3 retq
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1c.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1c.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1c.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1c.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,75 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch-prefix-size=1
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 8: 2e 55 cs push %rbp
|
|
|
accbbf |
+ a: 2e 55 cs push %rbp
|
|
|
accbbf |
+ c: 2e 55 cs push %rbp
|
|
|
accbbf |
+ e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 20: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 23: 74 5d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\)
|
|
|
accbbf |
+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3e: 5d pop %rbp
|
|
|
accbbf |
+ 3f: 5d pop %rbp
|
|
|
accbbf |
+ 40: 74 40 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 42: 5d pop %rbp
|
|
|
accbbf |
+ 43: 74 3d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\)
|
|
|
accbbf |
+ 49: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5e: 5d pop %rbp
|
|
|
accbbf |
+ 5f: 5d pop %rbp
|
|
|
accbbf |
+ 60: eb 26 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 62: eb 24 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 64: eb 22 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 66: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 69: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 72: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 75: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 78: 5d pop %rbp
|
|
|
accbbf |
+ 79: 5d pop %rbp
|
|
|
accbbf |
+ 7a: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 7d: 74 03 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 7f: 90 nop
|
|
|
accbbf |
+ 80: eb 06 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax
|
|
|
accbbf |
+ 85: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ c4: eb c2 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ c6: 5d pop %rbp
|
|
|
accbbf |
+ c7: c3 retq
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1d.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1d.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1d.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1d.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,74 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ b: 55 push %rbp
|
|
|
accbbf |
+ c: 55 push %rbp
|
|
|
accbbf |
+ d: 55 push %rbp
|
|
|
accbbf |
+ e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 20: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 23: 74 5b je 80 <foo\+0x80>
|
|
|
accbbf |
+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\)
|
|
|
accbbf |
+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3e: 5d pop %rbp
|
|
|
accbbf |
+ 3f: 5d pop %rbp
|
|
|
accbbf |
+ 40: 74 3e je 80 <foo\+0x80>
|
|
|
accbbf |
+ 42: 5d pop %rbp
|
|
|
accbbf |
+ 43: 74 3b je 80 <foo\+0x80>
|
|
|
accbbf |
+ 45: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 48: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 4b: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 51: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 54: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 57: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5d: 5d pop %rbp
|
|
|
accbbf |
+ 5e: 5d pop %rbp
|
|
|
accbbf |
+ 5f: eb 25 jmp 86 <foo\+0x86>
|
|
|
accbbf |
+ 61: eb 23 jmp 86 <foo\+0x86>
|
|
|
accbbf |
+ 63: eb 21 jmp 86 <foo\+0x86>
|
|
|
accbbf |
+ 65: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 68: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 6b: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 6e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 71: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 74: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 77: 5d pop %rbp
|
|
|
accbbf |
+ 78: 5d pop %rbp
|
|
|
accbbf |
+ 79: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 7c: 74 02 je 80 <foo\+0x80>
|
|
|
accbbf |
+ 7e: eb 06 jmp 86 <foo\+0x86>
|
|
|
accbbf |
+ 80: 8b 45 f4 mov -0xc\(%rbp\),%eax
|
|
|
accbbf |
+ 83: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 86: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 8c: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 92: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 98: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 9e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ aa: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ bc: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ c2: eb c2 jmp 86 <foo\+0x86>
|
|
|
accbbf |
+ c4: 5d pop %rbp
|
|
|
accbbf |
+ c5: c3 retq
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1e.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1e.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1e.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1e.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,74 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=jcc
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 8: 55 push %rbp
|
|
|
accbbf |
+ 9: 55 push %rbp
|
|
|
accbbf |
+ a: 55 push %rbp
|
|
|
accbbf |
+ b: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 20: 74 5b je 7d <foo\+0x7d>
|
|
|
accbbf |
+ 22: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 25: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 28: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3a: 5d pop %rbp
|
|
|
accbbf |
+ 3b: 5d pop %rbp
|
|
|
accbbf |
+ 3c: 74 3f je 7d <foo\+0x7d>
|
|
|
accbbf |
+ 3e: 2e 5d cs pop %rbp
|
|
|
accbbf |
+ 40: 74 3b je 7d <foo\+0x7d>
|
|
|
accbbf |
+ 42: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 45: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 48: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 4b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 51: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 54: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 57: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5a: 5d pop %rbp
|
|
|
accbbf |
+ 5b: 5d pop %rbp
|
|
|
accbbf |
+ 5c: eb 25 jmp 83 <foo\+0x83>
|
|
|
accbbf |
+ 5e: eb 23 jmp 83 <foo\+0x83>
|
|
|
accbbf |
+ 60: eb 21 jmp 83 <foo\+0x83>
|
|
|
accbbf |
+ 62: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 65: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 68: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 6b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 6e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 71: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 74: 5d pop %rbp
|
|
|
accbbf |
+ 75: 5d pop %rbp
|
|
|
accbbf |
+ 76: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 79: 74 02 je 7d <foo\+0x7d>
|
|
|
accbbf |
+ 7b: eb 06 jmp 83 <foo\+0x83>
|
|
|
accbbf |
+ 7d: 8b 45 f4 mov -0xc\(%rbp\),%eax
|
|
|
accbbf |
+ 80: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 83: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 89: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 8f: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 95: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 9b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a1: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a7: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ ad: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b3: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b9: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ bf: eb c2 jmp 83 <foo\+0x83>
|
|
|
accbbf |
+ c1: 5d pop %rbp
|
|
|
accbbf |
+ c2: c3 retq
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1f.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1f.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1f.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1f.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,75 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-1.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=jcc+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 8: 55 push %rbp
|
|
|
accbbf |
+ 9: 55 push %rbp
|
|
|
accbbf |
+ a: 55 push %rbp
|
|
|
accbbf |
+ b: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 20: 74 5d je 7f <foo\+0x7f>
|
|
|
accbbf |
+ 22: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 25: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 28: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3a: 5d pop %rbp
|
|
|
accbbf |
+ 3b: 5d pop %rbp
|
|
|
accbbf |
+ 3c: 74 41 je 7f <foo\+0x7f>
|
|
|
accbbf |
+ 3e: 2e 5d cs pop %rbp
|
|
|
accbbf |
+ 40: 74 3d je 7f <foo\+0x7f>
|
|
|
accbbf |
+ 42: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 45: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 48: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 4b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 51: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 54: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 57: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5a: 5d pop %rbp
|
|
|
accbbf |
+ 5b: 5d pop %rbp
|
|
|
accbbf |
+ 5c: eb 27 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 5e: 66 90 xchg %ax,%ax
|
|
|
accbbf |
+ 60: eb 23 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 62: eb 21 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 64: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 67: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 6a: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 6d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 70: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 73: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 76: 5d pop %rbp
|
|
|
accbbf |
+ 77: 5d pop %rbp
|
|
|
accbbf |
+ 78: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 7b: 74 02 je 7f <foo\+0x7f>
|
|
|
accbbf |
+ 7d: eb 06 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ 7f: 8b 45 f4 mov -0xc\(%rbp\),%eax
|
|
|
accbbf |
+ 82: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 85: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 8b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 91: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 97: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 9d: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a3: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a9: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ af: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b5: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ bb: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ c1: eb c2 jmp 85 <foo\+0x85>
|
|
|
accbbf |
+ c3: 5d pop %rbp
|
|
|
accbbf |
+ c4: c3 retq
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1g.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1g.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1g.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1g.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,75 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-1.s
|
|
|
accbbf |
+#as: -mbranches-within-32B-boundaries
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ b: 55 push %rbp
|
|
|
accbbf |
+ c: 55 push %rbp
|
|
|
accbbf |
+ d: 55 push %rbp
|
|
|
accbbf |
+ e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 20: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 23: 74 5d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\)
|
|
|
accbbf |
+ 29: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 32: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 35: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 38: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3e: 5d pop %rbp
|
|
|
accbbf |
+ 3f: 5d pop %rbp
|
|
|
accbbf |
+ 40: 74 40 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 42: 5d pop %rbp
|
|
|
accbbf |
+ 43: 74 3d je 82 <foo\+0x82>
|
|
|
accbbf |
+ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\)
|
|
|
accbbf |
+ 49: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5e: 5d pop %rbp
|
|
|
accbbf |
+ 5f: 5d pop %rbp
|
|
|
accbbf |
+ 60: eb 26 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 62: eb 24 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 64: eb 22 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 66: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 69: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 72: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 75: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 78: 5d pop %rbp
|
|
|
accbbf |
+ 79: 5d pop %rbp
|
|
|
accbbf |
+ 7a: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 7d: 74 03 je 82 <foo\+0x82>
|
|
|
accbbf |
+ 7f: 90 nop
|
|
|
accbbf |
+ 80: eb 06 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax
|
|
|
accbbf |
+ 85: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ c4: eb c2 jmp 88 <foo\+0x88>
|
|
|
accbbf |
+ c6: 5d pop %rbp
|
|
|
accbbf |
+ c7: c3 retq
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1h.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1h.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1h.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1h.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,74 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-1.s
|
|
|
accbbf |
+#as: -mbranches-within-32B-boundaries -malign-branch-boundary=0
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 8: 55 push %rbp
|
|
|
accbbf |
+ 9: 55 push %rbp
|
|
|
accbbf |
+ a: 55 push %rbp
|
|
|
accbbf |
+ b: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 20: 74 5a je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 22: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 25: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 28: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3a: 5d pop %rbp
|
|
|
accbbf |
+ 3b: 5d pop %rbp
|
|
|
accbbf |
+ 3c: 74 3e je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 3e: 5d pop %rbp
|
|
|
accbbf |
+ 3f: 74 3b je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 41: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 44: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 47: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 4a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 4d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 50: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 53: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 56: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 59: 5d pop %rbp
|
|
|
accbbf |
+ 5a: 5d pop %rbp
|
|
|
accbbf |
+ 5b: eb 25 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 5d: eb 23 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 5f: eb 21 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 61: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 64: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 67: 89 7d f8 mov %edi,-0x8\(%rbp\)
|
|
|
accbbf |
+ 6a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 6d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 70: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 73: 5d pop %rbp
|
|
|
accbbf |
+ 74: 5d pop %rbp
|
|
|
accbbf |
+ 75: 48 39 c5 cmp %rax,%rbp
|
|
|
accbbf |
+ 78: 74 02 je 7c <foo\+0x7c>
|
|
|
accbbf |
+ 7a: eb 06 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ 7c: 8b 45 f4 mov -0xc\(%rbp\),%eax
|
|
|
accbbf |
+ 7f: 89 45 fc mov %eax,-0x4\(%rbp\)
|
|
|
accbbf |
+ 82: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\)
|
|
|
accbbf |
+ be: eb c2 jmp 82 <foo\+0x82>
|
|
|
accbbf |
+ c0: 5d pop %rbp
|
|
|
accbbf |
+ c1: c3 retq
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1.s binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1.s
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-1.s 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-1.s 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,70 @@
|
|
|
accbbf |
+ .text
|
|
|
accbbf |
+ .globl foo
|
|
|
accbbf |
+ .p2align 4
|
|
|
accbbf |
+foo:
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movq %rsp, %rbp
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ cmp %rax, %rbp
|
|
|
accbbf |
+ je .L_2
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %edi, -8(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ popq %rbp
|
|
|
accbbf |
+ popq %rbp
|
|
|
accbbf |
+ je .L_2
|
|
|
accbbf |
+ popq %rbp
|
|
|
accbbf |
+ je .L_2
|
|
|
accbbf |
+ movl %eax, -4(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %edi, -8(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ popq %rbp
|
|
|
accbbf |
+ popq %rbp
|
|
|
accbbf |
+ jmp .L_3
|
|
|
accbbf |
+ jmp .L_3
|
|
|
accbbf |
+ jmp .L_3
|
|
|
accbbf |
+ movl %eax, -4(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %edi, -8(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ popq %rbp
|
|
|
accbbf |
+ popq %rbp
|
|
|
accbbf |
+ cmp %rax, %rbp
|
|
|
accbbf |
+ je .L_2
|
|
|
accbbf |
+ jmp .L_3
|
|
|
accbbf |
+.L_2:
|
|
|
accbbf |
+ movl -12(%rbp), %eax
|
|
|
accbbf |
+ movl %eax, -4(%rbp)
|
|
|
accbbf |
+.L_3:
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ movl %esi, -1200(%rbp)
|
|
|
accbbf |
+ jmp .L_3
|
|
|
accbbf |
+ popq %rbp
|
|
|
accbbf |
+ retq
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-2a.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-2a.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-2a.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-2a.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,50 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-2.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 8: 55 push %rbp
|
|
|
accbbf |
+ 9: 55 push %rbp
|
|
|
accbbf |
+ a: 55 push %rbp
|
|
|
accbbf |
+ b: 55 push %rbp
|
|
|
accbbf |
+ c: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 12: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 15: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 18: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1e: ff e0 jmpq \*%rax
|
|
|
accbbf |
+ 20: 55 push %rbp
|
|
|
accbbf |
+ 21: 55 push %rbp
|
|
|
accbbf |
+ 22: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 2a: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 2d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 30: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 33: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 36: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 39: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3c: ff d0 callq \*%rax
|
|
|
accbbf |
+ 3e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 41: 55 push %rbp
|
|
|
accbbf |
+ 42: 55 push %rbp
|
|
|
accbbf |
+ 43: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 4b: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 51: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 54: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 57: e8 [0-9a-f ]+ callq .*
|
|
|
accbbf |
+ 5c: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5f: 55 push %rbp
|
|
|
accbbf |
+ 60: 55 push %rbp
|
|
|
accbbf |
+ 61: 55 push %rbp
|
|
|
accbbf |
+ 62: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 6a: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 6d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 70: ff 14 25 00 00 00 00 callq \*0x0
|
|
|
accbbf |
+ 77: 55 push %rbp
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-2b.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-2b.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-2b.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-2b.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,50 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-2.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=indirect
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 64 89 04 25 01 00 00 00 fs fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ a: 55 push %rbp
|
|
|
accbbf |
+ b: 55 push %rbp
|
|
|
accbbf |
+ c: 55 push %rbp
|
|
|
accbbf |
+ d: 55 push %rbp
|
|
|
accbbf |
+ e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 20: ff e0 jmpq \*%rax
|
|
|
accbbf |
+ 22: 2e 2e 55 cs cs push %rbp
|
|
|
accbbf |
+ 25: 55 push %rbp
|
|
|
accbbf |
+ 26: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 2e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 40: ff d0 callq \*%rax
|
|
|
accbbf |
+ 42: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 45: 55 push %rbp
|
|
|
accbbf |
+ 46: 55 push %rbp
|
|
|
accbbf |
+ 47: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 4f: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 52: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 55: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 58: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5b: e8 [0-9a-f ]+ callq .*
|
|
|
accbbf |
+ 60: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 63: 55 push %rbp
|
|
|
accbbf |
+ 64: 55 push %rbp
|
|
|
accbbf |
+ 65: 55 push %rbp
|
|
|
accbbf |
+ 66: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 6e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 71: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 74: ff 14 25 00 00 00 00 callq \*0x0
|
|
|
accbbf |
+ 7b: 55 push %rbp
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-2c.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-2c.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-2c.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-2c.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,50 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-2.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=indirect+call
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 64 89 04 25 01 00 00 00 fs fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ a: 55 push %rbp
|
|
|
accbbf |
+ b: 55 push %rbp
|
|
|
accbbf |
+ c: 55 push %rbp
|
|
|
accbbf |
+ d: 55 push %rbp
|
|
|
accbbf |
+ e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 20: ff e0 jmpq \*%rax
|
|
|
accbbf |
+ 22: 2e 2e 55 cs cs push %rbp
|
|
|
accbbf |
+ 25: 55 push %rbp
|
|
|
accbbf |
+ 26: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 2e: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 40: ff d0 callq \*%rax
|
|
|
accbbf |
+ 42: 2e 2e 2e 2e 2e 89 75 f4 cs cs cs cs mov %esi,%cs:-0xc\(%rbp\)
|
|
|
accbbf |
+ 4a: 55 push %rbp
|
|
|
accbbf |
+ 4b: 55 push %rbp
|
|
|
accbbf |
+ 4c: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 54: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 57: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 5d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 60: e8 [0-9a-f ]+ callq .*
|
|
|
accbbf |
+ 65: 2e 2e 2e 2e 2e 89 75 f4 cs cs cs cs mov %esi,%cs:-0xc\(%rbp\)
|
|
|
accbbf |
+ 6d: 2e 2e 55 cs cs push %rbp
|
|
|
accbbf |
+ 70: 55 push %rbp
|
|
|
accbbf |
+ 71: 55 push %rbp
|
|
|
accbbf |
+ 72: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 7a: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 7d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 80: ff 14 25 00 00 00 00 callq \*0x0
|
|
|
accbbf |
+ 87: 55 push %rbp
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-2.s binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-2.s
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-2.s 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-2.s 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,44 @@
|
|
|
accbbf |
+ .text
|
|
|
accbbf |
+ .globl foo
|
|
|
accbbf |
+ .p2align 4
|
|
|
accbbf |
+foo:
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movq %rsp, %rbp
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ jmp *%rax
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ movq %rsp, %rbp
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ call *%rax
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ movq %rsp, %rbp
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ call foo
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ movq %rsp, %rbp
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ call *foo
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-3.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-3.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-3.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-3.d 2019-11-20 14:09:25.596915083 +0000
|
|
|
accbbf |
@@ -0,0 +1,32 @@
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=indirect+call
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 8: 55 push %rbp
|
|
|
accbbf |
+ 9: 55 push %rbp
|
|
|
accbbf |
+ a: 55 push %rbp
|
|
|
accbbf |
+ b: 55 push %rbp
|
|
|
accbbf |
+ c: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ f: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 12: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 15: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 18: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1e: e8 00 00 00 00 callq 23 <foo\+0x23>
|
|
|
accbbf |
+ 23: 55 push %rbp
|
|
|
accbbf |
+ 24: 55 push %rbp
|
|
|
accbbf |
+ 25: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 2d: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ 30: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 33: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 36: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 39: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3c: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3f: ff 15 00 00 00 00 callq \*0x0\(%rip\) # 45 <foo\+0x45>
|
|
|
accbbf |
+ 45: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-3.s binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-3.s
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-3.s 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-3.s 2019-11-20 14:09:25.597915075 +0000
|
|
|
accbbf |
@@ -0,0 +1,27 @@
|
|
|
accbbf |
+ .text
|
|
|
accbbf |
+ .globl foo
|
|
|
accbbf |
+ .p2align 4
|
|
|
accbbf |
+foo:
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movq %rsp, %rbp
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ call __tls_get_addr
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ movq %rsp, %rbp
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ call *__tls_get_addr@GOTPCREL(%rip)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-4a.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-4a.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-4a.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-4a.d 2019-11-20 14:09:25.597915075 +0000
|
|
|
accbbf |
@@ -0,0 +1,33 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-4.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 8: 55 push %rbp
|
|
|
accbbf |
+ 9: 55 push %rbp
|
|
|
accbbf |
+ a: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 10: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 13: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 16: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 19: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1c: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1f: c3 retq
|
|
|
accbbf |
+ 20: 55 push %rbp
|
|
|
accbbf |
+ 21: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 29: 55 push %rbp
|
|
|
accbbf |
+ 2a: 55 push %rbp
|
|
|
accbbf |
+ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3d: c2 1e 00 retq \$0x1e
|
|
|
accbbf |
+ 40: 55 push %rbp
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-4b.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-4b.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-4b.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-4b.d 2019-11-20 14:09:25.597915075 +0000
|
|
|
accbbf |
@@ -0,0 +1,33 @@
|
|
|
accbbf |
+#source: x86-64-align-branch-4.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=ret
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: 64 64 89 04 25 01 00 00 00 fs mov %eax,%fs:0x1
|
|
|
accbbf |
+ 9: 55 push %rbp
|
|
|
accbbf |
+ a: 55 push %rbp
|
|
|
accbbf |
+ b: 48 89 e5 mov %rsp,%rbp
|
|
|
accbbf |
+ e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 11: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 14: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 17: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 20: c3 retq
|
|
|
accbbf |
+ 21: 2e 2e 55 cs cs push %rbp
|
|
|
accbbf |
+ 24: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1
|
|
|
accbbf |
+ 2c: 55 push %rbp
|
|
|
accbbf |
+ 2d: 55 push %rbp
|
|
|
accbbf |
+ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 31: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 34: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 37: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 3d: 89 75 f4 mov %esi,-0xc\(%rbp\)
|
|
|
accbbf |
+ 40: c2 1e 00 retq \$0x1e
|
|
|
accbbf |
+ 43: 55 push %rbp
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-4.s binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-4.s
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-4.s 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-4.s 2019-11-20 14:09:25.597915075 +0000
|
|
|
accbbf |
@@ -0,0 +1,27 @@
|
|
|
accbbf |
+ .text
|
|
|
accbbf |
+ .globl foo
|
|
|
accbbf |
+ .p2align 4
|
|
|
accbbf |
+foo:
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movq %rsp, %rbp
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ ret
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movl %eax, %fs:0x1
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ movl %esi, -12(%rbp)
|
|
|
accbbf |
+ ret $30
|
|
|
accbbf |
+ pushq %rbp
|
|
|
accbbf |
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-5.d binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-5.d
|
|
|
accbbf |
--- binutils.orig/gas/testsuite/gas/i386/x86-64-align-branch-5.d 1970-01-01 01:00:00.000000000 +0100
|
|
|
accbbf |
+++ binutils-2.30/gas/testsuite/gas/i386/x86-64-align-branch-5.d 2019-11-20 14:09:25.597915075 +0000
|
|
|
accbbf |
@@ -0,0 +1,37 @@
|
|
|
accbbf |
+#source: align-branch-5.s
|
|
|
accbbf |
+#as: -malign-branch-boundary=32 -malign-branch=jcc+fused+jmp
|
|
|
accbbf |
+#objdump: -dw
|
|
|
accbbf |
+
|
|
|
accbbf |
+.*: +file format .*
|
|
|
accbbf |
+
|
|
|
accbbf |
+Disassembly of section .text:
|
|
|
accbbf |
+
|
|
|
accbbf |
+0+ <foo>:
|
|
|
accbbf |
+ 0: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 3: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 6: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 9: 89 d1 mov %edx,%ecx
|
|
|
accbbf |
+ b: 31 c0 xor %eax,%eax
|
|
|
accbbf |
+ d: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 10: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 13: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 16: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 19: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 1c: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 1f: f6 c2 02 test \$0x2,%dl
|
|
|
accbbf |
+ 22: f3 ab rep stos %eax,%es:\(%rdi\)
|
|
|
accbbf |
+ 24: 75 dd jne 3 <foo\+0x3>
|
|
|
accbbf |
+ 26: 31 c0 xor %eax,%eax
|
|
|
accbbf |
+ 28: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 2b: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 2e: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 31: 89 d1 mov %edx,%ecx
|
|
|
accbbf |
+ 33: 31 c0 xor %eax,%eax
|
|
|
accbbf |
+ 35: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 38: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 3b: c1 e9 02 shr \$0x2,%ecx
|
|
|
accbbf |
+ 3e: f6 c2 02 test \$0x2,%dl
|
|
|
accbbf |
+ 41: e8 00 00 00 00 callq 46 <foo\+0x46>
|
|
|
accbbf |
+ 46: 75 e3 jne 2b <foo\+0x2b>
|
|
|
accbbf |
+ 48: 31 c0 xor %eax,%eax
|
|
|
accbbf |
+#pass
|
|
|
accbbf |
diff -rupN binutils.orig/gas/write.c binutils-2.30/gas/write.c
|
|
|
accbbf |
--- binutils.orig/gas/write.c 2019-11-20 10:59:21.592883731 +0000
|
|
|
accbbf |
+++ binutils-2.30/gas/write.c 2019-11-20 14:30:33.613133740 +0000
|
|
|
accbbf |
@@ -2987,7 +2987,12 @@ relax_segment (struct frag *segment_frag
|
|
|
accbbf |
#ifdef TC_GENERIC_RELAX_TABLE
|
|
|
accbbf |
/* The default way to relax a frag is to look through
|
|
|
accbbf |
TC_GENERIC_RELAX_TABLE. */
|
|
|
accbbf |
+#ifdef md_generic_table_relax_frag
|
|
|
accbbf |
+ growth = md_generic_table_relax_frag (segment, fragP,
|
|
|
accbbf |
+ stretch);
|
|
|
accbbf |
+#else
|
|
|
accbbf |
growth = relax_frag (segment, fragP, stretch);
|
|
|
accbbf |
+#endif /* md_generic_table_relax_frag */
|
|
|
accbbf |
#endif /* TC_GENERIC_RELAX_TABLE */
|
|
|
accbbf |
#endif
|
|
|
accbbf |
break;
|