|
|
|
|
|
|
Make "1987.elf" work.
Posted on 2005-09-14 00:00:00 |
|
Implemented C.EQ.S, BC1F, BGTZ and XOR instructions.
I needed to add the FCSR register to the MIPS context in order to complete C.EQ.S and BC1F. I also added its value in the the FPU register viewer. Maybe something should be done to optimize the value comparaison code... Maybe the steps of setting ebx and edx to 0 and 1 could be skipped somehow... But I don't think the CMOVcc instruction supports immediate operands. BGTZ requires 5 comparaisons to do its job, and most comparaison instructions (BNE, BEQ, etc.) require 4 in order to provide an accurate result. This is because the x86 only supports compares on 32-bits integers and some additional stuff needs to be done in order to give a result that works on 128-bits integers. Maybe taking the high order 64-bits of a register in consideration isn't important... But like I said previously, I can't really be sure for now. Now, it's getting to a point where it stays stuck in a loop. It's certainly caused by a bug in one of the instructions and I'll investigate this tomorrow. |