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.35 2003/04/18 15:41:12 mast Exp $ + || $Id: sparc.c,v 1.36 2003/08/15 16:51:20 grubba Exp $   */      /*    * Machine code generator for sparc.    *    * Henrik Grubbström 20010720    */      #include "global.h"   #include "svalue.h"
pike.git/src/code/sparc.c:493:    /* restore */    SPARC_RESTORE(SPARC_REG_G0, SPARC_REG_G0, SPARC_REG_G0, 0);   #endif /* 0 */    SPARC_UNLOAD_CACHED();   }      /*    *    */    - static void low_ins_call(void *addr, int delay_ok) + static void low_ins_call(void *addr, int delay_ok, int i_flags)   {    SPARC_FLUSH_UNSTORED();       {    static int last_prog_id=-1;    static size_t last_num_linenumbers=(size_t)~0;    if(last_prog_id != Pike_compiler->new_program->id ||    last_num_linenumbers != Pike_compiler->new_program->num_linenumbers)    {    last_prog_id=Pike_compiler->new_program->id;
pike.git/src/code/sparc.c:523:    /* 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);    + #if 1 +  /* Invalidate cached values if needed. */ +  if (i_flags & (I_UPDATE_SP|I_UPDATE_M_SP|I_UPDATE_FP)) { +  if (i_flags & I_UPDATE_SP) { +  sparc_codegen_state &= ~SPARC_CODEGEN_SP_IS_SET; +  } +  if (i_flags & I_UPDATE_M_SP) { +  sparc_codegen_state &= ~SPARC_CODEGEN_MARK_SP_IS_SET; +  } +  if (i_flags & I_UPDATE_FP) { +  sparc_codegen_state &= ~SPARC_CODEGEN_FP_IS_SET; +  } +  } + #else /* !1 */    /* This is probably only needed for some instructions, but... */    SPARC_UNLOAD_CACHED(); -  + #endif /* 1 */   }      static void low_ins_f_byte(unsigned int b, int delay_ok)   {    void *addr;      #ifdef PIKE_DEBUG    if(store_linenumbers && b<F_MAX_OPCODE)    ADD_COMPILED(b);   #endif /* PIKE_DEBUG */
pike.git/src/code/sparc.c:610:       case F_ADD - F_OFFSET:    SET_REG(SPARC_REG_O0, 2);    delay_ok = 1;    addr = (void *)f_add;    break;       /* F_ZERO_TYPE? */    }    -  low_ins_call(addr, delay_ok); +  low_ins_call(addr, delay_ok, instrs[b].flags);   }      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)   {    switch(a) {