1 #include <cstdint> 2 3 struct alignas(16) vec_t { 4 uint64_t a, b; 5 }; 6 7 int main() { 8 constexpr uint32_t gprs[] = { 9 0x00010203, 10 0x10111213, 11 0x20212223, 12 0x30313233, 13 0x40414243, 14 0x50515253, 15 0x60616263, 16 0x70717273, 17 }; 18 19 constexpr vec_t vecs[] = { 20 { 0x0F0E0D0C0B0A0908, 0x1716151413121110, }, 21 { 0x100F0E0D0C0B0A09, 0x1817161514131211, }, 22 { 0x11100F0E0D0C0B0A, 0x1918171615141312, }, 23 { 0x1211100F0E0D0C0B, 0x1A19181716151413, }, 24 }; 25 const vec_t *vec_ptr = vecs; 26 27 asm volatile( 28 "ldrd r0, r1, [%1]\n\t" 29 "ldrd r2, r3, [%1, #8]\n\t" 30 "ldrd r4, r5, [%1, #16]\n\t" 31 "ldrd r6, r7, [%1, #24]\n\t" 32 "\n\t" 33 "vld1.64 {q0, q1}, [%0]!\n\t" 34 "vld1.64 {q2, q3}, [%0]!\n\t" 35 "\n\t" 36 "bkpt #0\n\t" 37 : "+r"(vec_ptr) 38 : "r"(gprs) 39 : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", 40 "q0", "q1", "q2", "q3" 41 ); 42 43 return 0; 44 } 45