diff --git a/Implementing-ipatix's-High-Quality-Audio-Mixer.md b/Implementing-ipatix's-High-Quality-Audio-Mixer.md index 8dc35cc..4d710ca 100644 --- a/Implementing-ipatix's-High-Quality-Audio-Mixer.md +++ b/Implementing-ipatix's-High-Quality-Audio-Mixer.md @@ -108,9 +108,12 @@ We can fix this very easily by using the `STMIA` instruction for DMA register wr - dmaRegs[1] = (vu32)(dest); \ - dmaRegs[2] = (vu32)(control); \ - dmaRegs[2]; \ -+ register u32 r_src asm("r0") = (u32)src; \ -+ register u32 r_dst asm("r1") = (u32)dest; \ -+ register u32 r_ctl asm("r2") = (u32)control; \ ++ u32 eval_src = (u32)(src); \ ++ u32 eval_dst = (u32)(dest); \ ++ u32 eval_ctl = (u32)(control); \ ++ register u32 r_src asm("r0") = eval_src; \ ++ register u32 r_dst asm("r1") = eval_dst; \ ++ register u32 r_ctl asm("r2") = eval_ctl; \ + asm volatile("stmia %0!, {%1, %2, %3}" : "+l" (dmaRegs) : "l" (r_src), "l" (r_dst), "l" (r_ctl) : "memory"); \ } ```