Or.w, Description, Operation assembler syntax – Freescale Semiconductor StarCore SC140 User Manual

Page 658

Advertising
background image

A-344

SC140 DSP Core Reference Manual

OR.W

OR.W

Bitwise OR on a 16-Bit Operand in Memory (BMU)

OR.W

Description

These operations read from memory, modify the retrieved value, and write the new value back to the same
memory address, resulting in two memory accesses.

The absolute addresses, offsets, and address register values must be word-aligned.

Status and Conditions that Affect Instruction

Status and Conditions Changed by Instruction

None.

Operation

Assembler Syntax

#u16

⏐ (R) → (R)

OR.W #u16,(Rn) {0

≤ u16 < 2

16

}

#u16

⏐ (SP–u5) → (SP–u5)

OR.W #u16,(SP–u5) {0

≤ u16 < 2

16

} {0

≤ u5 < 64,W]

#u16

⏐ (SP+s16) → (SP+s16)

OR.W #u16,(SP+s16) {0

≤ u16 < 2

16

} {–2

15

≤ s16 < 2

15

,W}

#u16

⏐ (a16) → (a16)

OR.W #u16,(a16) {0

≤ u16 < 2

16

} {0

≤ a16 < 2

16

,W}

OR.W #u16,(Rn)

Performs a bitwise inclusive OR of an immediate unsigned word with the contents of a memory address
pointed to by an address register (Rn). It then stores the result in that memory address. This instruction is
assembler-mapped to BMSET.W #u16,(Rn) with the immediate value.

OR.W #u16,(SP–u5)

Performs a bitwise inclusive OR of an immediate unsigned word with the contents of a memory address
pointed to by the active stack pointer (SP) minus an unsigned 5-bit offset. It then stores the result in the
memory address. This instruction is assembler-mapped to BMSET.W #u16,(SP–u5) with the immediate
value.

OR.W #u16,(SP+s16)

Performs a bitwise inclusive OR of an immediate unsigned word with the contents of a memory address
pointed to by the active stack pointer (SP) plus by a signed 16-bit offset. It then stores the result in the
memory address. This instruction is assembler-mapped to BMSET.W #u16,(SP+s16) with the immediate
value.

OR.W #u16,(a16)

Performs a bitwise inclusive OR of an immediate unsigned word with the contents of a 16-bit absolute
memory address. It then stores the result in the memory location. This instruction is assembler-mapped to
BMSET.W #u16,(a16) with the immediate value.

Register Address

Bit Name

Description

SR[18]

EXP

Determines which stack pointer is used when the stack pointer is an
operand. Otherwise, the instruction is not affected by SR.

Advertising