pike.git / src / code / sparc.c

version» Context lines:

pike.git/src/code/sparc.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: sparc.c,v 1.21 2002/11/07 16:58:49 grubba Exp $ + || $Id: sparc.c,v 1.22 2002/11/07 17:19:51 grubba Exp $   */      /*    * Machine code generator for sparc.    *    * Henrik Grubbström 20010720    */      #include "operators.h"   
pike.git/src/code/sparc.c:159:   #define SPARC_REG_SP SPARC_REG_O6   #define SPARC_REG_PC SPARC_REG_O7      /*    * Code generator state.    */   unsigned INT32 sparc_codegen_state = 0;   int sparc_last_pc = 0;      #define LOAD_PIKE_FP() do { \ -  if (1 || !(sparc_codegen_state & SPARC_CODEGEN_FP_IS_SET)) { \ +  if (!(sparc_codegen_state & SPARC_CODEGEN_FP_IS_SET)) { \    SET_REG(SPARC_REG_PIKE_FP, \    ((INT32)(&Pike_interpreter.frame_pointer))); \    /* lduw [ %i0 ], %i0 */ \    add_to_program(0xc0000000|(SPARC_REG_PIKE_FP<<25)| \    (SPARC_REG_PIKE_FP<<14)); \    sparc_codegen_state |= SPARC_CODEGEN_FP_IS_SET; \    } \    } while(0)    -  + #define UNLOAD_PIKE_FP() (sparc_codegen_state &= ~SPARC_CODEGEN_FP_IS_SET) +    /*    * Allocate a stack frame.    *    * Note that the prologue size must be constant.    */   void sparc_ins_entry(void)   {    /* save %sp, -112, %sp */    add_to_program(0x81e02000|(SPARC_REG_SP<<25)|    (SPARC_REG_SP<<14)|((-112)&0x1fff));
pike.git/src/code/sparc.c:258:       /* stw %o7, [ %pike_fp, %offsetof(pike_frame, pc) ] */    add_to_program(0xc0202000|(SPARC_REG_O7<<25)|(SPARC_REG_PIKE_FP<<14)|    OFFSETOF(pike_frame, pc));       delay_ok = 1;    }    }       ADD_CALL(addr, delay_ok); +  +  /* This is probably only needed for some instructions, but... */ +  UNLOAD_PIKE_FP();   }      void ins_f_byte(unsigned int opcode)   {    low_ins_f_byte(opcode, 0);   }      void ins_f_byte_with_arg(unsigned int a,unsigned INT32 b)   {    SET_REG(SPARC_REG_O0, b);