Lines Matching refs:stack_ptr
120 static int altera_check_stack(int stack_ptr, int count, int *status) in altera_check_stack() argument
122 if (stack_ptr < count) { in altera_check_stack()
243 int stack_ptr = 0; in altera_execute() local
527 if (altera_check_stack(stack_ptr, 1, &status)) { in altera_execute()
528 stack[stack_ptr] = stack[stack_ptr - 1]; in altera_execute()
529 ++stack_ptr; in altera_execute()
533 if (altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
534 swap(stack[stack_ptr - 2], stack[stack_ptr - 1]); in altera_execute()
537 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
538 --stack_ptr; in altera_execute()
539 stack[stack_ptr - 1] += stack[stack_ptr]; in altera_execute()
543 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
544 --stack_ptr; in altera_execute()
545 stack[stack_ptr - 1] -= stack[stack_ptr]; in altera_execute()
549 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
550 --stack_ptr; in altera_execute()
551 stack[stack_ptr - 1] *= stack[stack_ptr]; in altera_execute()
555 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
556 --stack_ptr; in altera_execute()
557 stack[stack_ptr - 1] /= stack[stack_ptr]; in altera_execute()
561 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
562 --stack_ptr; in altera_execute()
563 stack[stack_ptr - 1] %= stack[stack_ptr]; in altera_execute()
567 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
568 --stack_ptr; in altera_execute()
569 stack[stack_ptr - 1] <<= stack[stack_ptr]; in altera_execute()
573 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
574 --stack_ptr; in altera_execute()
575 stack[stack_ptr - 1] >>= stack[stack_ptr]; in altera_execute()
579 if (altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
580 stack[stack_ptr - 1] ^= (-1L); in altera_execute()
584 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
585 --stack_ptr; in altera_execute()
586 stack[stack_ptr - 1] &= stack[stack_ptr]; in altera_execute()
590 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
591 --stack_ptr; in altera_execute()
592 stack[stack_ptr - 1] |= stack[stack_ptr]; in altera_execute()
596 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
597 --stack_ptr; in altera_execute()
598 stack[stack_ptr - 1] ^= stack[stack_ptr]; in altera_execute()
602 if (!altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
604 stack[stack_ptr - 1] = stack[stack_ptr - 1] ? 0L : 1L; in altera_execute()
607 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
609 --stack_ptr; in altera_execute()
610 stack[stack_ptr - 1] = in altera_execute()
611 (stack[stack_ptr - 1] > stack[stack_ptr]) ? in altera_execute()
616 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
618 --stack_ptr; in altera_execute()
619 stack[stack_ptr - 1] = in altera_execute()
620 (stack[stack_ptr - 1] < stack[stack_ptr]) ? in altera_execute()
625 if ((version > 0) && (stack_ptr == 0)) { in altera_execute()
656 if (altera_check_stack(stack_ptr, 1, &status)) { in altera_execute()
657 pc = stack[--stack_ptr] + code_sect; in altera_execute()
673 if (altera_check_stack(stack_ptr, 4, &status)) { in altera_execute()
674 s32 a = stack[--stack_ptr]; in altera_execute()
675 s32 b = stack[--stack_ptr]; in altera_execute()
676 long_tmp = stack[--stack_ptr]; in altera_execute()
677 count = stack[stack_ptr - 1]; in altera_execute()
684 stack[stack_ptr - 1] = in altera_execute()
695 if (!altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
698 "%ld", stack[--stack_ptr]); in altera_execute()
713 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
715 long_tmp = stack[--stack_ptr]; in altera_execute()
716 count = stack[--stack_ptr]; in altera_execute()
726 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
728 long_tmp = stack[--stack_ptr]; in altera_execute()
729 count = stack[stack_ptr - 1]; in altera_execute()
733 stack[stack_ptr - 1] = get_unaligned_le32(&charbuf[0]); in altera_execute()
741 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
743 long_tmp = stack[--stack_ptr]; in altera_execute()
744 count = stack[--stack_ptr]; in altera_execute()
754 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
756 long_tmp = stack[--stack_ptr]; in altera_execute()
757 count = stack[stack_ptr - 1]; in altera_execute()
761 stack[stack_ptr - 1] = get_unaligned_le32(&charbuf[0]); in altera_execute()
764 if (!altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
766 count = stack[--stack_ptr]; in altera_execute()
775 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
777 count = stack[--stack_ptr]; in altera_execute()
778 long_tmp = stack[--stack_ptr]; in altera_execute()
788 if (altera_check_stack(stack_ptr, 1, &status)) { in altera_execute()
789 count = stack[--stack_ptr]; in altera_execute()
800 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
802 count = stack[--stack_ptr]; in altera_execute()
803 long_tmp = stack[--stack_ptr]; in altera_execute()
809 if (altera_check_stack(stack_ptr, 1, &status)) { in altera_execute()
810 count = stack[--stack_ptr]; in altera_execute()
821 if (altera_check_stack(stack_ptr, 2, &status)) { in altera_execute()
822 count = stack[--stack_ptr]; in altera_execute()
823 long_tmp = stack[--stack_ptr]; in altera_execute()
834 if (altera_check_stack(stack_ptr, 1, &status)) { in altera_execute()
835 count = stack[--stack_ptr]; in altera_execute()
846 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
848 count = stack[--stack_ptr]; in altera_execute()
849 long_tmp = stack[--stack_ptr]; in altera_execute()
855 if (altera_check_stack(stack_ptr, 1, &status)) { in altera_execute()
858 ch = (char) stack[--stack_ptr]; in altera_execute()
872 if (altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
873 *exit_code = stack[--stack_ptr]; in altera_execute()
878 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
880 --stack_ptr; in altera_execute()
881 stack[stack_ptr - 1] = in altera_execute()
882 (stack[stack_ptr - 1] == stack[stack_ptr]) ? in altera_execute()
886 if (altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
887 --stack_ptr; in altera_execute()
891 if (!altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
893 if (stack[stack_ptr - 1] < 0) in altera_execute()
894 stack[stack_ptr - 1] = 0 - stack[stack_ptr - 1]; in altera_execute()
912 if (altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
913 swap(stack[stack_ptr - 2], stack[stack_ptr - 1]); in altera_execute()
917 if (altera_check_stack(stack_ptr, index, &status)) in altera_execute()
918 swap(stack[stack_ptr - index], stack[stack_ptr - 1]); in altera_execute()
921 if (altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
922 swap(stack[stack_ptr - 2], stack[stack_ptr - 1]); in altera_execute()
926 if (altera_check_stack(stack_ptr, index, &status)) in altera_execute()
927 swap(stack[stack_ptr - index], stack[stack_ptr - 1]); in altera_execute()
931 if (altera_check_stack(stack_ptr, index, &status)) { in altera_execute()
932 stack[stack_ptr] = stack[stack_ptr - index]; in altera_execute()
933 ++stack_ptr; in altera_execute()
938 if (altera_check_stack(stack_ptr, index, &status)) in altera_execute()
939 swap(stack[stack_ptr - index], stack[stack_ptr - 1]); in altera_execute()
942 if (altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
943 swap(stack[stack_ptr - 2], stack[stack_ptr - 1]); in altera_execute()
947 if (altera_check_stack(stack_ptr, index, &status)) { in altera_execute()
948 stack[stack_ptr] = stack[stack_ptr - index]; in altera_execute()
949 ++stack_ptr; in altera_execute()
954 if (altera_check_stack(stack_ptr, index, &status)) { in altera_execute()
955 stack[stack_ptr] = stack[stack_ptr - index]; in altera_execute()
956 ++stack_ptr; in altera_execute()
960 stack[stack_ptr++] = 0; in altera_execute()
963 stack[stack_ptr++] = (s32) args[0]; in altera_execute()
966 stack[stack_ptr++] = vars[args[0]]; in altera_execute()
974 stack[stack_ptr++] = pc; in altera_execute()
987 if (altera_check_stack(stack_ptr, 3, &status)) { in altera_execute()
988 s32 step = stack[stack_ptr - 1]; in altera_execute()
989 s32 end = stack[stack_ptr - 2]; in altera_execute()
990 s32 top = stack[stack_ptr - 3]; in altera_execute()
1001 stack_ptr -= 3; in altera_execute()
1057 if (altera_check_stack(stack_ptr, index, &status)) in altera_execute()
1058 swap(stack[stack_ptr - index], stack[stack_ptr - 1]); in altera_execute()
1066 if (altera_check_stack(stack_ptr, index, &status)) { in altera_execute()
1067 stack[stack_ptr] = stack[stack_ptr - index]; in altera_execute()
1068 ++stack_ptr; in altera_execute()
1077 if (altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
1078 vars[args[0]] = stack[--stack_ptr]; in altera_execute()
1088 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
1136 index = stack[--stack_ptr]; in altera_execute()
1139 longptr_tmp[index] = stack[--stack_ptr]; in altera_execute()
1151 if (!altera_check_stack(stack_ptr, 3, &status)) in altera_execute()
1218 long_count = stack[--stack_ptr]; in altera_execute()
1221 long_idx = stack[--stack_ptr]; in altera_execute()
1248 long_tmp = stack[--stack_ptr]; in altera_execute()
1273 if (altera_check_stack(stack_ptr, 1, &status)) { in altera_execute()
1274 if (stack[--stack_ptr] == 0) { in altera_execute()
1291 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
1293 long_idx = stack[--stack_ptr]; in altera_execute()
1294 long_count = stack[--stack_ptr]; in altera_execute()
1303 long_count = stack[--stack_ptr]; in altera_execute()
1360 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
1362 index = stack[--stack_ptr]; in altera_execute()
1363 count = stack[--stack_ptr]; in altera_execute()
1383 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
1385 index = stack[--stack_ptr]; in altera_execute()
1386 count = stack[--stack_ptr]; in altera_execute()
1406 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
1408 index = stack[--stack_ptr]; in altera_execute()
1409 count = stack[--stack_ptr]; in altera_execute()
1430 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
1432 index = stack[--stack_ptr]; in altera_execute()
1433 count = stack[--stack_ptr]; in altera_execute()
1453 if (altera_check_stack(stack_ptr, 1, &status)) { in altera_execute()
1455 long_tmp = stack[--stack_ptr]; in altera_execute()
1465 if (!altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
1468 index = stack[stack_ptr - 1]; in altera_execute()
1474 stack[stack_ptr - 1] = longptr_tmp[index]; in altera_execute()
1479 stack[stack_ptr - 1] = in altera_execute()
1492 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
1505 count = stack[--stack_ptr]; in altera_execute()
1508 index = stack[stack_ptr - 1]; in altera_execute()
1529 stack[stack_ptr - 1] = long_tmp; in altera_execute()
1538 if (!altera_check_stack(stack_ptr, 1, &status)) in altera_execute()
1541 long_tmp = stack[--stack_ptr]; in altera_execute()
1599 if (!altera_check_stack(stack_ptr, 3, &status)) in altera_execute()
1607 variable_id = stack[--stack_ptr]; in altera_execute()
1608 long_idx = stack[--stack_ptr];/* right indx */ in altera_execute()
1609 long_idx2 = stack[--stack_ptr];/* left indx */ in altera_execute()
1674 if (!altera_check_stack(stack_ptr, 3, &status)) in altera_execute()
1677 copy_count = stack[--stack_ptr]; in altera_execute()
1678 copy_index = stack[--stack_ptr]; in altera_execute()
1679 copy_index2 = stack[--stack_ptr]; in altera_execute()
1689 destleft = stack[--stack_ptr]; in altera_execute()
1831 if (!altera_check_stack(stack_ptr, 3, &status)) in altera_execute()
1834 capture_index = stack[--stack_ptr]; in altera_execute()
1835 scan_index = stack[--stack_ptr]; in altera_execute()
1845 scan_right = stack[--stack_ptr]; in altera_execute()
1846 scan_left = stack[--stack_ptr]; in altera_execute()
1852 long_count = stack[--stack_ptr]; in altera_execute()
1950 if (!altera_check_stack(stack_ptr, 2, &status)) in altera_execute()
1952 long_tmp = stack[--stack_ptr]; in altera_execute()
1958 long_tmp = stack[--stack_ptr]; in altera_execute()
1970 --stack_ptr; /* throw away MAX cycles */ in altera_execute()
1971 --stack_ptr; /* throw away MAX microseconds */ in altera_execute()
1993 if (!altera_check_stack(stack_ptr, 4, &status)) in altera_execute()
1996 index1 = stack[--stack_ptr]; in altera_execute()
1997 index2 = stack[--stack_ptr]; in altera_execute()
1998 mask_index = stack[--stack_ptr]; in altera_execute()
1999 long_count = stack[--stack_ptr]; in altera_execute()
2010 s32 mask_right = stack[--stack_ptr]; in altera_execute()
2011 s32 mask_left = stack[--stack_ptr]; in altera_execute()
2053 stack[stack_ptr++] = long_tmp; in altera_execute()
2066 if ((stack_ptr < 0) || (stack_ptr >= ALTERA_STACK_SIZE)) in altera_execute()