mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target-xtensa: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
03a733dc62
commit
b79ea941d6
3 changed files with 11 additions and 17 deletions
|
@ -161,19 +161,6 @@ void HELPER(debug_exception)(CPUXtensaState *env, uint32_t pc, uint32_t cause)
|
|||
HELPER(exception)(env, EXC_DEBUG);
|
||||
}
|
||||
|
||||
uint32_t HELPER(nsa)(uint32_t v)
|
||||
{
|
||||
if (v & 0x80000000) {
|
||||
v = ~v;
|
||||
}
|
||||
return v ? clz32(v) - 1 : 31;
|
||||
}
|
||||
|
||||
uint32_t HELPER(nsau)(uint32_t v)
|
||||
{
|
||||
return v ? clz32(v) : 32;
|
||||
}
|
||||
|
||||
static void copy_window_from_phys(CPUXtensaState *env,
|
||||
uint32_t window, uint32_t phys, uint32_t n)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue