add mem_api sample program and fix check for wrong NX related constant in cputlb.c

This commit is contained in:
Chris Eagle
2015-09-04 10:27:03 -07:00
parent bb27c4c6af
commit e9c6b11506
3 changed files with 344 additions and 2 deletions

View File

@ -300,7 +300,7 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr)
(addr & TARGET_PAGE_MASK))) {
cpu_ldub_code(env1, addr);
//check for NX related error from softmmu
if (env1->invalid_error == UC_ERR_MEM_READ) {
if (env1->invalid_error == UC_ERR_EXEC_PROT) {
env1->invalid_error = UC_ERR_CODE_INVALID;
return -1;
}