Changes: Stefan Ring
Christian Thalinger
- $Id: reg.inc 1735 2004-12-07 14:33:27Z twisti $
+ $Id: reg.inc 1753 2004-12-13 08:40:16Z twisti $
*/
/* allocate stack space for passing arguments to called methods */
-#ifndef SPECIALMEMUSE
-#if defined(__X86_64__)
- /*
- * XXX: we have a problem here, but allocating a little more stack space
- * is better than having a bug
- */
- /* if (arguments_num > (intreg_argnum + fltreg_argnum)) */
- /* ifmemuse = arguments_num - (intreg_argnum + fltreg_argnum); */
- if (rd->arguments_num > rd->fltreg_argnum)
- rd->ifmemuse = rd->arguments_num - rd->fltreg_argnum;
-#else
- if (rd->arguments_num > rd->intreg_argnum)
- rd->ifmemuse = rd->arguments_num - rd->intreg_argnum;
-#endif
- else
+#if !defined(SPECIALMEMUSE)
+ /* For this to work properly the integer argument register count must be */
+ /* less or equal the float argument register count (e.g. x86_64). */
+ /* (arch.h: INT_ARG_CNT <= FLT_ARG_CNT) */
+ if (rd->arguments_num > INT_ARG_CNT) {
+ rd->ifmemuse = rd->arguments_num - INT_ARG_CNT;
+
+ } else {
rd->ifmemuse = 0;
+ }
#endif
rd->iftmpintregcnt = rd->tmpintregcnt;
Authors: Christian Thalinger
- $Id: arch.h 1735 2004-12-07 14:33:27Z twisti $
+ $Id: arch.h 1753 2004-12-13 08:40:16Z twisti $
*/
#define INT_ARG_CNT 6 /* number of int argument registers */
#define INT_SAV_CNT 5 /* number of int callee saved registers */
-#define FLT_ARG_CNT 4 /* number of flt argument registers */
+#define FLT_ARG_CNT 8 /* number of flt argument registers */
#define FLT_SAV_CNT 0 /* number of flt callee saved registers */
#define TRACE_ARGS_NUM 6