ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.93k stars 290 forks source link

[LA64_DYNAREC] Add adc8, adc8c, adc16 and testadc #2069

Closed xiangzhai closed 6 days ago

xiangzhai commented 1 week ago

Hi,

Testcase testadc Passed on la64_lbt supported platform:

Dynarec for LoongArch with extension LSX LASX LBT_X86 PageSize:16384 Running on Loongson-3A5000-HV with 4 Cores
Will use time-based emulation for rdtsc, even if hardware counter are available
Will use Software counter measured at 1.0 GHz emulating 2.0 GHz
Params database has 14 entries
Box64 with Dynarec v0.3.1  built on Nov 25 2024 11:44:37
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 59 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/home/zhaixiang/.cargo/bin/:/usr/local/bin/:/usr/bin/:/bin/:/usr/local/games/:/usr/games/:/home/zhaixiang/rust-1.77.0-loongarch64-unknown-linux-gnu/cargo/bin/:/home/zhaixiang/rust-1.77.0-loongarch64-unknown-linux-gnu/rustc/bin/
Looking for /home/zhaixiang/testadc
Rename process to "testadc" 
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
al=0xfe
dl=0x1
ax=0xfffe
dx=0x1
eax=0xfffffffe
edx=0x1

Also passed when disabled la64_lbt:

export BOX64_DYNAREC_LA64NOEXT=1

Dynarec for LoongArch  PageSize:16384 Running on Loongson-3A5000-HV with 4 Cores
Will use time-based emulation for rdtsc, even if hardware counter are available
Will use Software counter measured at 1.0 GHz emulating 2.0 GHz
Params database has 14 entries
Box64 with Dynarec v0.3.1  built on Nov 25 2024 11:44:37
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 59 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/home/zhaixiang/.cargo/bin/:/usr/local/bin/:/usr/bin/:/bin/:/usr/local/games/:/usr/games/:/home/zhaixiang/rust-1.77.0-loongarch64-unknown-linux-gnu/cargo/bin/:/home/zhaixiang/rust-1.77.0-loongarch64-unknown-linux-gnu/rustc/bin/
Looking for /home/zhaixiang/testadc
Rename process to "testadc" 
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
al=0xfe
dl=0x1
ax=0xfffe
dx=0x1
eax=0xfffffffe
edx=0x1

Please review my patch.

Thanks, Leslie Zhai