Re: general opcode question




Christian Christmann wrote:
> Hi,
>
> I'm a newbie to assembler and have a basic question on opcodes.
>
> Currently I am working with the Infineon Tricore DSP. In the manual the
> MOV instruction is described as follows:
>
> "Move the content of const16 to data register D[c]. The value const16 is
> sign-extended to 32-bits before it is moved."
>
> Further there is a figure:
>
> 31--2827---------------1211----- 87-----------0
> ----c--------const16---------- - --------3BH---
>
> D[c]= sign_ext(const16);
>
>
>
> My questions:
> 1) How can you move a 16-bit constant (bits 27-12) to a 4-bit register
> D[c] (bits31-28). Or are bits 31-28 representing the address ( one of the
> 16 possible due to 2 ^4) of register D[c] ? 2) What does "sign-extended to
> 32-bits" mean? What exactly happens to the 16-bit value const16?


While this is OT to this group (x86 is topical), the question is pretty
basic. First, the four bit register field encodes the register number,
so if it had 1001 in it, you'd be moving to register 9 (nine). Sign
extension is simply the extension of the sign bit to the left when
converting from a shorter format to a longer one. On a twos complement
machine, your 16 bit representation of the number 37 would be
0000-0000-0010-0101. The leftmost with would get replicated 16 times
when you attempted to store that value in a 32 bit register, thus
preserving the value "37". If you had 1111-1111-1101-1011 (-37) in the
constant, that would extend the "1" sign bit, preserving the value
"-37". It's a trade off. If the instruction did zero extension, you
could load values from 0 to 65535, with sign extension, you can load
-32768 thru 32767, which would typically be considered a more useful
range.

.



Relevant Pages

  • Re: Designer of the Commodore Datassette?
    ... The year of expiration is 2082. ... extension rules in Section 304. ... require-ments that the Register of Copyrights shall prescribe by regulation. ... Termination of Transfers and Licenses Covering Extended Renewal Term.-In ...
    (comp.sys.cbm)
  • How to use Shell Extensions class from Eduardo Morcillo
    ... that encapsulates the ugly stuff and gives an easy way to make the dll explorer will look for as the extension handler. ... classes contains the code to register the extensions automatically when the ... This attribute is used to set the file types for which an extension has to be registered. ... Its easy to write a prog that takes command line params, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: GPO Software install
    ... The .msi contains a list of extensions that are registered in Active ... You don't "register" extensions ... > Thank you Mike, however, i am a little confused, how do you register an ... > extension with an .msi. ...
    (microsoft.public.win2000.active_directory)
  • Re: want my own extention like http://www.myserver.com/default.prt
    ... webserver (most likely IIS). ... The idea is that you would register your ... new extension in IIS, and have it assign the ISAPI trunk to point to ... I want to create my own extenstion like .aspx, ...
    (microsoft.public.dotnet.framework.aspnet)