1*a9fa9459Szrj@c Copyright (C) 2011-2016 Free Software Foundation, Inc. 2*a9fa9459Szrj@c This is part of the GAS manual. 3*a9fa9459Szrj@c For copying conditions, see the file as.texinfo. 4*a9fa9459Szrj@ifset GENERIC 5*a9fa9459Szrj@page 6*a9fa9459Szrj@node TILEPro-Dependent 7*a9fa9459Szrj@chapter TILEPro Dependent Features 8*a9fa9459Szrj@end ifset 9*a9fa9459Szrj@ifclear GENERIC 10*a9fa9459Szrj@node Machine Dependencies 11*a9fa9459Szrj@chapter TILEPro Dependent Features 12*a9fa9459Szrj@end ifclear 13*a9fa9459Szrj 14*a9fa9459Szrj@cindex TILEPro support 15*a9fa9459Szrj@menu 16*a9fa9459Szrj* TILEPro Options:: TILEPro Options 17*a9fa9459Szrj* TILEPro Syntax:: TILEPro Syntax 18*a9fa9459Szrj* TILEPro Directives:: TILEPro Directives 19*a9fa9459Szrj@end menu 20*a9fa9459Szrj 21*a9fa9459Szrj@node TILEPro Options 22*a9fa9459Szrj@section Options 23*a9fa9459Szrj 24*a9fa9459Szrj@code{@value{AS}} has no machine-dependent command-line options for 25*a9fa9459SzrjTILEPro. 26*a9fa9459Szrj 27*a9fa9459Szrj@node TILEPro Syntax 28*a9fa9459Szrj@section Syntax 29*a9fa9459Szrj@cindex TILEPro syntax 30*a9fa9459Szrj@cindex syntax, TILEPro 31*a9fa9459Szrj 32*a9fa9459SzrjBlock comments are delimited by @samp{/*} and @samp{*/}. End of line 33*a9fa9459Szrjcomments may be introduced by @samp{#}. 34*a9fa9459Szrj 35*a9fa9459SzrjInstructions consist of a leading opcode or macro name followed by 36*a9fa9459Szrjwhitespace and an optional comma-separated list of operands: 37*a9fa9459Szrj 38*a9fa9459Szrj@smallexample 39*a9fa9459Szrj@var{opcode} [@var{operand}, @dots{}] 40*a9fa9459Szrj@end smallexample 41*a9fa9459Szrj 42*a9fa9459SzrjInstructions must be separated by a newline or semicolon. 43*a9fa9459Szrj 44*a9fa9459SzrjThere are two ways to write code: either write naked instructions, 45*a9fa9459Szrjwhich the assembler is free to combine into VLIW bundles, or specify 46*a9fa9459Szrjthe VLIW bundles explicitly. 47*a9fa9459Szrj 48*a9fa9459SzrjBundles are specified using curly braces: 49*a9fa9459Szrj 50*a9fa9459Szrj@smallexample 51*a9fa9459Szrj@{ @var{add} r3,r4,r5 ; @var{add} r7,r8,r9 ; @var{lw} r10,r11 @} 52*a9fa9459Szrj@end smallexample 53*a9fa9459Szrj 54*a9fa9459SzrjA bundle can span multiple lines. If you want to put multiple 55*a9fa9459Szrjinstructions on a line, whether in a bundle or not, you need to 56*a9fa9459Szrjseparate them with semicolons as in this example. 57*a9fa9459Szrj 58*a9fa9459SzrjA bundle may contain one or more instructions, up to the limit 59*a9fa9459Szrjspecified by the ISA (currently three). If fewer instructions are 60*a9fa9459Szrjspecified than the hardware supports in a bundle, the assembler 61*a9fa9459Szrjinserts @code{fnop} instructions automatically. 62*a9fa9459Szrj 63*a9fa9459SzrjThe assembler will prefer to preserve the ordering of instructions 64*a9fa9459Szrjwithin the bundle, putting the first instruction in a lower-numbered 65*a9fa9459Szrjpipeline than the next one, etc. This fact, combined with the 66*a9fa9459Szrjoptional use of explicit @code{fnop} or @code{nop} instructions, 67*a9fa9459Szrjallows precise control over which pipeline executes each instruction. 68*a9fa9459Szrj 69*a9fa9459SzrjIf the instructions cannot be bundled in the listed order, the 70*a9fa9459Szrjassembler will automatically try to find a valid pipeline 71*a9fa9459Szrjassignment. If there is no way to bundle the instructions together, 72*a9fa9459Szrjthe assembler reports an error. 73*a9fa9459Szrj 74*a9fa9459SzrjThe assembler does not yet auto-bundle (automatically combine multiple 75*a9fa9459Szrjinstructions into one bundle), but it reserves the right to do so in 76*a9fa9459Szrjthe future. If you want to force an instruction to run by itself, put 77*a9fa9459Szrjit in a bundle explicitly with curly braces and use @code{nop} 78*a9fa9459Szrjinstructions (not @code{fnop}) to fill the remaining pipeline slots in 79*a9fa9459Szrjthat bundle. 80*a9fa9459Szrj 81*a9fa9459Szrj@menu 82*a9fa9459Szrj* TILEPro Opcodes:: Opcode Naming Conventions. 83*a9fa9459Szrj* TILEPro Registers:: Register Naming. 84*a9fa9459Szrj* TILEPro Modifiers:: Symbolic Operand Modifiers. 85*a9fa9459Szrj@end menu 86*a9fa9459Szrj 87*a9fa9459Szrj@node TILEPro Opcodes 88*a9fa9459Szrj@subsection Opcode Names 89*a9fa9459Szrj@cindex TILEPro opcode names 90*a9fa9459Szrj@cindex opcode names, TILEPro 91*a9fa9459Szrj 92*a9fa9459SzrjFor a complete list of opcodes and descriptions of their semantics, 93*a9fa9459Szrjsee @cite{TILE Processor User Architecture Manual}, available upon 94*a9fa9459Szrjrequest at www.tilera.com. 95*a9fa9459Szrj 96*a9fa9459Szrj@node TILEPro Registers 97*a9fa9459Szrj@subsection Register Names 98*a9fa9459Szrj@cindex TILEPro register names 99*a9fa9459Szrj@cindex register names, TILEPro 100*a9fa9459Szrj 101*a9fa9459SzrjGeneral-purpose registers are represented by predefined symbols of the 102*a9fa9459Szrjform @samp{r@var{N}}, where @var{N} represents a number between 103*a9fa9459Szrj@code{0} and @code{63}. However, the following registers have 104*a9fa9459Szrjcanonical names that must be used instead: 105*a9fa9459Szrj 106*a9fa9459Szrj@table @code 107*a9fa9459Szrj@item r54 108*a9fa9459Szrjsp 109*a9fa9459Szrj 110*a9fa9459Szrj@item r55 111*a9fa9459Szrjlr 112*a9fa9459Szrj 113*a9fa9459Szrj@item r56 114*a9fa9459Szrjsn 115*a9fa9459Szrj 116*a9fa9459Szrj@item r57 117*a9fa9459Szrjidn0 118*a9fa9459Szrj 119*a9fa9459Szrj@item r58 120*a9fa9459Szrjidn1 121*a9fa9459Szrj 122*a9fa9459Szrj@item r59 123*a9fa9459Szrjudn0 124*a9fa9459Szrj 125*a9fa9459Szrj@item r60 126*a9fa9459Szrjudn1 127*a9fa9459Szrj 128*a9fa9459Szrj@item r61 129*a9fa9459Szrjudn2 130*a9fa9459Szrj 131*a9fa9459Szrj@item r62 132*a9fa9459Szrjudn3 133*a9fa9459Szrj 134*a9fa9459Szrj@item r63 135*a9fa9459Szrjzero 136*a9fa9459Szrj 137*a9fa9459Szrj@end table 138*a9fa9459Szrj 139*a9fa9459SzrjThe assembler will emit a warning if a numeric name is used instead of 140*a9fa9459Szrjthe canonical name. The @code{.no_require_canonical_reg_names} 141*a9fa9459Szrjassembler pseudo-op turns off this 142*a9fa9459Szrjwarning. @code{.require_canonical_reg_names} turns it back on. 143*a9fa9459Szrj 144*a9fa9459Szrj@node TILEPro Modifiers 145*a9fa9459Szrj@subsection Symbolic Operand Modifiers 146*a9fa9459Szrj@cindex TILEPro modifiers 147*a9fa9459Szrj@cindex symbol modifiers, TILEPro 148*a9fa9459Szrj 149*a9fa9459SzrjThe assembler supports several modifiers when using symbol addresses 150*a9fa9459Szrjin TILEPro instruction operands. The general syntax is the following: 151*a9fa9459Szrj 152*a9fa9459Szrj@smallexample 153*a9fa9459Szrjmodifier(symbol) 154*a9fa9459Szrj@end smallexample 155*a9fa9459Szrj 156*a9fa9459SzrjThe following modifiers are supported: 157*a9fa9459Szrj 158*a9fa9459Szrj@table @code 159*a9fa9459Szrj 160*a9fa9459Szrj@item lo16 161*a9fa9459Szrj 162*a9fa9459SzrjThis modifier is used to load the low 16 bits of the symbol's address, 163*a9fa9459Szrjsign-extended to a 32-bit value (sign-extension allows it to be 164*a9fa9459Szrjrange-checked against signed 16 bit immediate operands without 165*a9fa9459Szrjcomplaint). 166*a9fa9459Szrj 167*a9fa9459Szrj@item hi16 168*a9fa9459Szrj 169*a9fa9459SzrjThis modifier is used to load the high 16 bits of the symbol's 170*a9fa9459Szrjaddress, also sign-extended to a 32-bit value. 171*a9fa9459Szrj 172*a9fa9459Szrj@item ha16 173*a9fa9459Szrj 174*a9fa9459Szrj@code{ha16(N)} is identical to @code{hi16(N)}, except if 175*a9fa9459Szrj@code{lo16(N)} is negative it adds one to the @code{hi16(N)} 176*a9fa9459Szrjvalue. This way @code{lo16} and @code{ha16} can be added to create any 177*a9fa9459Szrj32-bit value using @code{auli}. For example, here is how you move an 178*a9fa9459Szrjarbitrary 32-bit address into r3: 179*a9fa9459Szrj 180*a9fa9459Szrj@smallexample 181*a9fa9459Szrjmoveli r3, lo16(sym) 182*a9fa9459Szrjauli r3, r3, ha16(sym) 183*a9fa9459Szrj@end smallexample 184*a9fa9459Szrj 185*a9fa9459Szrj@item got 186*a9fa9459Szrj 187*a9fa9459SzrjThis modifier is used to load the offset of the GOT entry 188*a9fa9459Szrjcorresponding to the symbol. 189*a9fa9459Szrj 190*a9fa9459Szrj@item got_lo16 191*a9fa9459Szrj 192*a9fa9459SzrjThis modifier is used to load the sign-extended low 16 bits of the 193*a9fa9459Szrjoffset of the GOT entry corresponding to the symbol. 194*a9fa9459Szrj 195*a9fa9459Szrj@item got_hi16 196*a9fa9459Szrj 197*a9fa9459SzrjThis modifier is used to load the sign-extended high 16 bits of the 198*a9fa9459Szrjoffset of the GOT entry corresponding to the symbol. 199*a9fa9459Szrj 200*a9fa9459Szrj@item got_ha16 201*a9fa9459Szrj 202*a9fa9459SzrjThis modifier is like @code{got_hi16}, but it adds one if 203*a9fa9459Szrj@code{got_lo16} of the input value is negative. 204*a9fa9459Szrj 205*a9fa9459Szrj@item plt 206*a9fa9459Szrj 207*a9fa9459SzrjThis modifier is used for function symbols. It causes a 208*a9fa9459Szrj@emph{procedure linkage table}, an array of code stubs, to be created 209*a9fa9459Szrjat the time the shared object is created or linked against, together 210*a9fa9459Szrjwith a global offset table entry. The value is a pc-relative offset 211*a9fa9459Szrjto the corresponding stub code in the procedure linkage table. This 212*a9fa9459Szrjarrangement causes the run-time symbol resolver to be called to look 213*a9fa9459Szrjup and set the value of the symbol the first time the function is 214*a9fa9459Szrjcalled (at latest; depending environment variables). It is only safe 215*a9fa9459Szrjto leave the symbol unresolved this way if all references are function 216*a9fa9459Szrjcalls. 217*a9fa9459Szrj 218*a9fa9459Szrj@item tls_gd 219*a9fa9459Szrj 220*a9fa9459SzrjThis modifier is used to load the offset of the GOT entry of the 221*a9fa9459Szrjsymbol's TLS descriptor, to be used for general-dynamic TLS accesses. 222*a9fa9459Szrj 223*a9fa9459Szrj@item tls_gd_lo16 224*a9fa9459Szrj 225*a9fa9459SzrjThis modifier is used to load the sign-extended low 16 bits of the 226*a9fa9459Szrjoffset of the GOT entry of the symbol's TLS descriptor, to be used for 227*a9fa9459Szrjgeneral dynamic TLS accesses. 228*a9fa9459Szrj 229*a9fa9459Szrj@item tls_gd_hi16 230*a9fa9459Szrj 231*a9fa9459SzrjThis modifier is used to load the sign-extended high 16 bits of the 232*a9fa9459Szrjoffset of the GOT entry of the symbol's TLS descriptor, to be used for 233*a9fa9459Szrjgeneral dynamic TLS accesses. 234*a9fa9459Szrj 235*a9fa9459Szrj@item tls_gd_ha16 236*a9fa9459Szrj 237*a9fa9459SzrjThis modifier is like @code{tls_gd_hi16}, but it adds one to the value 238*a9fa9459Szrjif @code{tls_gd_lo16} of the input value is negative. 239*a9fa9459Szrj 240*a9fa9459Szrj@item tls_ie 241*a9fa9459Szrj 242*a9fa9459SzrjThis modifier is used to load the offset of the GOT entry containing 243*a9fa9459Szrjthe offset of the symbol's address from the TCB, to be used for 244*a9fa9459Szrjinitial-exec TLS accesses. 245*a9fa9459Szrj 246*a9fa9459Szrj@item tls_ie_lo16 247*a9fa9459Szrj 248*a9fa9459SzrjThis modifier is used to load the low 16 bits of the offset of the GOT 249*a9fa9459Szrjentry containing the offset of the symbol's address from the TCB, to 250*a9fa9459Szrjbe used for initial-exec TLS accesses. 251*a9fa9459Szrj 252*a9fa9459Szrj@item tls_ie_hi16 253*a9fa9459Szrj 254*a9fa9459SzrjThis modifier is used to load the high 16 bits of the offset of the 255*a9fa9459SzrjGOT entry containing the offset of the symbol's address from the TCB, 256*a9fa9459Szrjto be used for initial-exec TLS accesses. 257*a9fa9459Szrj 258*a9fa9459Szrj@item tls_ie_ha16 259*a9fa9459Szrj 260*a9fa9459SzrjThis modifier is like @code{tls_ie_hi16}, but it adds one to the value 261*a9fa9459Szrjif @code{tls_ie_lo16} of the input value is negative. 262*a9fa9459Szrj 263*a9fa9459Szrj@item tls_le 264*a9fa9459Szrj 265*a9fa9459SzrjThis modifier is used to load the offset of the symbol's address from 266*a9fa9459Szrjthe TCB, to be used for local-exec TLS accesses. 267*a9fa9459Szrj 268*a9fa9459Szrj@item tls_le_lo16 269*a9fa9459Szrj 270*a9fa9459SzrjThis modifier is used to load the low 16 bits of the offset of the 271*a9fa9459Szrjsymbol's address from the TCB, to be used for local-exec TLS accesses. 272*a9fa9459Szrj 273*a9fa9459Szrj@item tls_le_hi16 274*a9fa9459Szrj 275*a9fa9459SzrjThis modifier is used to load the high 16 bits of the offset of the 276*a9fa9459Szrjsymbol's address from the TCB, to be used for local-exec TLS accesses. 277*a9fa9459Szrj 278*a9fa9459Szrj@item tls_le_ha16 279*a9fa9459Szrj 280*a9fa9459SzrjThis modifier is like @code{tls_le_hi16}, but it adds one to the value 281*a9fa9459Szrjif @code{tls_le_lo16} of the input value is negative. 282*a9fa9459Szrj 283*a9fa9459Szrj@item tls_gd_call 284*a9fa9459Szrj 285*a9fa9459SzrjThis modifier is used to tag an instrution as the ``call'' part of a 286*a9fa9459Szrjcalling sequence for a TLS GD reference of its operand. 287*a9fa9459Szrj 288*a9fa9459Szrj@item tls_gd_add 289*a9fa9459Szrj 290*a9fa9459SzrjThis modifier is used to tag an instruction as the ``add'' part of a 291*a9fa9459Szrjcalling sequence for a TLS GD reference of its operand. 292*a9fa9459Szrj 293*a9fa9459Szrj@item tls_ie_load 294*a9fa9459Szrj 295*a9fa9459SzrjThis modifier is used to tag an instruction as the ``load'' part of a 296*a9fa9459Szrjcalling sequence for a TLS IE reference of its operand. 297*a9fa9459Szrj 298*a9fa9459Szrj@end table 299*a9fa9459Szrj 300*a9fa9459Szrj@node TILEPro Directives 301*a9fa9459Szrj@section TILEPro Directives 302*a9fa9459Szrj@cindex machine directives, TILEPro 303*a9fa9459Szrj@cindex TILEPro machine directives 304*a9fa9459Szrj 305*a9fa9459Szrj@table @code 306*a9fa9459Szrj 307*a9fa9459Szrj@cindex @code{.align} directive, TILEPro 308*a9fa9459Szrj@item .align @var{expression} [, @var{expression}] 309*a9fa9459SzrjThis is the generic @var{.align} directive. The first argument is the 310*a9fa9459Szrjrequested alignment in bytes. 311*a9fa9459Szrj 312*a9fa9459Szrj@cindex @code{.allow_suspicious_bundles} directive, TILEPro 313*a9fa9459Szrj@item .allow_suspicious_bundles 314*a9fa9459SzrjTurns on error checking for combinations of instructions in a bundle 315*a9fa9459Szrjthat probably indicate a programming error. This is on by default. 316*a9fa9459Szrj 317*a9fa9459Szrj@item .no_allow_suspicious_bundles 318*a9fa9459SzrjTurns off error checking for combinations of instructions in a bundle 319*a9fa9459Szrjthat probably indicate a programming error. 320*a9fa9459Szrj 321*a9fa9459Szrj@cindex @code{.require_canonical_reg_names} directive, TILEPro 322*a9fa9459Szrj@item .require_canonical_reg_names 323*a9fa9459SzrjRequire that canonical register names be used, and emit a warning if 324*a9fa9459Szrjthe numeric names are used. This is on by default. 325*a9fa9459Szrj 326*a9fa9459Szrj@item .no_require_canonical_reg_names 327*a9fa9459SzrjPermit the use of numeric names for registers that have canonical 328*a9fa9459Szrjnames. 329*a9fa9459Szrj 330*a9fa9459Szrj@end table 331*a9fa9459Szrj 332