- if (coefs[2 + i] == 0x8000)
- eax = 0x7fff;
- else
- eax = ~coefs[2 + i];
- hwwrite(vortex->mmio, 0x2b008 + n * 0x30, eax & 0xffff);
- if (coefs[3 + i] == 0x8000)
- eax = 0x7fff;
- else
- eax = ~coefs[3 + i];
- hwwrite(vortex->mmio, 0x2b00c + n * 0x30, eax & 0xffff);
- if (coefs[4 + i] == 0x8000)
- eax = 0x7fff;
- else
- eax = ~coefs[4 + i];
+ hwwrite(vortex->mmio, 0x2b008 + n * 0x30, sign_invert(coefs[2 + i]));
+ hwwrite(vortex->mmio, 0x2b00c + n * 0x30, sign_invert(coefs[3 + i]));
+ hwwrite(vortex->mmio, 0x2b010 + n * 0x30, sign_invert(coefs[4 + i]));