Copy a register with mv, which is addi rd, rs, 0
mv a0, a1 is a pseudo-instruction for addi a0, a1, 0 on RISC-V, so there is no separate move opcode in the base ISA.
Short posts that solve one thing: the code, the output we got, and why it works.
mv a0, a1 is a pseudo-instruction for addi a0, a1, 0 on RISC-V, so there is no separate move opcode in the base ISA.
Fail the build when a platform assumption is false using static_assert with a message in C11, for type sizes, CHAR_BIT and enum counts.
Create a block device the modern way with blk_mq_alloc_tag_set and blk_mq_alloc_disk on Linux 6.12, which takes a queue_limits pointer since 6.9.
Type B next to a PDS in the DSLIST list to browse its members, then B next to a member to browse its contents.
Turn on printf output on a Pico with stdio_init_all, choosing USB or UART in CMake, and wait for the USB host before printing. Pico SDK 2.1.0.
Save errno into a local variable right after a failing call, before any printf or free can overwrite it, in C on POSIX systems.
Use __builtin_mul_overflow in GCC 14 or Clang to multiply two sizes and learn whether the product wrapped, before it reaches malloc.
Link three split-virtqueue descriptors into one virtio-blk read request with VRING_DESC_F_NEXT, marking only the data and status buffers device-writable.
Run icetime on a placed-and-routed .asc file with -d, -P, -p and -c to print the critical path delay and check it against a target MHz.
Write a qsort comparator that cannot overflow with (a > b) - (a < b), which returns -1, 0 or 1 for any int pair and is safe for INT_MIN and INT_MAX.
Read a socket option back with getsockopt() in C on POSIX, and set the socklen_t length argument first because the kernel treats it as value-result.
Give each thread a readable name with pthread_setname_np so GDB's info threads shows it, within the 15 character limit.
We send one email when a new post is published. No spam.