Allow up to 6 arguments only on MIPS.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
This commit is contained in:
Ruslan Bukin 2016-09-27 13:46:00 +00:00
parent 5925fff002
commit 615216628b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306367

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);