* symbols.c (symbol_clone_if_forward_ref): Call tc_new_dot_label
[deliverable/binutils-gdb.git] / gas / doc / c-v850.texi
index 7c204358844b69a91b4140e433af3da950aa9662..e92fbed527da6c3e26a47ec62a39cb69f24898bc 100644 (file)
@@ -1,4 +1,4 @@
-@c Copyright (C) 1997 Free Software Foundation, Inc.
+@c Copyright 1997, 2002, 2003, 2006 Free Software Foundation, Inc.
 @c This is part of the GAS manual.
 @c For copying conditions, see the file as.texinfo.
 
@@ -45,21 +45,48 @@ Specifies that the assembled code should be marked as being targeted at
 the V850 processor.  This allows the linker to detect attempts to link
 such code with code assembled for other processors.
 
-@c start-santize-v850e
 @cindex @code{-mv850e} command line option, V850
 @item -mv850e
 Specifies that the assembled code should be marked as being targeted at
 the V850E processor.  This allows the linker to detect attempts to link
 such code with code assembled for other processors.
-@c end-santize-v850e
 
-@c start-santize-v850eq
-@cindex @code{-mv850eq} command line option, V850
-@item -mv850eq
+@cindex @code{-mv850e1} command line option, V850
+@item -mv850e1
 Specifies that the assembled code should be marked as being targeted at
-the V850EQ processor.  This allows the linker to detect attempts to link
+the V850E1 processor.  This allows the linker to detect attempts to link
 such code with code assembled for other processors.
-@c end-santize-v850eq
+
+@cindex @code{-mv850any} command line option, V850
+@item -mv850any
+Specifies that the assembled code should be marked as being targeted at
+the V850 processor but support instructions that are specific to the
+extended variants of the process.  This allows the production of
+binaries that contain target specific code, but which are also intended
+to be used in a generic fashion.  For example libgcc.a contains generic
+routines used by the code produced by GCC for all versions of the v850
+architecture, together with support routines only used by the V850E
+architecture.
+
+@cindex @code{-mv850e2} command line option, V850
+@item -mv850e2
+Specifies that the assembled code should be marked as being targeted at
+the V850E2 processor.  This allows the linker to detect attempts to link
+such code with code assembled for other processors.
+
+@cindex @code{-mv850e2v3} command line option, V850
+@item -mv850e2v3
+Specifies that the assembled code should be marked as being targeted at
+the V850E2V3 processor.  This allows the linker to detect attempts to link
+such code with code assembled for other processors.
+
+@cindex @code{-mrelax} command line option, V850
+@item -mrelax
+Enables relaxation.  This allows the .longcall and .longjump pseudo
+ops to be used in the assembler source code.  These ops label sections
+of code which are either a long function call or a long branch.  The
+assembler will then flag these sections of code and the linker will
+attempt to relax them.
 
 @end table
 
@@ -172,7 +199,6 @@ 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
@@ -188,7 +214,6 @@ dbpsw
 @cindex @code{ctbp} register, V850
 @item system register 20
 ctbp
-@c end-santize-v850e
 @end table
 
 @node V850 Floating Point
@@ -220,21 +245,29 @@ Specifies that the assembled code should be marked as being targeted at
 the V850 processor.  This allows the linker to detect attempts to link
 such code with code assembled for other processors.
 
-@c start-santize-v850e
 @cindex @code{.v850e} directive, V850
 @item .v850e
 Specifies that the assembled code should be marked as being targeted at
 the V850E processor.  This allows the linker to detect attempts to link
 such code with code assembled for other processors.
-@c end-santize-v850e
 
-@c start-santize-v850eq
-@cindex @code{.v850eq} directive, V850
-@item .v850eq
+@cindex @code{.v850e1} directive, V850
+@item .v850e1
+Specifies that the assembled code should be marked as being targeted at
+the V850E1 processor.  This allows the linker to detect attempts to link
+such code with code assembled for other processors.
+
+@cindex @code{.v850e2} directive, V850
+@item .v850e2
 Specifies that the assembled code should be marked as being targeted at
-the V850EQ processor.  This allows the linker to detect attempts to link
+the V850E2 processor.  This allows the linker to detect attempts to link
+such code with code assembled for other processors.
+
+@cindex @code{.v850e2v3} directive, V850
+@item .v850e2v3
+Specifies that the assembled code should be marked as being targeted at
+the V850E2V3 processor.  This allows the linker to detect attempts to link
 such code with code assembled for other processors.
-@c end-santize-v850eq
 
 @end table
 
@@ -249,16 +282,16 @@ such code with code assembled for other processors.
 
 @table @code
 
-@cindex @code{hi} pseudo-op, V850
-@item hi()
+@cindex @code{hi0} pseudo-op, V850
+@item hi0()
 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}
+    @samp{mulhi hi0(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
+bits and then multiplies it by the lower 16 bits in register 5, putting
 the result into register 6. 
 
 @cindex @code{lo} pseudo-op, V850
@@ -272,7 +305,28 @@ 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.
 
-@c start-santize-v850e
+@cindex @code{hi} pseudo-op, V850
+@item hi()
+Computes the higher 16 bits of the given expression and then adds the
+value of the most significant bit of the lower 16 bits of the expression
+and stores the result into the immediate operand field of the given
+instruction.  For example the following code can be used to compute the
+address of the label 'here' and store it into register 6:
+
+    @samp{movhi hi(here), r0, r6}
+    @samp{movea lo(here), r6, r6}
+
+The reason for this special behaviour is that movea performs a sign
+extension on its immediate operand.  So for example if the address of
+'here' was 0xFFFFFFFF then without the special behaviour of the hi()
+pseudo-op the movhi instruction would put 0xFFFF0000 into r6, then the
+movea instruction would takes its immediate operand, 0xFFFF, sign extend
+it to 32 bits, 0xFFFFFFFF, and then add it into r6 giving 0xFFFEFFFF
+which is wrong (the fifth nibble is E).  With the hi() pseudo op adding
+in the top bit of the lo() pseudo op, the movhi instruction actually
+stores 0 into r6 (0xFFFF + 1 = 0x0000), so that the movea instruction
+stores 0xFFFFFFFF into r6 - the right value.
+
 @cindex @code{hilo} pseudo-op, V850
 @item hilo()
 Computes the 32 bit value of the given expression and stores it into
@@ -283,7 +337,6 @@ mov instruction).  For example:
 
 computes the absolute address of label 'here' and puts the result into
 register 6.  
-@c end-santize-v850e
 
 @cindex @code{sdaoff} pseudo-op, V850
 @item sdaoff()
@@ -306,11 +359,7 @@ command line option].
 @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
-@c start-santize-v850e
-4,5,
-@c end-santize-v850e
-7 or 8 bit unsigned value in the immediate
+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}
@@ -336,10 +385,36 @@ that the label is somewhere within the first 32K of memory.  (Strictly
 speaking it also possible to access the last 32K of memory as well, as
 the offsets are signed).
 
+@cindex @code{ctoff} pseudo-op, V850
+@item ctoff()
+Computes the offset of the named variable from the start of the Call
+Table Area (whoes address is helg in system register 20, the CTBP
+register) and stores the result a 6 or 16 bit unsigned value in the
+immediate field of then given instruction or piece of data.  For
+example:
+
+     @samp{callt ctoff(table_func1)}
+
+will put the call the function whoes address is held in the call table
+at the location labeled 'table_func1'.
+
+@cindex @code{longcall} pseudo-op, V850
+@item .longcall @code{name}
+Indicates that the following sequence of instructions is a long call
+to function @code{name}.  The linker will attempt to shorten this call
+sequence if @code{name} is within a 22bit offset of the call.  Only
+valid if the @code{-mrelax} command line switch has been enabled.
+
+@cindex @code{longjump} pseudo-op, V850
+@item .longjump @code{name}
+Indicates that the following sequence of instructions is a long jump
+to label @code{name}.  The linker will attempt to shorten this code
+sequence if @code{name} is within a 22bit offset of the jump.  Only
+valid if the @code{-mrelax} command line switch has been enabled.
+
 @end table
 
 
-For information on the V850 or Thumb instruction sets, see @cite{V850
+For information on the V850 instruction set, see @cite{V850
 Family 32-/16-Bit single-Chip Microcontroller Architecture Manual} from NEC.
 Ltd.
-
This page took 0.035668 seconds and 4 git commands to generate.