mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
7c31ae1375
* doc/all.texi: Add NS32K * doc/as.texinfo: Remove target specific details of which characters act as comment initiators and statement separators into individual target specific files. * doc/c-alpha.texi (Alpha-Chars): Document special behaviour of the hash character at the start of a line. * doc/c-arm.texi (ARM-Chars): Likewise. * doc/c-avr.texi (AVR-Chars): Likewise. * doc/c-d10v.texi (D10V-Chars): Likewise. * doc/c-d30v.texi (D30V-Chars): Likewise. * doc/c-mmix.texi (MMIX-Chars): Likewise. * doc/c-s390.texi (s390 characters): Likewise. * doc/c-sh.texi (SH-Chars): Likewise. * doc/c-sh64.texi (SH64-Chars): Likewise. * doc/c-sparc.texi (SPARC-Chars): Likewise. * doc/c-tic6x.texi (TIC6X Syntax): Likewise. * doc/c-xtensa.texi (Xtensa Syntax): Likewise. * doc/c-z80.texi (Z80-Chars): Likewise. * doc/c-z8k.texi (Z8000-Chars): Likewise. * doc/c-pdp11.texi (PDP11-Syntax): Document line separator character. * doc/c-arc.texi (ARC-Chars): Fill in this subsection. * doc/c-bfin.texi (Blackfin Syntax): Document line comment and line separator characters. * doc/c-cr16.texi (CR16 Syntax): Likewise. * doc/c-i386.texi (i386-Chars): Likewise. * doc/c-i860.texi (i860-Chars): Likewise. * doc/c-i960.texi (i960-Chars): Likewise. * doc/c-ip2k.texi (IP2K-Chars): Likewise. * doc/c-lm32.texi (LM32-Chars): likewise. * doc/c-m32c.texi (M32C-Chars): Likewise. * doc/c-m68hc11.texi (M68HC11-syntax): Likewise. * doc/c-m68k.texi (M68K-Chars): Likewise. * doc/c-microblaze.texi (MicroBlaze-Chars): Likewise. * doc/c-msp430.texi (MSP430-Chars): Likewise. * doc/c-mt.texi (MT-Chars): Likewise. * doc/c-ns32k.texi (NS32K-Chars): Likewise. * doc/c-pj.texi (PJ-Chars): Likewise. * doc/c-ppc.texi (PowerPC-Chars): Likewise. * doc/c-rx.texi (RX-Chars): Likewise. * doc/c-score.texi (SCORE-Chars): Likewise. * doc/c-tic54x.texi (TIC54X-Chars): Likewise. * doc/c-v850.texi (V850-Chars): Likewise. * doc/c-vax.texi (VAX-Chars): Likewise. * doc/c-xc16x.texi (xc16x-Chars): Likewise.
150 lines
3.9 KiB
Plaintext
150 lines
3.9 KiB
Plaintext
@c Copyright 2005, 2008
|
|
@c Free Software Foundation, Inc.
|
|
@c This is part of the GAS manual.
|
|
@c For copying conditions, see the file as.texinfo.
|
|
@ifset GENERIC
|
|
@page
|
|
@node M32C-Dependent
|
|
@chapter M32C Dependent Features
|
|
@end ifset
|
|
@ifclear GENERIC
|
|
@node Machine Dependencies
|
|
@chapter M32C Dependent Features
|
|
@end ifclear
|
|
|
|
@cindex M32C support
|
|
|
|
@code{@value{AS}} can assemble code for several different members of
|
|
the Renesas M32C family. Normally the default is to assemble code for
|
|
the M16C microprocessor. The @code{-m32c} option may be used to
|
|
change the default to the M32C microprocessor.
|
|
|
|
@menu
|
|
* M32C-Opts:: M32C Options
|
|
* M32C-Syntax:: M32C Syntax
|
|
@end menu
|
|
|
|
@node M32C-Opts
|
|
@section M32C Options
|
|
|
|
@cindex options, M32C
|
|
@cindex M32C options
|
|
|
|
The Renesas M32C version of @code{@value{AS}} has these
|
|
machine-dependent options:
|
|
|
|
@table @code
|
|
@item -m32c
|
|
@cindex @samp{-m32c} option, M32C
|
|
@cindex architecture options, M32C
|
|
@cindex M32C architecture option
|
|
Assemble M32C instructions.
|
|
|
|
@item -m16c
|
|
@cindex @samp{-m16c} option, M16C
|
|
@cindex architecture options, M16C
|
|
@cindex M16C architecture option
|
|
Assemble M16C instructions (default).
|
|
|
|
@item -relax
|
|
Enable support for link-time relaxations.
|
|
|
|
@item -h-tick-hex
|
|
Support H'00 style hex constants in addition to 0x00 style.
|
|
|
|
|
|
@end table
|
|
|
|
@node M32C-Syntax
|
|
@section M32C Syntax
|
|
@menu
|
|
* M32C-Modifiers:: Symbolic Operand Modifiers
|
|
* M32C-Chars:: Special Characters
|
|
@end menu
|
|
|
|
@node M32C-Modifiers
|
|
@subsection Symbolic Operand Modifiers
|
|
|
|
@cindex M32C modifiers
|
|
@cindex modifiers, M32C
|
|
|
|
The assembler supports several modifiers when using symbol addresses
|
|
in M32C instruction operands. The general syntax is the following:
|
|
|
|
@smallexample
|
|
%modifier(symbol)
|
|
@end smallexample
|
|
|
|
@table @code
|
|
@cindex symbol modifiers
|
|
|
|
@item %dsp8
|
|
@itemx %dsp16
|
|
|
|
These modifiers override the assembler's assumptions about how big a
|
|
symbol's address is. Normally, when it sees an operand like
|
|
@samp{sym[a0]} it assumes @samp{sym} may require the widest
|
|
displacement field (16 bits for @samp{-m16c}, 24 bits for
|
|
@samp{-m32c}). These modifiers tell it to assume the address will fit
|
|
in an 8 or 16 bit (respectively) unsigned displacement. Note that, of
|
|
course, if it doesn't actually fit you will get linker errors. Example:
|
|
|
|
@smallexample
|
|
mov.w %dsp8(sym)[a0],r1
|
|
mov.b #0,%dsp8(sym)[a0]
|
|
@end smallexample
|
|
|
|
@item %hi8
|
|
|
|
This modifier allows you to load bits 16 through 23 of a 24 bit
|
|
address into an 8 bit register. This is useful with, for example, the
|
|
M16C @samp{smovf} instruction, which expects a 20 bit address in
|
|
@samp{r1h} and @samp{a0}. Example:
|
|
|
|
@smallexample
|
|
mov.b #%hi8(sym),r1h
|
|
mov.w #%lo16(sym),a0
|
|
smovf.b
|
|
@end smallexample
|
|
|
|
@item %lo16
|
|
|
|
Likewise, this modifier allows you to load bits 0 through 15 of a 24
|
|
bit address into a 16 bit register.
|
|
|
|
@item %hi16
|
|
|
|
This modifier allows you to load bits 16 through 31 of a 32 bit
|
|
address into a 16 bit register. While the M32C family only has 24
|
|
bits of address space, it does support addresses in pairs of 16 bit
|
|
registers (like @samp{a1a0} for the @samp{lde} instruction). This
|
|
modifier is for loading the upper half in such cases. Example:
|
|
|
|
@smallexample
|
|
mov.w #%hi16(sym),a1
|
|
mov.w #%lo16(sym),a0
|
|
@dots{}
|
|
lde.w [a1a0],r1
|
|
@end smallexample
|
|
|
|
@end table
|
|
|
|
@node M32C-Chars
|
|
@subsection Special Characters
|
|
|
|
@cindex line comment character, M32C
|
|
@cindex M32C line comment character
|
|
The presence of a @samp{;} character on a line indicates the start of
|
|
a comment that extends to the end of that line.
|
|
|
|
If a @samp{#} appears as the first character of a line, the whole line
|
|
is treated as a comment, but in this case the line can also be a
|
|
logical line number directive (@pxref{Comments}) or a
|
|
preprocessor control command (@pxref{Preprocessing}).
|
|
|
|
@cindex line separator, M32C
|
|
@cindex statement separator, M32C
|
|
@cindex M32C line separator
|
|
The @samp{|} character can be used to separate statements on the same
|
|
line.
|