set1


Set s bit.

[Syntax]

-

set1 bit#3, disp[reg1]

-

set1 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 "set1 reg2, [reg1]".

[Function]

-

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

Sets 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 "set1 reg2, [reg1]"

Sets 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 for disp, the assembler generates one set1 machine instructionNote.

(a)

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

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

(b)

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

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

(c)

Relative expression having !label or %label

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

(d)

Expression with LOWW

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

Note

The set1 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

set1    bit#3, disp[reg1]
movhi   HIGHW1(disp), reg1, r1
set1    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

set1    bit#3, #label[reg1]
movhi   HIGHW1(#label), reg1, r1
set1    bit#3, LOWW(#label)[r1]
set1    bit#3, label[reg1]
movhi   HIGHW1(label), reg1, r1
set1    bit#3, LOWW(label)[r1]
set1    bit#3, $label[reg1]
movhi   HIGHW1($label), reg1, r1
set1    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] can be omitted. If omitted, the assembler assumes that [r0] 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 [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.