* re-read the libbase already pushed on the stack for AROS syscalls, instead of trying to re-resolve it. should fix threadvar libbases on AROS.

git-svn-id: trunk@33455 -
This commit is contained in:
Károly Balogh 2016-04-08 22:42:29 +00:00
parent 90b284e169
commit 4ed3a3f09a

View File

@ -69,7 +69,11 @@ implementation
// one syscall convention for AROS
current_asmdata.CurrAsmList.concat(tai_comment.create(strpnew('AROS SysCall')));
reference_reset(tmpref,sizeof(pint));
tmpref.symbol:=current_asmdata.RefAsmSymbol(tstaticvarsym(tcpuprocdef(procdefinition).libsym).mangledname);
{ re-read the libbase pushed first on the stack, instead of just trusting the
mangledname will work. this is important for example for threadvar libbases.
and this way they also don't need to be resolved twice then. (KB) }
tmpref.base:=NR_ESP;
tmpref.offset:=pushedparasize-sizeof(pint);
cg.getcpuregister(current_asmdata.CurrAsmList,NR_EAX);
cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,tmpref,NR_EAX);
reference_reset_base(tmpref,NR_EAX,-tprocdef(procdefinition).extnumber,sizeof(pint));