/* Reference: Amiga Guru Book Pages: 538ff,565,573
and XOper.asm */
+ myseglist = proc->pr_SegList;
if (proc->pr_Task.tc_Node.ln_Type==NT_PROCESS) {
- if (proc->pr_CLI == NULL) {
- myseglist = proc->pr_SegList;
- } else {
+ if (proc->pr_CLI != NULL) {
/* ProcLoaded 'Loaded as a command: '*/
cli = BADDR(proc->pr_CLI);
myseglist = cli->cli_Module;
/* client application to use -lm linker option. */
unsigned short old_fcw;
+# if defined(CPPCHECK)
+ GC_noop1((word)&old_fcw);
+# endif
__asm__ __volatile__ ("fstcw %0" : "=m" (*&old_fcw));
# else
int except_mask = fegetexcept();
/* We're not sure whether he would like */
/* to be acknowledged for it or not. */
jmp_buf regs;
- register word * i = (word *) regs;
- register ptr_t lim = (ptr_t)(regs) + (sizeof regs);
+ register word * i = (word *) ®s;
+ register ptr_t lim = (ptr_t)(®s) + (sizeof regs);
/* Setjmp doesn't always clear all of the buffer. */
/* That tends to preserve garbage. Clear it. */
# else
result = (ptr_t)((word)GC_approx_sp() & ~STACKBOTTOM_ALIGNMENT_M1);
# endif
-# endif /* HEURISTIC1 */
-# ifdef LINUX_STACKBOTTOM
+# elif defined(LINUX_STACKBOTTOM)
result = GC_linux_main_stack_base();
-# endif
-# ifdef FREEBSD_STACKBOTTOM
+# elif defined(FREEBSD_STACKBOTTOM)
result = GC_freebsd_main_stack_base();
-# endif
-# ifdef HEURISTIC2
+# elif defined(HEURISTIC2)
{
ptr_t sp = GC_approx_sp();
# ifdef STACK_GROWS_DOWN
# endif
# endif
}
-# endif /* HEURISTIC2 */
-# ifdef STACK_GROWS_DOWN
+# elif defined(CPPCHECK)
+ result = NULL;
+# else
+# error None of HEURISTIC* and *STACKBOTTOM defined!
+# endif
+# if defined(STACK_GROWS_DOWN) && !defined(CPPCHECK)
if (result == 0)
result = (ptr_t)(signed_word)(-sizeof(ptr_t));
# endif