Hi,

On Sat, 9 Jun 2012, g...@sdf.org wrote:

   d = malloc (s);

If this returns a pointer with upper 32 bits set (which depends on malloc size, fragmentation and moon phase) ...

   d[0] = 10.0;
   i = d[0] > f ();

... those are lost in the caller-save/restore code for the address of d[0] generated because of the call to f. This is because the reload was done in VT_INT mode, not VT_PTR as it should have been.

I fixed it on the mob branch with a hopefully more reliable testcase using alloca (which on x86-64 will always return a pointer with high 32 bit set because the stack will be set up that way).

Thomas: as you were last fiddling with arm, you might want to check if the test works on it. The other alloca testcase is #ifdef'ed on i386 and x86_64, but that only makes sense if alloca really isn't supported on arm, which I can't believe. If that really is the case callsave_test() needs to be conditional too.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to