diff options
author | Jozef Lawrynowicz <jozef.l@mittosystems.com> | 2020-09-18 13:07:19 +0100 |
---|---|---|
committer | Jozef Lawrynowicz <jozef.l@mittosystems.com> | 2020-09-18 13:07:19 +0100 |
commit | 2f8022873c72e4abed7987cfa6b8ab9de6e53971 (patch) | |
tree | d8d955b484d5374c48c0c9b900c6bd1e5dab1b90 /gcc/doc | |
parent | 685c95ebc4906f6b58db2e3c81ad9ab73fdca794 (diff) | |
download | gcc-2f8022873c72e4abed7987cfa6b8ab9de6e53971.zip gcc-2f8022873c72e4abed7987cfa6b8ab9de6e53971.tar.gz gcc-2f8022873c72e4abed7987cfa6b8ab9de6e53971.tar.bz2 |
MSP430: Add 'd', 'e', 'f' and 'g' asm operand modifiers
The new operand modifiers can be used to select odd-numbered bytes of a memory
reference or constant value.
gcc/ChangeLog:
* config/msp430/msp430.c (msp430_print_operand): Update comment.
Cast to long when printing values formatted as long.
Support 'd', 'e', 'f' and 'g' modifiers.
Extract operand value with a single operation for all modifiers.
* doc/extend.texi (msp430Operandmodifiers): New.
gcc/testsuite/ChangeLog:
* gcc.target/msp430/operand-modifiers.c: Extend test to handle new
modifiers.
* gcc.target/msp430/operand-modifiers-bad.c: New test.
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/extend.texi | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 3b37aba..5571c4f 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -10737,6 +10737,42 @@ for the compiler to know that @code{fyl2xp1} pops both inputs. asm ("fyl2xp1" : "=t" (result) : "0" (x), "u" (y) : "st(1)"); @end smallexample +@anchor{msp430Operandmodifiers} +@subsubsection MSP430 Operand Modifiers + +The list below describes the supported modifiers and their effects for MSP430. + +@multitable @columnfractions .10 .90 +@headitem Modifier @tab Description +@item @code{A} @tab Select low 16-bits of the constant/register/memory operand. +@item @code{B} @tab Select high 16-bits of the constant/register/memory +operand. +@item @code{C} @tab Select bits 32-47 of the constant/register/memory operand. +@item @code{D} @tab Select bits 48-63 of the constant/register/memory operand. +@item @code{H} @tab Equivalent to @code{B} (for backwards compatibility). +@item @code{I} @tab Print the inverse (logical @code{NOT}) of the constant +value. +@item @code{J} @tab Print an integer without a @code{#} prefix. +@item @code{L} @tab Equivalent to @code{A} (for backwards compatibility). +@item @code{O} @tab Offset of the current frame from the top of the stack. +@item @code{Q} @tab Use the @code{A} instruction postfix. +@item @code{R} @tab Inverse of condition code, for unsigned comparisons. +@item @code{W} @tab Subtract 16 from the constant value. +@item @code{X} @tab Use the @code{X} instruction postfix. +@item @code{Y} @tab Subtract 4 from the constant value. +@item @code{Z} @tab Subtract 1 from the constant value. +@item @code{b} @tab Append @code{.B}, @code{.W} or @code{.A} to the +instruction, depending on the mode. +@item @code{d} @tab Offset 1 byte of a memory reference or constant value. +@item @code{e} @tab Offset 3 bytes of a memory reference or constant value. +@item @code{f} @tab Offset 5 bytes of a memory reference or constant value. +@item @code{g} @tab Offset 7 bytes of a memory reference or constant value. +@item @code{p} @tab Print the value of 2, raised to the power of the given +constant. Used to select the specified bit position. +@item @code{r} @tab Inverse of condition code, for signed comparisons. +@item @code{x} @tab Equivialent to @code{X}, but only for pointers. +@end multitable + @lowersections @include md.texi @raisesections |