this part of code has been ever tested or not? any body can tell me? #else //non X86 void JIT::compileFastArith_op_mod(unsigned result, unsigned op1, unsigned op2) { emitPutJITStubArgFromVirtualRegister(op1, 1, regT2); emitPutJITStubArgFromVirtualRegister(op2, 2, regT2); emitCTICall(JITStubs::cti_op_mod); emitPutVirtualRegister(result); }
thanks alot, joe --- On Wed, 4/22/09, x yz <last...@yahoo.com> wrote: > From: x yz <last...@yahoo.com> > Subject: Re: [webkit-dev] want to port JIT to MIPS - cti_op_mod(STUB_ARGS) > seg fault > To: "WebKit Development" <webkit-dev@lists.webkit.org>, "Gavin Barraclough" > <barraclo...@apple.com> > Date: Wednesday, April 22, 2009, 8:31 AM > I use MIPS32EL, VA_LIST call, MIPS pushes function argument > from left to right. I wrote a simple VA_LIST test it works > on my box. > > BEGIN_STUB_FUNCTION() cause seg fault due to MIPS uses gp > reg to read sth. > I treied to rewrite the code like that: > JSObject* JITStubs::cti_op_new_func_exp(STUB_ARGS) > { > va_list vl_args; > va_start(vl_args, args); > StackHack stackHack(&STUB_RETURN_ADDRESS_SLOT); > JSValuePtr dividendValue = va_arg(vl_args, JSC::JSCell* > ); > JSValuePtr divisorValue = va_arg(vl_args, JSC::JSCell* > ); > ... > } > > Still fail in stackHack(), if I comment out stackHack() > then fails at va_arg. > > gp is a global register for common/public variables, the > same usage before I call cti_op_mod() works fine. > > I also tried not use VA_LIST but REGISTER calling > convention, still fail: > (gdb) x/2i $at > 0x6ab500 > <_ZN3JSC8JITStubs10cti_op_modEPPv>: lui gp,0xf96 > 0x6ab504 > <_ZN3JSC8JITStubs10cti_op_modEPPv+4>: addiu gp,gp,9008 > (gdb) x/20i $at > 0x6ab500 > <_ZN3JSC8JITStubs10cti_op_modEPPv>: lui gp,0xf96 > 0x6ab504 > <_ZN3JSC8JITStubs10cti_op_modEPPv+4>: addiu gp,gp,9008 > 0x6ab508 > <_ZN3JSC8JITStubs10cti_op_modEPPv+8>: addu gp,gp,t9 > 0x6ab50c > <_ZN3JSC8JITStubs10cti_op_modEPPv+12>: addiu sp,sp,-80 > 0x6ab510 > <_ZN3JSC8JITStubs10cti_op_modEPPv+16>: sw ra,72(sp) > 0x6ab514 > <_ZN3JSC8JITStubs10cti_op_modEPPv+20>: sw s8,68(sp) > 0x6ab518 > <_ZN3JSC8JITStubs10cti_op_modEPPv+24>: sw s0,64(sp) > 0x6ab51c > <_ZN3JSC8JITStubs10cti_op_modEPPv+28>: move s8,sp > 0x6ab520 > <_ZN3JSC8JITStubs10cti_op_modEPPv+32>: sw gp,16(sp) > 0x6ab524 > <_ZN3JSC8JITStubs10cti_op_modEPPv+36>: sw a0,80(s8) > 0x6ab528 > <_ZN3JSC8JITStubs10cti_op_modEPPv+40>: lw v0,80(s8) > 0x6ab52c > <_ZN3JSC8JITStubs10cti_op_modEPPv+44>: addiu v0,v0,-4 > 0x6ab530 > <_ZN3JSC8JITStubs10cti_op_modEPPv+48>: addiu a0,s8,24 > 0x6ab534 > <_ZN3JSC8JITStubs10cti_op_modEPPv+52>: move a1,v0 > 0x6ab538 > <_ZN3JSC8JITStubs10cti_op_modEPPv+56>: lw t9,-19012(gp) > 0x6ab53c > <_ZN3JSC8JITStubs10cti_op_modEPPv+60>: jalr t9 > 0x6ab540 <_ZN3JSC8JITStubs10cti_op_modEPPv+64>: nop > 0x6ab544 > <_ZN3JSC8JITStubs10cti_op_modEPPv+68>: lw gp,16(s8) > 0x6ab548 > <_ZN3JSC8JITStubs10cti_op_modEPPv+72>: addiu v0,s8,32 > 0x6ab54c > <_ZN3JSC8JITStubs10cti_op_modEPPv+76>: lw v1,80(s8) > (gdb) stepi 14 > > Program received signal SIGSEGV, Segmentation fault. > 0x006ab538 in JSC::JITStubs::cti_op_mod (args=0x2aac9500) > at > /home/jdai/depot/mp/mediabase/head/libs/webkit-1.1.1/JavaScriptCore/jit/JITStubs.cpp:1685 > 1685 BEGIN_STUB_FUNCTION(); > > another question is that there is no matched va_end() and > it is a bug. > thanks a lot for help, > joe _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev