mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
target-ppc: emulate cmpb instruction
Needed for Power ISA version 2.05 compliance. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
9c2627b09d
commit
fcfda20f2f
3 changed files with 24 additions and 0 deletions
|
@ -53,6 +53,21 @@ target_ulong helper_cntlzd(target_ulong t)
|
|||
}
|
||||
#endif
|
||||
|
||||
target_ulong helper_cmpb(target_ulong rs, target_ulong rb)
|
||||
{
|
||||
target_ulong mask = 0xff;
|
||||
target_ulong ra = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(target_ulong); i++) {
|
||||
if ((rs & mask) == (rb & mask)) {
|
||||
ra |= mask;
|
||||
}
|
||||
mask <<= 8;
|
||||
}
|
||||
return ra;
|
||||
}
|
||||
|
||||
/* shift right arithmetic helper */
|
||||
target_ulong helper_sraw(CPUPPCState *env, target_ulong value,
|
||||
target_ulong shift)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue