Re: [PATCH 2/2] target/loongarch: Fix raise_mmu_exception() set wrong exception_index

2022-11-01 Thread Richard Henderson
On 11/1/22 18:32, Song Gao wrote: When the address is invalid address, We should set exception_index according to MMUAccessType, and EXCCODE_ADEF need't update badinstr. Otherwise, The system enters an infinite loop. e.g: run test.c on system mode test.c: #include void (*func)(int *);

[PATCH 2/2] target/loongarch: Fix raise_mmu_exception() set wrong exception_index

2022-11-01 Thread Song Gao
When the address is invalid address, We should set exception_index according to MMUAccessType, and EXCCODE_ADEF need't update badinstr. Otherwise, The system enters an infinite loop. e.g: run test.c on system mode test.c: #include void (*func)(int *); int main() { int i =