On 25 May 2012, at 15:48, Fuxin Zhang wrote:

> Now at least we have a very good start. I've a quick look over current
> mips code, it seems not strong enough. For example, the inverse_cond seems
> wrong, the setting of first_int_imreg/mavarregs/maxfpuvarregs etc. is hard
> to understand...

first_int_imreg looks correct. It has to be set to the number of integer 
registers, and since MIPS presumably has 32 integer registers, $20 (= 32 in 
hex) is ok.

maxvarregs/maxfpuvarregs is from the old register variables code and is no 
longer used. That code still has to be largely removed, and possibly partially 
updated and reintegrated in the current compiler.

Directly starting with compiling a native compiler binary and debugging it, is 
however probably not the easiest approach. It's better to start with 
cross-compiling tests and debugging those if they fail. To execute all tests, 
after you've done the "make cycle CPU_TARGET=mipsel", go into fpc/tests, and 
execute a command like this (make sure to first create the TEST_REMOTEPATH 
directory on the remote system):

make TEST_FPC=/full/path/to/ppcrossmipsel TEST_SSH=login@mips-box 
TEST_REMOTEPATH=/tmp/tests OPT="-O2 -ap" TEST_OPT="-O2 -ap" QUICKTEST=1 clean 
all digest

Add any additional parameters you need for cross-compilation (-FD, -XR, ...) to 
TEST_OPT. The QUICKTEST=1 means that tests that depend on units under 
fpc/packages won't be checked (there's not that many of them anyway).

At the end, the list of failing tests will be in output/mipself-linux/faillist, 
and in the longlog file in that same directory you'll find the complete 
compilation/execution logs of the failed tests. When starting to fix things, 
it's best to first focus on tests from test/cg and test/units/system (apart 
from the tres* tests, which are for Windows-style resource support), and then 
everything else under "test".


Jonas_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to