From 68eaa14109f69627fe55e6a4fdcbde8c5086be1f Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 22 Aug 1997 23:37:00 +0000 Subject: [PATCH] Added documentation of v850 assembler options. --- gas/ChangeLog | 6 +- gas/doc/.Sanitize | 79 ++++++++++++++++ gas/doc/all.texi | 7 ++ gas/doc/as.texinfo | 31 ++++++- gas/doc/c-v850.texi | 258 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 377 insertions(+), 4 deletions(-) create mode 100644 gas/doc/c-v850.texi diff --git a/gas/ChangeLog b/gas/ChangeLog index 40bce64..1a608c0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,9 +1,13 @@ +start-sanitize-v850 Fri Aug 22 11:16:14 1997 Nick Clifton + * doc/as.texinfo: Add inclusion of c-v850.texi + + * doc/c-v850.texi: New file. + * read.c (is_end_of_line): Make NUL character be considered to be a line terminator. -start-sanitize-v850 Fri Aug 22 10:45:33 1997 Nick Clifton * config/tc-v850.c (parse_register_list): Add support for curly diff --git a/gas/doc/.Sanitize b/gas/doc/.Sanitize index a17c05e..2d3a446 100644 --- a/gas/doc/.Sanitize +++ b/gas/doc/.Sanitize @@ -22,6 +22,20 @@ Do-first: # called. Directories not listed will be removed in their entirety # with rm -rf. +if ( echo $* | grep keep\-v850 > /dev/null ) ; then + keep_these_too="c-v850.texi" +else + if ( echo $* | grep keep\-v850e > /dev/null ) ; then + keep_these_too="c-v850.texi" + else + if ( echo $* | grep keep\-v850eq > /dev/null ) ; then + keep_these_too="c-v850.texi" + else + lose_these_too="c-v850.texi" + fi + fi +fi + Things-to-keep: Makefile.am @@ -52,6 +66,71 @@ Things-to-lose: Do-last: +v850_files="all.texi as.texinfo" +if ( echo $* | grep keep\-v850 > /dev/null ) ; then + for i in $v850_files ; do + if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Keeping v850 stuff in $i + fi + fi + done +else + if ( echo $* | grep keep\-v850e > /dev/null ) ; then + true + else + if ( echo $* | grep keep\-v850eq > /dev/null ) ; then + true + else + for i in $v850_files ; do + if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Removing traces of \"v850\" from $i... + fi + cp $i new + sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new + if [ -n "${safe}" -a ! -f .Recover/$i ] ; then + if [ -n "${verbose}" ] ; then + echo Caching $i in .Recover... + fi + mv $i .Recover + fi + mv new $i + fi + done + fi + fi +fi + +v850e_files="c-v850.texi" +if ( echo $* | grep keep\-v850e > /dev/null ) ; then + if ( echo $* | grep keep\-v850eq > /dev/null ) ; then + for i in $v850e_files ; do + if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Keeping v850e stuff in $i + fi + fi + done + else + for i in $v850e_files ; do + if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Removing traces of \"v850eq\" from $i... + fi + cp $i new + sed '/start\-sanitize\-v850eq/,/end-\sanitize\-v850eq/d' < $i > new + if [ -n "${safe}" -a ! -f .Recover/$i ] ; then + if [ -n "${verbose}" ] ; then + echo Caching $i in .Recover... + fi + mv $i .Recover + fi + mv new $i + fi + done +fi + # Don't try to clean directories here, as the 'mv' command will fail. # Also, grep fails on NFS mounted directories. diff --git a/gas/doc/all.texi b/gas/doc/all.texi index 39e3738..666fbde 100644 --- a/gas/doc/all.texi +++ b/gas/doc/all.texi @@ -26,17 +26,24 @@ @c CPUs of interest @c ================ @set A29K +@set ARC +@set ARM +@set D10V @set H8/300 @set H8/500 @set SH @set I80386 @set I960 +@set MIPS @set M680X0 @set Z8000 @set SPARC @set VAX @set VXWORKS @set HPPA +@c start-sanitize-v850 +@set V850 +@c end-sanitize-v850 @c Does this version of the assembler use the difference-table kluge? @set DIFF-TBL-KLUGE diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index 5ff1f76..2243c9e 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -252,10 +252,13 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details, @end smallexample @table @code -@item -a[dhlns] +@item -a[cdhlmns] Turn on listings, in any of a variety of ways: @table @code +@item -ac +omit false conditionals + @item -ad omit debugging directives @@ -265,6 +268,9 @@ include high-level source @item -al include assembly +@item -am +include macro expansions + @item -an omit forms processing @@ -277,8 +283,7 @@ set the name of the listing file You may combine these options; for example, use @samp{-aln} for assembly listing without forms processing. The @samp{=file} option, if used, must be -the last one. By itself, @samp{-a} defaults to @samp{-ahls}---that is, all -listings turned on. +the last one. By itself, @samp{-a} defaults to @samp{-ahls}. @item -D Ignored. This option is accepted for script compatibility with calls to @@ -1437,6 +1442,11 @@ is considered a comment and is ignored. The line comment character is @ifset Z8000 @samp{!} for the Z8000; @end ifset +@c start-sanitize-v850 +@ifset V850 +@samp{#} on the V850; +@end ifset +@c end-sanitize-v850 see @ref{Machine Dependencies}. @refill @c FIXME What about i386, m88k, i860? @@ -1446,6 +1456,15 @@ character only begins a comment if it is the first non-whitespace character on a line, while the other always begins a comment. @end ifset +@c start-sanitize-v850 +@ifset V850 +The V850 assembler also supports a double dash as starting a comment that +extends to the end of the line. + +@samp{--}; +@end ifset +@c end-sanitize-v850 + @kindex # @cindex lines starting with @code{#} @cindex logical line numbers @@ -4826,6 +4845,12 @@ family. @include c-vax.texi @end ifset +@c start-sanitize-v850 +@ifset V850 +@include c-v850.texi +@end ifset +@c end-sanitize-v850 + @ifset GENERIC @c reverse effect of @down at top of generic Machine-Dep chapter @raisesections diff --git a/gas/doc/c-v850.texi b/gas/doc/c-v850.texi new file mode 100644 index 0000000..8dc70f7 --- /dev/null +++ b/gas/doc/c-v850.texi @@ -0,0 +1,258 @@ +@c Copyright (C) 1997 Free Software Foundation, Inc. +@c This is part of the GAS manual. +@c For copying conditions, see the file as.texinfo. + +@node Machine Dependencies +@chapter v850 Dependent Features + +@cindex V850 support +@menu +* V850 Options:: Options +* V850 Syntax:: Syntax +* V850 Floating Point:: Floating Point +* V850 Directives:: V850 Machine Directives +* V850 Opcodes:: Opcodes +@end menu + +@node V850 Options +@section Options +@cindex V850 options (none) +@cindex options for V850 (none) +@code{@value{AS}} has no additional command-line options for the V850 +processor family. + +@node V850 Syntax +@section Syntax +@menu +* V850-Chars:: Special Characters +* V850-Regs:: Register Names +@end menu + +@node V850-Chars +@subsection Special Characters + +@cindex line comment character, V850 +@cindex V850 line comment character +@samp{#} is the line comment character. +@node V850-Regs +@subsection Register Names + +@cindex V850 register names +@cindex register names, V850 +@code{@value{AS}} supports the following names for registers: +@table @code +@cindex @code{zero} register, V850 +@item general register 0 +r0, zero +@item general register 1 +r1 +@item general register 2 +r2 +@cindex @code{sp} register, V850 +@item general register 3 +r3, sp +@cindex @code{gp} register, V850 +@item general register 4 +r4, gp +@cindex @code{tp} register, V850 +@item general register 5 +r5, tp +@item general register 6 +r6 +@item general register 7 +r7 +@item general register 8 +r8 +@item general register 9 +r9 +@item general register 10 +r10 +@item general register 11 +r11 +@item general register 12 +r12 +@item general register 13 +r13 +@item general register 14 +r14 +@item general register 15 +r15 +@item general register 16 +r16 +@item general register 17 +r17 +@item general register 18 +r18 +@item general register 19 +r19 +@item general register 20 +r20 +@item general register 21 +r21 +@item general register 22 +r22 +@item general register 23 +r23 +@item general register 24 +r24 +@item general register 25 +r25 +@item general register 26 +r26 +@item general register 27 +r27 +@item general register 28 +r28 +@item general register 29 +r29 +@cindex @code{ep} register, V850 +@item general register 30 +r30, ep +@cindex @code{lp} register, V850 +@item general register 31 +r31, lp +@cindex @code{eipc} register, V850 +@item system register 0 +eipc +@cindex @code{eipsw} register, V850 +@item system register 1 +eipsw +@cindex @code{fepc} register, V850 +@item system register 2 +fepc +@cindex @code{fepsw} register, V850 +@item system register 3 +fepsw +@cindex @code{ecr} register, V850 +@item system register 4 +ecr +@cindex @code{psw} register, V850 +@item system register 5 +psw +@c start-santize-v850e +@cindex @code{ctpc} register, V850 +@item system register 16 +ctpc +@cindex @code{ctpsw} register, V850 +@item system register 17 +ctpsw +@cindex @code{dbpc} register, V850 +@item system register 18 +dbpc +@cindex @code{dbpsw} register, V850 +@item system register 19 +dbpsw +@cindex @code{ctbp} register, V850 +@item system register 20 +ctbp +@c end-santize-v850e +@end table + +@node V850 Floating Point +@section Floating Point + +@cindex floating point, V850 (@sc{ieee}) +@cindex V850 floating point (@sc{ieee}) +The V850 family uses @sc{ieee} floating-point numbers. + +@node V850 Directives +@section V850 Machine Directives + +@cindex machine directives, V850 +@cindex V850 machine directives +@table @code +@cindex @code{offset} directive, V850 +@item .offset @var{} +Moves the offset into the current section to the specified amount. + +@cindex @code{section} directive, V850 +@item .section "name", +This is an extension to the standard .section directive. It sets the +current section to be and creates an alias for this section +called "name". + +@end table + +@node V850 Opcodes +@section Opcodes + +@cindex V850 opcodes +@cindex opcodes for V850 +@code{@value{AS}} implements all the standard V850 opcodes. + +@code{@value{AS}} also implements the following pseudo ops: + +@table @code + +@cindex @code{hi} pseudo-op, V850 +@item hi() +Computes the higher 16 bits of the given expression and stores it into +the immediate operand field of the given instruction. For example: + + @samp{mulhi hi(here - there), r5, r6} + +computes the difference between the address of labels 'here' and +'there', takes the upper 16 bits of this difference, shifts it down 16 +bits and then mutliplies it by the lower 16 bits in register 5, putting +the result into register 6. + + +@cindex @code{lo} pseudo-op, V850 +@item lo() +Computes the lower 16 bits of the given expression and stores it into +the immediate operand field of the given instruction. For example: + + @samp{addi lo(here - there), r5, r6} + +computes the difference between the address of labels 'here' and +'there', takes the lower 16 bits of this difference and adds it to +register 5, putting the result into register 6. + +@cindex @code{sdaoff} pseudo-op, V850 +@item sdaoff() +Computes the offset of the named variable from the start of the Small +Data Area (whoes address is held in register 4, the GP register) and +stores the result as a 16 bit signed value in the immediate operand +field of the given instruction. For example: + + @samp{ld.w sdaoff(_a_variable)[gp],r6} + +loads the contents of the location pointed to by the label '_a_variable' +into register 6, provided that the label is located somewhere within +/- +32K of the address held in the GP register. [Note the linker assumes +that the GP register contains a fixed address set to the address of the +label called '__gp']. + +@cindex @code{tdaoff} pseudo-op, V850 +@item tdaoff() +Computes the offset of the named variable from the start of the Tiny +Data Area (whoes address is held in register 30, the EP register) and +stores the result as a 4,5,7 or 8 bit unsigned value in the immediate +operand field of the given instruction. For example: + + @samp{sld.w tdaoff(_a_variable)[ep],r6} + +loads the contents of the location pointed to by the label '_a_variable' +into register 6, provided that the label is located somewhere within 256 +bytes of the address held in the EP register. [Note the linker assumes +that the EP register contains a fixed address set to the address of the +label called '--ep']. + +@cindex @code{zdaoff} pseudo-op, V850 +@item zdaoff() +Computes the offset of the named variable from address 0 and stores the +result as a 16 bit signed value in the immediate operand field of the +given instruction. For example: + + @samp{movea zdaoff(_a_variable),zero,r6} + +puts the address of the label '_a_variable' into register 6, assuming +that the label is somewhere within the first 32K of memory. + +@end table + + +For information on the V850 or Thumb instruction sets, see @cite{V850 +Family 32-/16-Bit single-Chip Microcontroller Architecture Manual} from NEC. +Ltd. + -- 2.7.4