When speculation fails (as determined by the chk instruction) the
processor is to jump to recovery code. This branching behaviour may not be implemented by the processor and a Speculative Operation fault is raised. The OS is responsible to emulate the branch. Implement this, because GCC 4.2 uses advanced loads regularly.
This commit is contained in:
parent
3662c7b8ad
commit
6de61ca8f8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169814
@ -629,8 +629,20 @@ trap(int vector, struct trapframe *tf)
|
||||
break;
|
||||
}
|
||||
|
||||
case IA64_VEC_NAT_CONSUMPTION:
|
||||
case IA64_VEC_SPECULATION:
|
||||
/*
|
||||
* The branching behaviour of the chk instruction is not
|
||||
* implemented by the processor. All we need to do is
|
||||
* compute the target address of the branch and make sure
|
||||
* that control is transfered to that address.
|
||||
* We should do this in the IVT table and not by entring
|
||||
* the kernel...
|
||||
*/
|
||||
tf->tf_special.iip += tf->tf_special.ifa << 4;
|
||||
tf->tf_special.psr &= ~IA64_PSR_RI;
|
||||
goto out;
|
||||
|
||||
case IA64_VEC_NAT_CONSUMPTION:
|
||||
case IA64_VEC_UNSUPP_DATA_REFERENCE:
|
||||
if (user) {
|
||||
ucode = vector;
|
||||
|
Loading…
Reference in New Issue
Block a user