clr1


Clears bit.

[Syntax]

-

clr1 bit#3, disp[reg1]

-

clr1 reg2, [reg1]

 

The following can be specified for disp:

-

Absolute expression having a value of up to 32 bits

-

Relative expression

-

Either of the above expressions with LOWW applied

Caution

The disp cannot be specified in syntax "clr1 reg2, [reg1]".

[Function]

-

Syntax "clr1 bit#3, disp[reg1]"

Clears the bit specified by the first operand of the data indicated by the address specified by the second operand. The bits other than the one specified are not affected.

-

Syntax "clr1 reg2, [reg1]"

Clears the bit specified by the register value specified by the first operand of the data indicated by the address specified by the register value of the second operand. The bits other than the one specified are not affected.

[Description]

-

If the following is specified as disp, the assembler generates one clr1 machine instructionNote.

(a)

Absolute expression having a value in the range of -32,768 to +32,767

clr1    bit#3, disp16[reg1]
clr1    bit#3, disp16[reg1]

(b)

Relative expression having $label for a label having a definition in the sdata/sbss-attribute section

clr1    bit#3, $label[reg1]
clr1    bit#3, $label[reg1]

(c)

Relative expression having !label or %label

clr1    bit#3, !label[reg1]
clr1    bit#3, !label[reg1]
clr1    bit#3, %label[reg1]
clr1    bit#3, %label[reg1]

(d)

Expression with LOWW

clr1    bit#3, HIGHW(value)[reg1]
clr1    bit#3, HIGHW(value)[reg1]
clr1    bit#3, LOWW(value)[reg1]
clr1    bit#3, LOWW(value)[reg1]
clr1    bit#3, HIGHW1(value)[reg1]
clr1    bit#3, HIGHW1(value)[reg1]

Note

The clr1 machine instruction takes an immediate value in the range of -32,768 to +32,767 (0xFFFF8000 to 0x7FFF) as the displacement.

 

-

If any of the following is specified as disp, the assembler executes instruction expansion to generate multiple machine instructions.

(a)

Absolute expression having a value exceeding the range of -32,768 to +32,767

clr1    bit#3, disp[reg1]
movhi   HIGHW1(disp), reg1, r1
clr1    bit#3, LOWW(disp)[r1]

(b)

Relative expression having #label or label, or that having $label for a label having no definition in the sdata/sbss-attribute section

clr1    bit#3, #label[reg1]
movhi   HIGHW1(#label), reg1, r1
clr1    bit#3, LOWW(#label)[r1]
clr1    bit#3, label[reg1]
movhi   HIGHW1(label), reg1, r1
clr1    bit#3, LOWW(label)[r1]
clr1    bit#3, $label[reg1]
movhi   HIGHW1($label), reg1, r1
clr1    bit#3, LOWW($label)[r1]

-

If disp is omitted, the assembler assumes 0.

-

If a relative expression with #label or a relative expression with #label and with LOWW applied is specified as disp, [reg1] that follows the expression can be omitted. If omitted, the assembler assumes [r0] to be specified.

-

If a relative expression with $label, or a relative expression with $label and with LOWW applied is specified as disp, [reg1] can be omitted. If omitted, the assembler assumes that [gp] is specified.

-

If a relative expression with %label, or a relative expression with %label and with LOWW applied is specified as disp, [reg1] can be omitted. If omitted, the assembler assumes that [ep] is specified.

[Flag]

CY

---

OV

---

S

---

Z

1 if the specified bit is 0, 0 if notNote

SAT

---

Note

The flag values shown here are those existing prior to the execution of this instruction, not those after the execution.