2 * Copyright (c) 2013 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
10 * This test attempts to get both the assembler and the linker to generate
11 * all the different kinds of nop instructions they will generate when
12 * doing alignment padding in the code segment. Running the output through
13 * the validator ensures that it accepts all these nop forms.
18 * Create the circumstance where exactly |length| bytes must be
19 * filled to perform '.p2align 5', and then let the assembler fill
20 * it with its choice of nops.
23 test_as_nop_\length\():
24 .fill 32 - \length, 1, 0xf4
29 * Now create the same circumstance in the linker when it stitches
30 * this section to the next one (which has sh_addralign=32).
32 .pushsection .text.nop.\length, "ax", @progbits
34 test_ld_nop_\length\():
35 .fill 32 - \length, 1, 0xf4
71 * This section follows .text.nop.31 and creates (by virtue of its
72 * alignment) the need for the linker to generate the last nop
75 .pushsection .text.nop.end, "ax", @progbits