/* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'ckfp_state' holds the last checkpointed * value of all FPR registers for the current transaction. * * Userspace interface buffer layout: * * struct data { * u64 fpr[32]; * u64 fpscr; * };
*/ int fpr_get(struct task_struct *target, conststruct user_regset *regset, struct membuf to)
{
u64 buf[33]; int i;
flush_fp_to_thread(target);
/* copy to local buffer then write that out */ for (i = 0; i < 32 ; i++)
buf[i] = target->thread.TS_FPR(i);
buf[32] = target->thread.fp_state.fpscr; return membuf_write(&to, buf, 33 * sizeof(u64));
}
/* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'ckfp_state' holds the last checkpointed * value of all FPR registers for the current transaction. * * Userspace interface buffer layout: * * struct data { * u64 fpr[32]; * u64 fpscr; * }; *
*/ int fpr_set(struct task_struct *target, conststruct user_regset *regset, unsignedint pos, unsignedint count, constvoid *kbuf, constvoid __user *ubuf)
{
u64 buf[33]; int i;
flush_fp_to_thread(target);
for (i = 0; i < 32 ; i++)
buf[i] = target->thread.TS_FPR(i);
buf[32] = target->thread.fp_state.fpscr;
/* copy to local buffer then write that out */
i = user_regset_copyin(&pos, &count, &kbuf, &ubuf, buf, 0, -1); if (i) return i;
for (i = 0; i < 32 ; i++)
target->thread.TS_FPR(i) = buf[i];
target->thread.fp_state.fpscr = buf[32]; return 0;
}
/* * Currently to set and get all the vsx state, you need to call * the fp and VMX calls as well. This only get/sets the lower 32 * 128bit VSX registers.
*/
/* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'ckfp_state' holds the last * checkpointed value of all FPR registers for the current * transaction. * * Userspace interface buffer layout: * * struct data { * u64 vsx[32]; * };
*/ int vsr_get(struct task_struct *target, conststruct user_regset *regset, struct membuf to)
{
u64 buf[32]; int i;
/* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'ckfp_state' holds the last * checkpointed value of all FPR registers for the current * transaction. * * Userspace interface buffer layout: * * struct data { * u64 vsx[32]; * };
*/ int vsr_set(struct task_struct *target, conststruct user_regset *regset, unsignedint pos, unsignedint count, constvoid *kbuf, constvoid __user *ubuf)
{
u64 buf[32]; int ret, i;
for (i = 0; i < 32 ; i++)
buf[i] = target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET];
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
buf, 0, 32 * sizeof(double)); if (!ret) for (i = 0; i < 32 ; i++)
target->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i];
return ret;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.