Skip to the content.

L

← 전체 목차로 돌아가기


LD1

✅ Load single 1-element structures (or a plain vector). Loads contiguous memory straight into one (or more) vector register(s), lane by lane, with no interleaving. This is the basic “load a chunk of pixels/samples into a vector” instruction.

✅ 단일(비인터리브) 구조체 적재. 메모리를 그대로, 채널을 섞지 않고 벡터 레지스터에 순서대로 읽어들입니다. “픽셀/샘플 덩어리를 벡터에 그대로 담는다”는 가장 기본적인 벡터 로드입니다.

Syntax

LD1 { <Vt>.<T> }, [<Xn|SP>]

Example

LD1 { V0.16B }, [X0]   // 16바이트를 그대로 V0에 적재

🔗 Open Summary

LD2

✅ Load 2-element interleaved structures. Reads memory containing interleaved pairs (e.g. stereo L/R audio samples, or R/G of a 2-channel image) and de-interleaves them into two separate vector registers in one instruction.

✅ 2개 원소 인터리브 구조체 적재. 스테레오 오디오(L/R)나 2채널 이미지처럼 서로 섞여 저장된 데이터를, 한 번의 명령으로 채널별 벡터 레지스터 두 개로 분리해서 읽어옵니다.

Syntax

LD2 { <Vt>.<T>, <Vt2>.<T> }, [<Xn|SP>]

Example

LD2 { V0.8H, V1.8H }, [X0]   // 스테레오 오디오를 좌/우 채널로 분리 적재

🔗 Open Summary

LD3

✅ Load 3-element interleaved structures. De-interleaves memory holding triplets - classically RGB pixel data - into three separate vector registers (R, G, B) in a single instruction.

✅ 3개 원소 인터리브 구조체 적재. RGB 픽셀처럼 3개씩 섞여 저장된 데이터를, 한 번의 명령으로 R/G/B 세 개의 벡터 레지스터로 분리해서 읽어옵니다.

Syntax

LD3 { <Vt>.<T>, <Vt2>.<T>, <Vt3>.<T> }, [<Xn|SP>]

Example

LD3 { V0.16B, V1.16B, V2.16B }, [X0]   // RGB 픽셀을 R/G/B 채널로 분리 적재

🔗 Open Summary

LD4

✅ Load 4-element interleaved structures. De-interleaves memory holding quadruplets - classically RGBA pixel data - into four separate vector registers (R, G, B, A) in a single instruction.

✅ 4개 원소 인터리브 구조체 적재. RGBA 픽셀처럼 4개씩 섞여 저장된 데이터를, 한 번의 명령으로 R/G/B/A 네 개의 벡터 레지스터로 분리해서 읽어옵니다.

Syntax

LD4 { <Vt>.<T>, <Vt2>.<T>, <Vt3>.<T>, <Vt4>.<T> }, [<Xn|SP>]

Example

LD4 { V0.16B, V1.16B, V2.16B, V3.16B }, [X0]   // RGBA 픽셀을 채널별로 분리 적재

🔗 Open Summary

LDADD

✅ Atomic Load and Add. Atomically adds Ws to the value at a memory address, and returns the OLD value into Wt, in a single instruction. When the old value isn’t needed, the STADD alias (Wt = XZR) is commonly used for a pure atomic increment.

✅ 원자적 로드 후 덧셈. 메모리 주소의 값에 Ws를 원자적으로 더하고, 원래 값을 Wt에 반환합니다. 원래 값이 필요 없다면 순수 원자적 증가를 위해 STADD 별칭(Wt=XZR)을 흔히 씁니다.

Syntax

LDADD <Ws>, <Wt>, [<Xn|SP>]

Example

LDADD W0, W1, [X19]   // *X19 += W0, 이전 값은 W1에 반환
STADD W0, [X19]        // *X19 += W0, 이전 값 필요 없을 때

🔗 Open Summary

LDAXR

✅ Load-Acquire Exclusive Register. Same as LDXR, but additionally acts as a memory barrier: no later memory access by this core can be reordered before this load (acquire semantics). Used together with STLXR when the atomic operation must also be visible in the correct order to other cores.

✅ 획득(Acquire) 배타적 레지스터 적재. LDXR과 동일하게 동작하지만, 추가로 메모리 배리어 역할을 합니다: 이 코어의 이후 메모리 접근이 이 적재보다 먼저 실행되도록 재배치될 수 없습니다(획득 의미론). 원자적 연산이 다른 코어에게도 올바른 순서로 보여야 할 때 STLXR과 짝을 이뤄 사용합니다.

Syntax

LDAXR <Wt|Xt>, [<Xn|SP>]

Example

LDAXR X0, [X1]       // 스핀락 획득 루틴 등에서 사용
LDCLR

✅ Atomic Load and Clear (bit clear). Atomically computes (memory AND NOT Ws) and stores it back, returning the OLD value into Wt.

✅ 원자적 로드 후 비트 클리어. 메모리 값에 대해 (메모리 AND NOT Ws)를 원자적으로 계산해 다시 저장하고, 원래 값을 Wt에 반환합니다.

Syntax

LDCLR <Ws>, <Wt>, [<Xn|SP>]

Example

LDCLR W0, W1, [X19]   // *X19 &= ~W0

🔗 Open Summary

LDEOR

✅ Atomic Load and Exclusive-OR. Atomically XORs Ws into the value at a memory address, returning the OLD value into Wt.

✅ 원자적 로드 후 XOR. 메모리 값에 Ws를 원자적으로 XOR 연산하여 저장하고, 원래 값을 Wt에 반환합니다.

Syntax

LDEOR <Ws>, <Wt>, [<Xn|SP>]

Example

LDEOR W0, W1, [X19]   // *X19 ^= W0

🔗 Open Summary

LDP

✅ Load Pair of Registers. Loads two words or doublewords from consecutive memory locations into two registers in a single instruction. Commonly used to restore callee-saved registers in epilogues.

✅ 레지스터 쌍을 적재합니다. 연속된 메모리 위치에서 워드/더블워드 두 개를 한 번에 읽어 두 레지스터에 저장합니다. 함수 에필로그에서 callee-saved 레지스터를 복원할 때 흔히 사용됩니다.

Syntax

LDP <Wt1|Xt1>, <Wt2|Xt2>, [<Xn|SP>], #<imm>
LDP <Wt1|Xt1>, <Wt2|Xt2>, [<Xn|SP>, #<imm>]

Example

LDP X19, X20, [SP, #16]
LDP X29, X30, [SP], #48

🔗 Open Summary

LDR

✅ Load Register. Loads a word or doubleword from memory into a register.

✅ 레지스터로 값을 적재합니다. 메모리에서 워드 또는 더블워드를 읽어 레지스터에 저장합니다.

Syntax

LDR <Wt|Xt>, [<Xn|SP>], #<simm>
LDR <Wt|Xt>, [<Xn|SP>, #<pimm>]

Example

LDR X0, [X1]
LDR W2, [SP, #8]

🔗 Open Summary

LDRB

✅ Load Register Byte. Loads a single byte (8-bit) from memory into the low 8 bits of the destination register; the remaining upper bits are filled with zero (zero-extension).

✅ 메모리에서 1바이트(8비트)를 읽어 지정한 레지스터에 저장합니다. 이때 레지스터의 나머지 상위 비트는 모두 0으로 채워집니다(Zero-extension).

Syntax

LDRB <Wt>, [<Xn|SP>], #<simm>
LDRB <Wt>, [<Xn|SP>, #<pimm>]

Example

LDRB W0, [X1]        // 문자열의 문자 한 글자 읽기
LDRB W2, [X19, #3]

🔗 Open Summary

LDRH

✅ Load Register Halfword. Loads a 16-bit halfword from memory into the low 16 bits of the destination register; the remaining upper bits are filled with zero (zero-extension).

✅ 레지스터로 하프워드를 적재합니다. 메모리에서 16비트(2바이트)를 읽어 대상 레지스터의 하위 16비트에 저장하며, 나머지 상위 비트는 모두 0으로 채워집니다(Zero-extension).

Syntax

LDRH <Wt>, [<Xn|SP>], #<simm>
LDRH <Wt>, [<Xn|SP>, #<pimm>]

Example

LDRH W0, [X1]        // unsigned short 값 읽기
LDRH W2, [X19, #2]

🔗 Open Summary

LDRSB

✅ Load Register Signed Byte. Loads a single byte from memory and sign-extends it to fill the destination register (32-bit or 64-bit). Use this instead of LDRB when the byte represents a signed value (e.g. a signed char).

✅ 레지스터로 부호 있는 바이트를 적재합니다. 메모리에서 1바이트를 읽어 대상 레지스터(32비트 또는 64비트) 전체에 부호 확장하여 채웁니다. 그 바이트가 부호 있는 값(예: signed char)일 때는 LDRB 대신 이 명령어를 사용해야 합니다.

Syntax

LDRSB <Wt|Xt>, [<Xn|SP>], #<simm>
LDRSB <Wt|Xt>, [<Xn|SP>, #<pimm>]

Example

LDRSB X0, [X1]       // signed char -> 64비트로 부호 확장하며 읽기

🔗 Open Summary

LDRSH

✅ Load Register Signed Halfword. Loads a 16-bit halfword from memory and sign-extends it to fill the destination register (32-bit or 64-bit). Use this instead of LDRH when the halfword represents a signed value (e.g. a signed short).

✅ 레지스터로 부호 있는 하프워드를 적재합니다. 메모리에서 16비트를 읽어 대상 레지스터(32비트 또는 64비트) 전체에 부호 확장하여 채웁니다. 그 값이 부호 있는 값(예: signed short)일 때는 LDRH 대신 이 명령어를 사용해야 합니다.

Syntax

LDRSH <Wt|Xt>, [<Xn|SP>], #<simm>
LDRSH <Wt|Xt>, [<Xn|SP>, #<pimm>]

Example

LDRSH X0, [X1]       // signed short -> 64비트로 부호 확장하며 읽기

🔗 Open Summary

LDRSW

✅ Load Register Signed Word. Loads a 32-bit word from memory and sign-extends it into a 64-bit destination register. Commonly used to widen a signed 32-bit int stored in memory to a 64-bit value for pointer arithmetic.

✅ 레지스터로 부호 있는 워드를 적재합니다. 메모리에서 32비트를 읽어 64비트 대상 레지스터에 부호 확장하여 저장합니다. 메모리에 저장된 부호 있는 32비트 int 값을 포인터 연산 등을 위해 64비트로 확장할 때 흔히 사용됩니다.

Syntax

LDRSW <Xt>, [<Xn|SP>], #<simm>
LDRSW <Xt>, [<Xn|SP>, #<pimm>]

Example

LDRSW X0, [X1]       // int -> long 부호 확장하며 읽기

🔗 Open Summary

LDSET

✅ Atomic Load and Set (bit set). Atomically ORs Ws into the value at a memory address, returning the OLD value into Wt.

✅ 원자적 로드 후 비트 셋. 메모리 값에 Ws를 원자적으로 OR 연산하여 저장하고, 원래 값을 Wt에 반환합니다.

Syntax

LDSET <Ws>, <Wt>, [<Xn|SP>]

Example

LDSET W0, W1, [X19]   // *X19 |= W0

🔗 Open Summary

LDSMAX

✅ Atomic Load Signed Maximum. Atomically compares (as signed values) Ws with the memory value and stores whichever is larger, returning the OLD value into Wt.

✅ 원자적 로드 후 부호 있는 최댓값. 메모리 값과 Ws를 부호 있는 값으로 원자적으로 비교하여 더 큰 값을 저장하고, 원래 값을 Wt에 반환합니다.

Syntax

LDSMAX <Ws>, <Wt>, [<Xn|SP>]

Example

LDSMAX W0, W1, [X19]

🔗 Open Summary

LDSMIN

✅ Atomic Load Signed Minimum. Atomically compares (as signed values) Ws with the memory value and stores whichever is smaller, returning the OLD value into Wt.

✅ 원자적 로드 후 부호 있는 최솟값. 메모리 값과 Ws를 부호 있는 값으로 원자적으로 비교하여 더 작은 값을 저장하고, 원래 값을 Wt에 반환합니다.

Syntax

LDSMIN <Ws>, <Wt>, [<Xn|SP>]

Example

LDSMIN W0, W1, [X19]

🔗 Open Summary

LDUMAX

✅ Atomic Load Unsigned Maximum. Same as LDSMAX but compares the values as unsigned.

✅ 원자적 로드 후 부호 없는 최댓값. LDSMAX와 동일하지만 부호 없는 값으로 비교합니다.

Syntax

LDUMAX <Ws>, <Wt>, [<Xn|SP>]

Example

LDUMAX W0, W1, [X19]

🔗 Open Summary

LDUMIN

✅ Atomic Load Unsigned Minimum. Same as LDSMIN but compares the values as unsigned.

✅ 원자적 로드 후 부호 없는 최솟값. LDSMIN과 동일하지만 부호 없는 값으로 비교합니다.

Syntax

LDUMIN <Ws>, <Wt>, [<Xn|SP>]

Example

LDUMIN W0, W1, [X19]

🔗 Open Summary

LDUR

✅ Load Register (Unscaled offset). Loads a word/doubleword from memory using a raw byte offset that does NOT need to be a multiple of the transfer size, unlike the offset used by LDR. Useful for reading unaligned struct fields or arbitrary byte positions.

✅ 레지스터를 적재합니다 (정렬 제약 없는 오프셋). LDR과 달리 오프셋이 전송 크기의 배수일 필요가 없는, 임의의 바이트 오프셋을 그대로 사용해 메모리에서 값을 읽습니다. 정렬되지 않은 구조체 필드나 임의 바이트 위치를 읽을 때 유용합니다.

Syntax

LDUR <Wt|Xt>, [<Xn|SP>, #<simm>]

Example

LDUR X0, [X1, #3]    // 오프셋 3처럼 8의 배수가 아니어도 OK (LDR은 불가)

🔗 Open Summary

LDXR

✅ Load Exclusive Register. Loads a value from memory and marks that memory location as being ‘exclusively’ monitored by this core. Must be paired with a later STXR to the same address to attempt an atomic update; commonly used to build lock-free counters, spinlocks, and compare-and-swap loops.

✅ 배타적(Exclusive) 레지스터 적재. 메모리에서 값을 읽어오면서 그 메모리 주소를 현재 코어가 ‘배타적으로’ 감시 중이라고 표시합니다. 반드시 같은 주소에 대한 STXR과 짝을 이뤄 원자적 갱신을 시도해야 하며, 락 프리 카운터, 스핀락, compare-and-swap 루프를 만들 때 흔히 사용됩니다.

Syntax

LDXR <Wt|Xt>, [<Xn|SP>]

Example

LDXR X0, [X1]        // X1이 가리키는 값을 배타적으로 읽기

🔗 Open Summary

LSL

✅ Logical Shift Left. Shifts the bits of a register left by a given amount, filling with zeros from the right.

✅ 논리 왼쪽 시프트. 레지스터의 비트를 지정한 만큼 왼쪽으로 이동시키고, 오른쪽에서 채워지는 비트는 0으로 채웁니다.

Syntax

LSL <Wd|Xd>, <Wn|Xn>, #<shift>  or  LSL <Wd|Xd>, <Wn|Xn>, <Wm|Xm>

Example

LSL x10, x22, #2   // x10 = j * 4

🔗 Open Summary

LSR

✅ Logical Shift Right. Shifts the bits of a register right by a given amount, filling with zeros from the left.

✅ 논리 오른쪽 시프트. 레지스터의 비트를 지정한 만큼 오른쪽으로 이동시키고, 왼쪽에서 채워지는 비트는 0으로 채웁니다.

Syntax

LSR <Wd|Xd>, <Wn|Xn>, #<shift>  or  LSR <Wd|Xd>, <Wn|Xn>, <Wm|Xm>

Example

LSR X0, X1, #1     // X0 = X1 / 2 (unsigned)

🔗 Open Summary