<div dir="ltr"><div><div><div><div><div><div><div><div>Here's a disassembly of the pattern /AT\W/i.<br><br><a href="http://paste.debian.net/98876/">http://paste.debian.net/98876/</a><br><br></div>High level overview: a loop starts at 0xb390a038. r0 is a pointer to the string, and r1 is the current search index plus 3.<br>
</div>- it does a halfword load, converts it to lowercase, and checks it against "at"<br></div>- if it's not equal, it jumps to 0xb390a08c to increment r1 and repeats<br><br></div>The code that matches "at" comes from here:<br>
<br><a href="http://sources.debian.net/src/webkitgtk/2.4.1-2/Source/JavaScriptCore/yarr/YarrJIT.cpp#L841">http://sources.debian.net/src/webkitgtk/2.4.1-2/Source/JavaScriptCore/yarr/YarrJIT.cpp#L841</a><br><br></div>which either comes from<br>
<br><a href="http://sources.debian.net/src/webkitgtk/2.4.1-2/Source/JavaScriptCore/assembler/MacroAssemblerARM.h#L412">http://sources.debian.net/src/webkitgtk/2.4.1-2/Source/JavaScriptCore/assembler/MacroAssemblerARM.h#L412</a><br>
<br></div>or<br><br><a href="http://sources.debian.net/src/webkitgtk/2.4.1-2/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h#L616">http://sources.debian.net/src/webkitgtk/2.4.1-2/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h#L616</a><br>
<br></div><div>It's just a plain old load16. Is unaligned transfer just a requirement of the armel port? How do armv5t targets usually support it?<br></div><div><br></div>I learned of a kernel configuration option, CONFIG_ALIGNMENT_TRAP, which is enabled on the kernel I'm using. The documentation suggests that it pertains to 32-bit transfers though.<br>
<br><br></div></div>