Add declarations and templates of extended MMU helpers which can take return 
address argument to what helper functions return. These extended helper 
functions are called only by generated code.
It's not entirely clear from this description what the
return address argument actually is.
My commit message might give confusion. The return address is originally expressed as "retaddr" in softmmu_template.h. It means the runtime host pc which access guest memory. In previous standard MMU helpers, the address is the caller's pc of MMU helper calculated from GETPC(), however, in new optimized MMU helpers, the address is different from the caller's pc because the call site is located end of TB.
Also, please line wrap your commit messages.
I didn't know the line wrap rule of commit message. Is the rule included in checkpatch.pl? Let me check it.
+#if defined(CONFIG_QEMU_LDST_OPTIMIZATION)
+/* Extended versions of MMU helpers for qemu_ld/st optimization.
+   They get return address arguments because the caller PCs are not where 
helpers return to. */
This is >80 characters ; please use checkpatch.pl.
Ok.
+uint8_t __ext_ldb_mmu(target_ulong addr, int mmu_idx, uintptr_t ra);
'__' is a prefix reserved for the system. I know we have existing usage
of it, but I think it would be better to avoid adding new uses.
Ok, I'll fix it.
+#ifdef USE_EXTENDED_HELPER
+/* Exteneded helper funtions have one more argument of address
+   to which pc is returned after setting TLB entry */
"Extended". "functions".
Ok.


Reply via email to