[Webkit-unassigned] [Bug 44329] SH4 JIT SUPPORT

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 13 10:40:23 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=44329





--- Comment #44 from Eduardo Felipe Castegnaro <edufelipe at e3c.com.br>  2010-12-13 10:40:22 PST ---
(In reply to comment #43)
> Hello,
> 
> I have another patch for flushConstantPool function.
> 
> In SH4, the size of the instruction is 16 bits.
> So, when we need to jump around the constantpool we shoold emit 2 instructions BRA and NOP (otherwise we will get a misaligned access address)
> 
> 
>         if (useBarrier) {
>             putIntegral(AssemblerType::placeConstantPoolBarrier(m_numConsts * sizeof(uint32_t) + alignPool));
> #if CPU(SH4)
>             // otherwise we will get a misaligned address
>             AssemblerBuffer::putShort(AssemblerType::padForAlign16);
> #endif
>         }
> 
> Regards.

With this fix I've managed to run SunSpider and get a great performance! Better than the version available on STLinux. Thanks so much for your help in getting this running.

Best regards,

Eduardo.

> (In reply to comment #42)
> > (In reply to comment #39)
> > > Created an attachment (id=76199)
 --> (https://bugs.webkit.org/attachment.cgi?id=76199&action=review) [details] [details] [details]
> > > JIT support JSValue32-64
> > > 
> > > Hi,
> > > 
> > > Attached new patche to add JIT support for revision 71224 for webkit version 1.3.5 supporting JSVALUE32_64.
> > 
> > Were you able to successfully run this patch by just downloading the SVN revision 71224 and applying the constant pool patch?
> > 
> > Your patch applies cleanly, but builds with two warnings (signed-unsigned comparison and no return in function returning value) and I get segmentation fault on the JavaScript shell application (jsc) when it finds something that can be JITed (like loops with mathematical expressions inside them).
> > 
> > Debugging let me to believe that this is happening due to JIT code putting code not at 32 bit boundaries.
> > 
> > Here is what I'm getting:
> > 
> > bash-3.00# jsc
> > > a = 5;
> > 5
> > > a
> > 5
> > > for (count=1; count<=100; count=count+1) { a = a + count; }
> > Unaligned userspace access in "jsc" pid=851 pc=0x2b48ae24 ins=0x6332
> > Sending SIGBUS to "jsc" due to unaligned access (PC 2b48ae24 PR 2968f85a)
> > 
> > The kernel on STLinux has this comment on the function that handles unaligned accesses:
> > 
> > fixup:
> >         /* unaligned PC is not something we can fix */
> >         if (regs->pc & 1) {
> >             si_code = BUS_ADRALN;
> >             goto uspace_segv;
> >         }
> > 
> > [...]
> > 
> > uspace_segv:
> >         printk(KERN_NOTICE "Sending SIGBUS to \"%s\" due to unaligned "
> >                "access (PC %lx PR %lx)\n", current->comm, regs->pc,
> >                regs->pr);
> > 
> > 
> > Has anyone seen a different behavior with this patch?
> > 
> > Best regards,
> > 
> > Eduardo.
> > 
> > > Regards,
> > > Thouraya.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list