MIPS N32 firefox in acid3 test

My quest for MIPS N32 firefox could finally come to an end, since I just got it scores the same as X86 firefox.

Remember I said it would encounter bus error on a few websites in my last related post. But I didn't plan to look into this issue before dealing with cache aliasing problem.

However, since Rayson Ho helped me to locate the exact cause of this issue, I decided to finish it first.

The problem is caused by unaligned access of ldc1/sdc1 instruction. These two instructions' operand must be 8 bytes aligned. But when crashing, the operand is only 4 bytes aligned.

After some discussion and experimenting, I found a workaround for sina.com.cn crashing problem. Yeah, a padding pointer sounds scary and fragile, but it did work. Before posting any comment to this, please make sure you have read all the emails in that thread.

Then Fai Wong reported to me that it still crash in acid3 test. So I took another look. This time the problem happened in a different location, and it is harder to solve. Because the object in question sometimes is 8 bytes aligned, but sometimes it is only 4 bytes aligned, which does not make any sense, since the object contains double variable. So, either way, the double variable just can't get aligned in both case. I thought of kernel exception handler. I did come up with a patch and it worked! But since Ralf refused to accept it, I had to move on. And I found the reason is because of the way the memory is allocated - placement new. Thanks to LI Daobing for telling me this. And this is what the final patch looks like.

Comments

Nirbheek said…
Okay, now get firefox 3.5_beta4 from the overlay to get the same score as on x86 -- 93 :p
r0bertz said…
One of my friends tried it, but not succesful. I will try later after dealing with siliconmotion driver. Now on Loongson Yeelong notebook, the lastest xorg-server can only use fbdev driver.

Popular posts from this blog

The diff between the original SEC complaint against Ripple and the amended one

Send $SGB (Songbird) to another wallet using a script

Rippled thread cpu usage