[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] Conditionnal load and store, the return



> > > But if you only access memory just after the test succeeds, an
> > > exception will occur and still you need to rexecute the instruction.
> >
> > And what append if you point to NULL and the test is false ? You can't
> > reexecute it and never. So what did you do ?
> 
> Hey did you ever program a page fault exception ? by default the last IP
> (or PC) when a page fault occurs is pointed on the faulty instruction so we
> can resume - BY DEFAULT - with the faulty instruction. It is up to the
> exception handler to determine if it must resume or kill the process !!! so if
> you encounter a NULL either you just need change the IP (or PC) to call a
> user exception (signal in Unix) or just kill the process.

The problem is that you didn't have any error in fact the test is false, so no 
real memory access are done. So you must not reexecute the instruction and only 
pass it even if the address is bad. It's were I see a problem, you execute a 
handler for nothing...

A+
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/