mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
ARM TCG conversion 6/16.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4143 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
8f01245ee7
commit
3670669ce2
4 changed files with 169 additions and 157 deletions
|
@ -347,6 +347,35 @@ uint32_t HELPER(clz)(uint32_t x)
|
|||
return count;
|
||||
}
|
||||
|
||||
int32_t HELPER(sdiv)(int32_t num, int32_t den)
|
||||
{
|
||||
if (den == 0)
|
||||
return 0;
|
||||
return num / den;
|
||||
}
|
||||
|
||||
uint32_t HELPER(udiv)(uint32_t num, uint32_t den)
|
||||
{
|
||||
if (den == 0)
|
||||
return 0;
|
||||
return num / den;
|
||||
}
|
||||
|
||||
uint32_t HELPER(rbit)(uint32_t x)
|
||||
{
|
||||
x = ((x & 0xff000000) >> 24)
|
||||
| ((x & 0x00ff0000) >> 8)
|
||||
| ((x & 0x0000ff00) << 8)
|
||||
| ((x & 0x000000ff) << 24);
|
||||
x = ((x & 0xf0f0f0f0) >> 4)
|
||||
| ((x & 0x0f0f0f0f) << 4);
|
||||
x = ((x & 0x88888888) >> 3)
|
||||
| ((x & 0x44444444) >> 1)
|
||||
| ((x & 0x22222222) << 1)
|
||||
| ((x & 0x11111111) << 3);
|
||||
return x;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
|
||||
void do_interrupt (CPUState *env)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue