Intranet Catprocess
  1. news...
  2. about Blackvoxel
  3. download
  4. manual
  5. videos
  6. about us
  1. Movex

    Destination <-- Source

    Affected Flags
    C V N Z
        X X

    The movex instruction take a constant defined by only few bits and expand it on the fly to the full 32 bits of the destination register. The "movex" instruction is an optimized version of the move instruction. It's purpose is to make faster loading of little numbers into registers. On a risc processor, many instructions works only on register values and lack immediate addressing modes. Loading performance of "working values" can be a bottleneck in such kind of architecture.
    This instruction can work with many different size : 4, 8, 16 bits input constant (.n, .b, .w) and an additionnal flag for signed values (.sn,.sb,.sw).

    Forms and variants

    rx = Destination register number (Can be a number between 0 and 15 included.)

    Form Effect
    movex.n #4BitsImmediateValue,rx ImmediateValue -> Extended_32_bits -> rx
    movex.sn #4BitsSignedImmValue,rx
    movex.b #8BitsImmediateValue,rx
    movex.sb#8BitsSignedImmValue,rx
    movex.w #16bitsImmediateValue,rx
    movex.sw#16BitsSignedImmValue,rx

    Instruction encoding

    I = Immediate value
    D = Destination Register
    
    Instruction Op
    Code
    Cycles Encoding
    movex.un #_4BitsSignedValue,rx 8B 4 10001011 IIIIDDDD
    movex.sn #_4BitsSignedValue,rx 8A 4 10001010 IIIIDDDD
    movex.b #8BitsUnsignedValue,rx 0B 6 00001011 0000DDDD IIIIIIII
    movex.sb #_8BitsSignedValue,rx 0A 6 00001010 0000DDDD IIIIIIII
    movex.w #16BitsUnsignedValue,rx 4B 8 01001011 0000DDDD IIIIIIII IIIIIIII
    movex.sw #16BitsSignedValue,rx 4A 8 01001010 0000DDDD IIIIIIII IIIIIIII

     

     
  2. Google+