Hi, Xiantao and Anthony >+void getfpreg(unsigned long regnum, struct ia64_fpreg *fpval, >+ struct kvm_pt_regs *regs) >+{ >+ /* Take floating register rotation into consideration*/ >+ if (regnum >= IA64_FIRST_ROTATING_FR) >+ regnum = IA64_FIRST_ROTATING_FR + fph_index(regs, >regnum); >+#define CASE_FIXED_FP(reg) \ >+ case (reg) : \ >+ ia64_stf_spill(fpval, reg); \ >+ break >+ >+ switch (regnum) { >+ CASE_FIXED_FP(0); >+ CASE_FIXED_FP(1); >+ CASE_FIXED_FP(2); >+ CASE_FIXED_FP(3); >+ CASE_FIXED_FP(4); >+ CASE_FIXED_FP(5); >+ >+ CASE_FIXED_FP(6); >+ CASE_FIXED_FP(7); >+ CASE_FIXED_FP(8); >+ CASE_FIXED_FP(9); >+ CASE_FIXED_FP(10); >+ CASE_FIXED_FP(11); >+ Is this correct ? Though I don't know why xen do so. In the case of Xen, the above parts are; #define CASE_SAVED_FP(reg) \ case reg: \ fpval->u.bits[0] = regs->f##reg.u.bits[0]; \ fpval->u.bits[1] = regs->f##reg.u.bits[1]; \ break CASE_SAVED_FP(6); CASE_SAVED_FP(7); CASE_SAVED_FP(8); CASE_SAVED_FP(9); CASE_SAVED_FP(10); CASE_SAVED_FP(11); >+void setfpreg(unsigned long regnum, struct ia64_fpreg *fpval, >+ struct kvm_pt_regs *regs) >+{ >+ /* Take floating register rotation into consideration*/ >+ if (regnum >= IA64_FIRST_ROTATING_FR) >+ regnum = IA64_FIRST_ROTATING_FR + fph_index(regs, >regnum); >+ >+#define CASE_FIXED_FP(reg) \ >+ case (reg) : \ >+ ia64_ldf_fill(reg, fpval); \ >+ break >+ >+ switch (regnum) { >+ CASE_FIXED_FP(2); >+ CASE_FIXED_FP(3); >+ CASE_FIXED_FP(4); >+ CASE_FIXED_FP(5); >+ >+ CASE_FIXED_FP(6); >+ CASE_FIXED_FP(7); >+ CASE_FIXED_FP(8); >+ CASE_FIXED_FP(9); >+ CASE_FIXED_FP(10); >+ CASE_FIXED_FP(11); >+ ditto. #define CASE_RESTORED_FP(reg) \ case reg: \ regs->f##reg.u.bits[0] = fpval->u.bits[0]; \ regs->f##reg.u.bits[1] = fpval->u.bits[1] ; \ break CASE_RESTORED_FP(6); CASE_RESTORED_FP(7); CASE_RESTORED_FP(8); CASE_RESTORED_FP(9); CASE_RESTORED_FP(10); CASE_RESTORED_FP(11); Best Regards, Akio Takebe -- To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |