< December 2005 >
SuMoTuWeThFrSa
     1 2 3
4 5 6 7 8 910
11121314151617
18192021222324
25262728293031
Thu, 08 Dec 2005:

The FPU unroller (+90, -85) is checked into CVS. Had some last minute issues with 64 bit memory address emitting while loading constants. That has been worked around by using the following.

#define	md_load_const_float_32(inst,reg,mem)	\
			do { \
				amd64_push_reg((inst), MD_REG_PC); \
				amd64_mov_reg_imm_size((inst), MD_REG_PC, (mem), 8); \
				amd64_fld_membase((inst), (MD_REG_PC), (0), 0); \
				amd64_pop_reg((inst), MD_REG_PC);\
			}while(0)

Technically speaking the following code should've just worked.

#define	md_load_const_float_32(inst,reg,mem)	\
	amd64_fld((inst), (reg), (mem))

But the amd64-codegen.h does not actually accept 64 bit pointers in there. Which is really strange, because if it doesn't, I don't understand how Mono has a working AMD64 jit (same amd64-codegen.h in both places). The direct amd64_fld would be a lot faster than an indirect membase read. There are more small things left to do in there, like SSE/2/3 opcodes for speed. For example there is a convenient cvttsd2si to convert floats and doubles to integers without too much mucking around. Also I plan to implement trig functions directly using the FPU sometime in the future. Here's an old patch of how it could be done for x86/amd64.

The float benchmark has gone up 3x approximately. From a November snapshot of the engine giving 540 on floats, it has gone up into giving 1671. I think that a further 50-60 should come in as soon as I go SSE on this codebase. And for the first time ever, my entire pnetmark has gone beyond 10,000 - 10257.

And now I have no excuse for not hacking libjit ;)

--
Eat flaming death, you minicomputer mongrels

posted at: 12:48 | path: /dotgnu | permalink | Tags: