RESOLVED FIXED 79104
Unaligned userspace access for SH4 platforms
https://bugs.webkit.org/show_bug.cgi?id=79104
Summary Unaligned userspace access for SH4 platforms
thouraya
Reported 2012-02-21 07:03:37 PST
Unaligned access memory when running sunspider
Attachments
fix unaligend access memory issue in YARR JIT (5.51 KB, patch)
2012-02-21 07:09 PST, thouraya
fpizlo: review-
patch (18.20 KB, patch)
2012-03-16 07:58 PDT, thouraya
no flags
thouraya
Comment 1 2012-02-21 07:09:10 PST
Created attachment 127968 [details] fix unaligend access memory issue in YARR JIT
thouraya
Comment 2 2012-03-06 23:11:51 PST
Hi, Any update on the patch? Regards, Thouraya.
Filip Pizlo
Comment 3 2012-03-06 23:22:03 PST
Comment on attachment 127968 [details] fix unaligend access memory issue in YARR JIT View in context: https://bugs.webkit.org/attachment.cgi?id=127968&action=review > Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:978 > + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 68, sizeof(uint32_t)); > + move(scr, SH4Registers::r0); > + m_assembler.andlImm8r(0x3, SH4Registers::r0); > + m_assembler.cmpEqImmR0(0x0, SH4Registers::r0); > + m_assembler.branch(BF_OPCODE, 2 + extraInst); > + > + if (dest != SH4Registers::r0) > + move(scr1, SH4Registers::r0); > + > + load32(scr, dest); > + m_assembler.branch(BRA_OPCODE, 25 + extraInst); > + m_assembler.nop(); > + > + m_assembler.andlImm8r(0x1, SH4Registers::r0); > + m_assembler.cmpEqImmR0(0x0, SH4Registers::r0); > + > + if (dest != SH4Registers::r0) > + move(scr1, SH4Registers::r0); > + > + m_assembler.branch(BF_OPCODE, 8); Why aren't you just using the macro assembler API instead of having to manually compute branch offsets?
thouraya
Comment 4 2012-03-16 07:58:47 PDT
Created attachment 132284 [details] patch Hi, attached the patch to fix the unaligned user space access and some changes to use the macro assembler API instead of computing manually branch offsets. Regards, Thouraya.
thouraya
Comment 5 2012-03-20 09:24:53 PDT
Hi, Please, Could you have a look on the patch ? Thanks a lot. thouraya. (In reply to comment #3) > (From update of attachment 127968 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=127968&action=review > > > Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:978 > > + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 68, sizeof(uint32_t)); > > + move(scr, SH4Registers::r0); > > + m_assembler.andlImm8r(0x3, SH4Registers::r0); > > + m_assembler.cmpEqImmR0(0x0, SH4Registers::r0); > > + m_assembler.branch(BF_OPCODE, 2 + extraInst); > > + > > + if (dest != SH4Registers::r0) > > + move(scr1, SH4Registers::r0); > > + > > + load32(scr, dest); > > + m_assembler.branch(BRA_OPCODE, 25 + extraInst); > > + m_assembler.nop(); > > + > > + m_assembler.andlImm8r(0x1, SH4Registers::r0); > > + m_assembler.cmpEqImmR0(0x0, SH4Registers::r0); > > + > > + if (dest != SH4Registers::r0) > > + move(scr1, SH4Registers::r0); > > + > > + m_assembler.branch(BF_OPCODE, 8); > > Why aren't you just using the macro assembler API instead of having to manually compute branch offsets?
thouraya
Comment 6 2012-03-26 00:58:43 PDT
Hi, Any updates? Regards.
WebKit Review Bot
Comment 7 2012-03-26 19:04:01 PDT
Comment on attachment 132284 [details] patch Clearing flags on attachment: 132284 Committed r112192: <http://trac.webkit.org/changeset/112192>
WebKit Review Bot
Comment 8 2012-03-26 19:04:06 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.