1 @c Copyright (C) 2015-2019 Free Software Foundation, Inc.
2 @c This is part of the GAS manual.
3 @c For copying conditions, see the file as.texinfo.
8 @chapter PRU Dependent Features
13 * PRU Options:: Options
15 * PRU Relocations:: Relocations
16 * PRU Directives:: PRU Machine Directives
17 * PRU Opcodes:: Opcodes
23 @cindex options for PRU
28 @cindex @code{mlink-relax} command-line option, PRU
30 Assume that LD would optimize LDI32 instructions by checking the upper
31 16 bits of the @var{expression}. If they are all zeros, then LD would
32 shorten the LDI32 instruction to a single LDI. In such case @code{@value{AS}}
33 will output DIFF relocations for diff expressions.
35 @cindex @code{mno-link-relax} command-line option, PRU
37 Assume that LD would not optimize LDI32 instructions. As a consequence,
38 DIFF relocations will not be emitted.
40 @cindex @code{mno-warn-regname-label} command-line option, PRU
41 @item -mno-warn-regname-label
42 Do not warn if a label name matches a register name. Usually assembler
43 programmers will want this warning to be emitted. C compilers may want
52 * PRU Chars:: Special Characters
57 @subsection Special Characters
59 @cindex line comment character, PRU
60 @cindex PRU line comment character
61 @samp{#} and @samp{;} are the line comment characters.
65 @section PRU Machine Relocations
67 @cindex machine relocations, PRU
68 @cindex PRU machine relocations
72 @cindex @code{pmem} directive, PRU
73 @item %pmem(@var{expression})
74 Convert @var{expression} from byte-address to a
75 word-address. In other words, shift right by two.
77 @item %label(@var{expression})
78 Mark the given operand as a label. This is useful if you need to jump to
79 a label that matches a register name.
84 jmp r1 ; Will jump to register R1
85 jmp %label(r1) ; Will jump to label r1
93 @section PRU Machine Directives
95 @cindex machine directives, PRU
96 @cindex PRU machine directives
100 @cindex @code{align} directive, PRU
101 @item .align @var{expression} [, @var{expression}]
102 This is the generic @code{.align} directive, however
103 this aligns to a power of two.
105 @cindex @code{word} directive, PRU
106 @item .word @var{expression}
107 Create an aligned constant 4 bytes in size.
109 @cindex @code{dword} directive, PRU
110 @item .dword @var{expression}
111 Create an aligned constant 8 bytes in size.
113 @cindex @code{2byte} directive, PRU
114 @item .2byte @var{expression}
115 Create an unaligned constant 2 bytes in size.
117 @cindex @code{4byte} directive, PRU
118 @item .4byte @var{expression}
119 Create an unaligned constant 4 bytes in size.
121 @cindex @code{8byte} directive, PRU
122 @item .8byte @var{expression}
123 Create an unaligned constant 8 bytes in size.
125 @cindex @code{16byte} directive, PRU
126 @item .16byte @var{expression}
127 Create an unaligned constant 16 bytes in size.
129 @cindex @code{set no_warn_regname_label} directive, PRU
130 @item .set no_warn_regname_label
131 Do not output warnings when a label name matches a register name. Equivalent
132 to passing the @code{-mno-warn-regname-label} command-line option.
140 @cindex opcodes for PRU
141 @code{@value{AS}} implements all the standard PRU core V3 opcodes in the
142 original pasm assembler. Older cores are not supported by @code{@value{AS}}.
144 GAS also implements the LDI32 pseudo instruction for loading a 32-bit
145 immediate value into a register.
148 ldi32 sp, __stack_top
149 ldi32 r14, 0x12345678