mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 06:46:22 -05:00
dyncom: Correct SXTAB16 and SXTB16
This commit is contained in:
parent
2889372e47
commit
b125388152
1 changed files with 4 additions and 4 deletions
|
@ -3928,13 +3928,13 @@ SXTB16_INST : {
|
|||
if (inst_cream->Rn == 15) {
|
||||
u32 lo = (u32)(s8)rm_val;
|
||||
u32 hi = (u32)(s8)(rm_val >> 16);
|
||||
RD = (lo | (hi << 16));
|
||||
RD = (lo & 0xFFFF) | (hi << 16);
|
||||
}
|
||||
// SXTAB16
|
||||
else {
|
||||
u32 lo = (rn_val & 0xFFFF) + (u32)(s8)(rm_val & 0xFF);
|
||||
u32 hi = ((rn_val >> 16) & 0xFFFF) + (u32)(s8)((rm_val >> 16) & 0xFF);
|
||||
RD = (lo | (hi << 16));
|
||||
u32 lo = rn_val + (u32)(s8)(rm_val & 0xFF);
|
||||
u32 hi = (rn_val >> 16) + (u32)(s8)((rm_val >> 16) & 0xFF);
|
||||
RD = (lo & 0xFFFF) | (hi << 16);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue