Allow up to 6 arguments only on MIPS.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
This commit is contained in:
br 2016-09-27 13:46:00 +00:00
parent b0a0f2de47
commit faeb5d0d38

View File

@ -55,6 +55,8 @@ run(int n, ...)
for (i = 0; i < 5; i++) {
#elif defined(__FreeBSD__) && defined(__aarch64__)
for (i = 0; i < 7; i++) {
#elif defined(__FreeBSD__) && defined(__mips__)
for (i = 0; i < 5; i++) {
#else
for (i = 0; i < 9; i++) {
#endif
@ -122,6 +124,10 @@ ATF_TC_BODY(setcontext_link, tc)
/* FreeBSD/arm64 only permits up to 8 arguments. */
makecontext(&uc[i], (void *)run, 8, i,
0, 1, 2, 3, 4, 5, 6);
#elif defined(__FreeBSD__) && defined(__mips__)
/* FreeBSD/mips only permits up to 6 arguments. */
makecontext(&uc[i], (void *)run, 6, i,
0, 1, 2, 3, 4);
#else
makecontext(&uc[i], (void *)run, 10, i,
0, 1, 2, 3, 4, 5, 6, 7, 8);