[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Missing clobbered register in gemlib



Le 18/12/2009 20:23, Helmut Karlowski wrote:
Now the pixel-detection also works, but not in 16-bit video - I get the
same EF40 as in the previous version.

I'm quite lost between different issues, versions and testcases.
Can this issue be tested from outside XaAES ?
A small GEM program, for example ?

Also v_clswk still bombs.

pid 19 (AESSYS): Setexc 256, E0EDE6 -> E1DA36
pid 19 (AESSYS): signal #10 raised [syscall_pc 0x657DA, exception_pc
0xE00F24]

As v_clswk() taks only one parameter, it is unlikely to be related to the clobbered registers problems, but who knows...
Again, a very simple testcase would help.

Is it really sure that there are no more clobbered regs in gemlib?

No. It is better, but maybe not perfect.

GEM/assembler specialists should have a look at the following code from the GemLib:

In gemlib/gem_aesP.h:
static inline void
_aes_trap (AESPB * aespb)
{
	__asm__ volatile (
		"move.l	%0,d1\n\t"	/* &aespb */
		"move.w	#200,d0\n\t"
		"trap	#2"
		:
		: "a"(aespb)
		: "d0","d1","a0","memory" /* <--- Clobber List here */
	);
}

The Clobber List assumes that a trap #2 for AES does not change the value of a2 and other registers. Is this true ? One could add other registers to the clobber list (at least a1, maybe d2 and a2) to see what happens. This could prevent some optimization to occur (very, very little), but in no case it could introduce bugs.

Similar stuff in gemlib/gem_vdiP.h:
_vdi_trap_esc
_vdi_trap_00

--
Vincent Rivière