Branch: Tag:

2001-07-26

2001-07-26 21:04:14 by Marcus Comstedt <marcus@mc.pp.se>

PPC machinecode support (not functional yet)

Rev: src/code/ppc32.c:1.1
Rev: src/code/ppc32.h:1.1
Rev: src/interpret.c:1.234
Rev: src/pikecode.c:1.3
Rev: src/pikecode.h:1.4

5:   \*/   /**/   #include "global.h" - RCSID("$Id: interpret.c,v 1.233 2001/07/26 18:19:30 grubba Exp $"); + RCSID("$Id: interpret.c,v 1.234 2001/07/26 21:04:13 marcus Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
850: Inside #if defined(__GNUC__) and #if defined(__i386__)
   : "=m" (pc)    :    : "cc", "memory", "eax" ); - #else /* !__i386__ */ + #elif defined(__ppc__) || defined(_POWER) +  __asm__ __volatile__( " mtlr %0\n" +  " blr" +  : +  : "r" (pc) +  : "cc", "memory", "r0", "r3", "r4", "r5", +  "r6", "r7", "r8", "r9", "r10", "r11", "r12", +  "lr", "ctr"); + #else /* !__i386__ && !__ppc__ */    /* The test is needed to get the labels to work... */    if (pc) {    /* No extra setup needed!    */    return ((int (*)(void))pc)();    } - #endif /* __i386__ */ + #endif /* __i386__ || __ppc__ */    /* This code is never reached, but will    * prevent gcc from optimizing the labels below too much    */