Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when reading or writing AArch64 or AArch32 Thumb assembly, inline asm in C, AAPCS64 register roles, or NEON and SVE vector code. Not for ABI detail across ISAs: use abi-and-calling-conventions.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
AArch64 has 31 general 64-bit registers, a clean load-store instruction set, and per-core SIMD through NEON. This skill reads compiler output and writes correct inline asm for it.
| Field | Bound contract |
|---|---|
| Trigger | The task reads GCC or Clang AArch64 output, writes inline asm or standalone assembly, decodes AAPCS64 register roles, or writes NEON intrinsics or SVE kernels. |
| Authority | Read-only. The skill explains, drafts, and annotates assembly; edits land in the user's source through the normal coding path. No remote mutation. |
| Side effect | None. Output is analysis and drafted code in chat. |
| Done | The drafted assembly assembles for the named target, or the compiler output under discussion is explained register by register. |
aarch64-linux-gnu for application cores, arm-none-eabi with -mthumb for 32-bit Cortex-M.aarch64-linux-gnu-gcc -O2 -S foo.c -o foo.s
aarch64-linux-gnu-objdump -d a.out
| Register | Alias | Role |
|---|---|---|
x0 to x7 | w0 for 32-bit use | Arguments and return values, caller saved |
x8 | Indirect result location, or syscall number on Linux | |
x9 to x15 | Temporaries, caller saved | |
x16, x17 | ip0, ip1 | Intra-procedure call scratch, do not keep values across calls |
x18 | Platform register, reserved on some platforms, do not use | |
x19 to x28 | Callee saved | |
x29 | fp | Frame pointer |
x30 | lr | Link register, return address |
sp | Stack pointer, must stay 16-byte aligned at public interfaces | |
v0 to v7 | q/d/s views | FP and SIMD arguments and returns, caller saved |
v8 to v15 | Callee saved, low 64 bits only |
ldr x0, [x1] // load 64-bit
ldrb w0, [x1] // load byte, zero-extended
strb w0, [x1] // store byte
ldp x0, x1, [sp] // load pair
stp x29, x30, [sp, #-16]! // store pair with pre-index writeback
add x0, x1, x2 // x0 = x1 + x2
mul x0, x1, x2 // low 64 bits of the product
madd x0, x1, x2, x3 // x0 = x1*x2 + x3
sdiv x0, x1, x2 // signed divide
udiv x0, x1, x2 // unsigned divide
cmp x0, x1 // set flags from x0 - x1
cbz x0, label // branch if zero, no flags needed
blr x0 // branch to address in register, set x30
ret // return through x30
adrp x0, symbol // page address of a symbol
add x0, x0, :lo12:symbol
sp returns aligned.my_func: // non-leaf example
stp x29, x30, [sp, #-32]!
mov x29, sp
stp x19, x20, [sp, #16]
// body
ldp x19, x20, [sp, #16]
ldp x29, x30, [sp], #32
ret
volatile stops reordering, memory declares side effects on memory, and hardware registers need explicit clobbers. Use the counter to read the timer. Done when: the fragment compiles and its inputs, outputs, and clobbers are each listed.static inline uint64_t read_cntvct(void) {
uint64_t val;
__asm__ volatile("mrs %0, cntvct_el0" : "=r"(val));
return val;
}
<arm_neon.h> intrinsics; they map one to one onto instructions. Done when: the loop processes one vector per iteration and the scalar tail stays correct.#include <arm_neon.h>
void sum_f32(const float *a, const float *b, float *dst, int n) {
for (int i = 0; i + 4 <= n; i += 4) {
float32x4_t va = vld1q_f32(a + i); // load 4 floats
float32x4_t vb = vld1q_f32(b + i);
float32x4_t vc = vaddq_f32(va, vb);
vst1q_f32(dst + i, vc); // store 4 floats
}
}
sysconf(_SC_PAGESIZE) replaces the 4096 assumption. AMX is internal to Apple libraries; write portable code with Accelerate or Metal instead. SVE exists only where the hardware has it; guard SVE code and keep a NEON fallback. Done when: the code states no portability assumption the target contradicts.| Failure class | Behavior |
|---|---|
sp misaligned crash in a callee | A path adjusted sp by a non-16-byte amount. Audit every sub sp and pre-index offset. |
| Value lost across a call in hand-written asm | The value sat in x0 to x17. Move it to a callee-saved register or spill it. |
Inline asm result wrong at -O2 | Missing volatile or a missing "memory" clobber let the compiler delete or reorder the asm. |
| NEON code fails on Cortex-M | Cortex-M has no NEON and runs Thumb. Rewrite with scalar code or a DSP extension. |
| SVE build fails on a NEON-only core | SVE needs supporting hardware. Use the guarded fallback from step 7. |
Annotated assembly or inline asm, with the register roles named, the clobbers justified, and the target stated. The condition-code table, the wider instruction list, and the NEON category reference are in references/reference.md.
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.