mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 17:22:46 +01:00
Merge pull request #320 from lioncash/labs
armemu: Should be using labs for USAD8/USADA8
This commit is contained in:
commit
58af74d58d
1 changed files with 4 additions and 4 deletions
|
@ -6383,10 +6383,10 @@ L_stm_s_takeabort:
|
||||||
const u32 rm_val = state->Reg[rm_idx];
|
const u32 rm_val = state->Reg[rm_idx];
|
||||||
const u32 rn_val = state->Reg[rn_idx];
|
const u32 rn_val = state->Reg[rn_idx];
|
||||||
|
|
||||||
const u8 diff1 = (u8)::abs((rn_val & 0xFF) - (rm_val & 0xFF));
|
const u8 diff1 = (u8)std::labs((rn_val & 0xFF) - (rm_val & 0xFF));
|
||||||
const u8 diff2 = (u8)::abs(((rn_val >> 8) & 0xFF) - ((rm_val >> 8) & 0xFF));
|
const u8 diff2 = (u8)std::labs(((rn_val >> 8) & 0xFF) - ((rm_val >> 8) & 0xFF));
|
||||||
const u8 diff3 = (u8)::abs(((rn_val >> 16) & 0xFF) - ((rm_val >> 16) & 0xFF));
|
const u8 diff3 = (u8)std::labs(((rn_val >> 16) & 0xFF) - ((rm_val >> 16) & 0xFF));
|
||||||
const u8 diff4 = (u8)::abs(((rn_val >> 24) & 0xFF) - ((rm_val >> 24) & 0xFF));
|
const u8 diff4 = (u8)std::labs(((rn_val >> 24) & 0xFF) - ((rm_val >> 24) & 0xFF));
|
||||||
|
|
||||||
u32 finalDif = (diff1 + diff2 + diff3 + diff4);
|
u32 finalDif = (diff1 + diff2 + diff3 + diff4);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue