* Unconditionally save the current co-processor state across suspend and * resume. */
| 947 | * resume. |
| 948 | */ |
| 949 | void |
| 950 | npxsuspend(union savefpu *addr) |
| 951 | { |
| 952 | register_t cr0; |
| 953 | |
| 954 | if (!hw_float) |
| 955 | return; |
| 956 | if (PCPU_GET(fpcurthread) == NULL) { |
| 957 | bcopy(npx_initialstate, addr, cpu_max_ext_state_size); |
| 958 | return; |
| 959 | } |
| 960 | cr0 = rcr0(); |
| 961 | stop_emulating(); |
| 962 | fpusave(addr); |
| 963 | load_cr0(cr0); |
| 964 | } |
| 965 | |
| 966 | void |
| 967 | npxresume(union savefpu *addr) |
no test coverage detected