OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [gas/] [doc/] [c-cr16.texi] - Diff between revs 156 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 156 Rev 816
@c Copyright 2007 Free Software Foundation, Inc.
@c Copyright 2007 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@c For copying conditions, see the file as.texinfo.
 
 
@ifset GENERIC
@ifset GENERIC
@page
@page
@node CR16-Dependent
@node CR16-Dependent
@chapter CR16 Dependent Features
@chapter CR16 Dependent Features
@end ifset
@end ifset
@ifclear GENERIC
@ifclear GENERIC
@node Machine Dependencies
@node Machine Dependencies
@chapter CR16 Dependent Features
@chapter CR16 Dependent Features
@end ifclear
@end ifclear
 
 
@cindex CR16 support
@cindex CR16 support
@menu
@menu
* CR16 Operand Qualifiers::     CR16 Machine Operand Qualifiers
* CR16 Operand Qualifiers::     CR16 Machine Operand Qualifiers
@end menu
@end menu
 
 
@node CR16 Operand Qualifiers
@node CR16 Operand Qualifiers
@section CR16 Operand Qualifiers
@section CR16 Operand Qualifiers
@cindex CR16 Operand Qualifiers
@cindex CR16 Operand Qualifiers
 
 
The National Semiconductor CR16 target of @code{@value{AS}} has a few machine dependent operand qualifiers.
The National Semiconductor CR16 target of @code{@value{AS}} has a few machine dependent operand qualifiers.
 
 
Operand expression type qualifier is an optional field in the instruction operand, to determines the type of the expression field of an operand. The @code{@@} is required. CR16 architecture uses one of the following expression qualifiers:
Operand expression type qualifier is an optional field in the instruction operand, to determines the type of the expression field of an operand. The @code{@@} is required. CR16 architecture uses one of the following expression qualifiers:
 
 
@table @code
@table @code
@item  s
@item  s
- @code{Specifies expression operand type as small}
- @code{Specifies expression operand type as small}
@item  m
@item  m
- @code{Specifies expression operand type as medium}
- @code{Specifies expression operand type as medium}
@item  l
@item  l
- @code{Specifies expression operand type as large}
- @code{Specifies expression operand type as large}
@item  c
@item  c
- @code{Specifies the CR16 Assembler generates a relocation entry for the operand, where pc has implied bit, the expression is adjusted accordingly. The linker uses the relocation entry to update the operand address at link time.}
- @code{Specifies the CR16 Assembler generates a relocation entry for the operand, where pc has implied bit, the expression is adjusted accordingly. The linker uses the relocation entry to update the operand address at link time.}
@end table
@end table
 
 
CR16 target operand qualifiers and its size (in bits):
CR16 target operand qualifiers and its size (in bits):
 
 
@table @samp
@table @samp
@item Immediate Operand
@item Immediate Operand
- s ---- 4 bits
- s ---- 4 bits
@item
@item
- m ---- 16 bits, for movb and movw instructions.
- m ---- 16 bits, for movb and movw instructions.
@item
@item
- m ---- 20 bits, movd instructions.
- m ---- 20 bits, movd instructions.
@item
@item
- l ---- 32 bits
- l ---- 32 bits
 
 
@item Absolute Operand
@item Absolute Operand
- s ---- Illegal specifier for this operand.
- s ---- Illegal specifier for this operand.
@item
@item
- m ---- 20 bits, movd instructions.
- m ---- 20 bits, movd instructions.
 
 
@item Displacement Operand
@item Displacement Operand
- s ---- 8 bits
- s ---- 8 bits
@item
@item
- m ---- 16 bits
- m ---- 16 bits
@item
@item
- l ---- 24 bits
- l ---- 24 bits
@end table
@end table
 
 
For example:
For example:
@example
@example
1   @code{movw $_myfun@@c,r1}
1   @code{movw $_myfun@@c,r1}
 
 
    This loads the address of _myfun, shifted right by 1, into r1.
    This loads the address of _myfun, shifted right by 1, into r1.
 
 
2   @code{movd $_myfun@@c,(r2,r1)}
2   @code{movd $_myfun@@c,(r2,r1)}
 
 
    This loads the address of _myfun, shifted right by 1, into register-pair r2-r1.
    This loads the address of _myfun, shifted right by 1, into register-pair r2-r1.
 
 
3   @code{_myfun_ptr:}
3   @code{_myfun_ptr:}
    @code{.long _myfun@@c}
    @code{.long _myfun@@c}
    @code{loadd _myfun_ptr, (r1,r0)}
    @code{loadd _myfun_ptr, (r1,r0)}
    @code{jal (r1,r0)}
    @code{jal (r1,r0)}
 
 
    This .long directive, the address of _myfunc, shifted right by 1 at link time.
    This .long directive, the address of _myfunc, shifted right by 1 at link time.
@end example
@end example
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.