1 #include "qt/copyright.h"
4 #ifdef QT_VARGS_DEFAULT
6 /* If the stack grows down, `vargs' is a pointer to the lowest
7 address in the block of arguments. If the stack grows up, it is a
8 pointer to the highest address in the block. */
11 qt_vargs (qt_t
*sp
, int nbytes
, void *vargs
,
12 void *pt
, qt_startup_t
*startup
,
13 qt_vuserf_t
*vuserf
, qt_cleanup_t
*cleanup
)
17 sp
= QT_VARGS_MD0 (sp
, nbytes
);
19 for (i
=nbytes
/sizeof(qt_word_t
); i
>0; --i
) {
20 QT_SPUT (QT_VARGS_ADJUST(sp
), i
, ((qt_word_t
*)vargs
)[-i
]);
23 for (i
=nbytes
/sizeof(qt_word_t
); i
>0; --i
) {
24 QT_SPUT (QT_VARGS_ADJUST(sp
), i
-1, ((qt_word_t
*)vargs
)[i
-1]);
28 QT_VARGS_MD1 (QT_VADJ(sp
));
29 QT_SPUT (QT_VADJ(sp
), QT_VARGT_INDEX
, pt
);
30 QT_SPUT (QT_VADJ(sp
), QT_VSTARTUP_INDEX
, startup
);
31 QT_SPUT (QT_VADJ(sp
), QT_VUSERF_INDEX
, vuserf
);
32 QT_SPUT (QT_VADJ(sp
), QT_VCLEANUP_INDEX
, cleanup
);
33 return ((qt_t
*)QT_VADJ(sp
));
35 #endif /* def QT_VARGS_DEFAULT */
45 extern void abort(void);