/* XXX: suppress this hack */
Hi,
Better performance for i386-softmmu under PowerPC? Yes, please! At line 96 in "dyngen-exec.h" sits the following code:
/* XXX: suppress this hack */
#if defined(CONFIG_USER_ONLY)
#define AREG4 "r16"
#define AREG5 "r17"
#define AREG6 "r18"
#define AREG7 "r19"
#define AREG8 "r20"
#define AREG9 "r21"
#define AREG10 "r22"
#define AREG11 "r23"
#endif
I would like to "suppress that hack", ie make sure that AREG4 to AREG11 gets defined for i386-softmmu. Someone that knows the code - what needs to be done? Just removing the ifdef does not work for sure. Is it some issue with setjmp()/longjmp()? I'm willing to set aside some hours to fix this if someone who knows points me in the right direction.
Thanks!
/ magnus
Hi,
Quoted 17 lines · Magnus Damm
Hi,
Better performance for i386-softmmu under PowerPC? Yes, please! At line 96 in "
dyngen-exec.h" sits the following code:/* XXX: suppress this hack */
#ifdefined(CONFIG_USER_ONLY)
#define AREG4 "r16"
#define AREG5 "r17"
#define AREG6 "r18"
#define AREG7 "r19"
#define AREG8 "r20"
#define AREG9 "r21"
#define AREG10 "r22"
#define AREG11 "r23"
#endif
Quoted 5 lines
I would like to "suppress that hack", ie make sure that AREG4 to AREG11 gets defined for i386-softmmu. Someone that knows the code - what needs to be done? Just removing the ifdef does not work for sure. Is it some issue with setjmp()/longjmp()? I'm willing to set aside some hours to fix this if someone who knows points me in the right direction.
It's all about ABIs: see
http://www-106.ibm.com/developerworks/linux/library/l-ppc/#h4
You want all those registers you use to be volatile, i.e. every function which wants to use one of those has to make sure that their original contents gets restored before returning.
Hth,
Dscho
Hello there, thanks for the reply!
[snip]
Quoted 6 lines
Quoted 5 lines
I would like to "suppress that hack", ie make sure that AREG4 to AREG11 gets defined for i386-softmmu. Someone that knows the code - what needs to be done? Just removing the ifdef does not work for sure. Is it some issue with setjmp()/longjmp()? I'm willing to set aside some hours to fix this if someone who knows points me in the right direction.
Quoted 7 lines
It's all about ABIs: see
http://www-106.ibm.com/developerworks/linux/library/l-ppc/#h4
You want all those registers you use to be volatile, i.e. every function which wants to use one of those has to make sure that their original contents gets restored before returning.
Yeah, registers "r3" to "r12" are "caller save", ie these registers must be saved before a function is called. But what about "r16" to "r23", these are currently only used when CONFIG_USER_ONLY is set - I thought that they were supposed to be saved by the called function prior use, "callee save". But how does that affect the softmmu code in a bad way but the user code works? Any ideas?
Thanks!
/ magnus
Hi,
Quoted 6 lines · Magnus Damm
Yeah, registers "r3" to "r12" are "caller save", ie these registers must be saved before a function is called. But what about "r16" to "r23", these are currently only used when
CONFIG_USER_ONLYis set - I thought that they were supposed to be saved by the called function prior use, "callee save". But how does that affect the softmmu code in a bad way but the user code works? Any ideas?
*scratcheshishead* I cannot think of one way that code should work in user mode... IMHO there is no protection to those registers when calling libc or a syscall.
Ciao,
Dscho