BFMOVZ

Transferring a bit-field and setting the other bits at the destination to zero [V3.00.00 or later]

BFMOVZ

Bit Field MOVe to Zero


[Syntax]

BFMOVZ slsb, dlsb, width, src, dest

 

[Operation]

unsigned long tmp1, tmp2;

tmp1 = (0FFFFFFFFh >> (32-width))<<dlsb;

tmp2 = (src >> slsb) << dlsb;

dest = (tmp2 & tmp1);

 

[Function]

-

The number of bits specified by width from the bit position slsb at the location src are transferred to the number of bits specified by width from the bit position dlsb at the location dest. The rest of the bits at dest become 0.

-

The range of slsb is 0 ≤ slsb ≤ 31, the range of dlsb is 0 ≤ dlsb ≤ 31, and the range of width is 1 ≤ width ≤ 31.

-

If (slsb + width) > 32 and (dlsb + width) > 32, then dest becomes undefined.

-

You can assemble assembly-language code that includes this instruction if you have specified the assembler option -isa with selection of the instruction set of the RXv3 or a later version.

 

[Instruction Format]

Syntax

Processng Size

Operand

Code Size

(Byte)

slsb

dlsb

width

src

dest

BFMOVZ slsb, dlsb, width, src, dest

L

#IMM:5

#IMM:5

#IMM:5

Rs

Rd

5

 

[Flag Change]

This instruction does not affect the states of flags.

 

[Description Example]

BFMOVZ #5, #10, #3, R1, R2