Merge pull request #1458 from bet4it/patch

Port some patches from Unicorn1 to Unicorn2
This commit is contained in:
2021-11-03 20:59:42 +01:00
committed by GitHub
12 changed files with 165 additions and 23 deletions

View File

@@ -468,7 +468,7 @@ static uc_err arm_query(struct uc_struct *uc, uc_query_type type,
// zero out ARM/THUMB mode
mode = uc->mode & ~(UC_MODE_ARM | UC_MODE_THUMB);
// THUMB mode or ARM MOde
mode +=
mode |=
((ARM_CPU(mycpu)->env.thumb != 0) ? UC_MODE_THUMB : UC_MODE_ARM);
*result = mode;
return UC_ERR_OK;

View File

@@ -570,7 +570,7 @@ void helper_fldz_FT0(CPUX86State *env)
{
//FT0 = floatx80_zero;
floatx80 zero = { 0x0000000000000000LL, 0x0000 };
ST0 = zero;
FT0 = zero;
}
uint32_t helper_fnstsw(CPUX86State *env)

View File

@@ -98,6 +98,16 @@ unsigned long qemu_getauxval(unsigned long type)
return 0;
}
#elif defined(__FreeBSD__)
#include <sys/auxv.h>
unsigned long qemu_getauxval(unsigned long type)
{
unsigned long aux = 0;
elf_aux_info(type, &aux, sizeof(aux));
return aux;
}
#else
unsigned long qemu_getauxval(unsigned long type)