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.26 2002/11/08 17:29:59 grubba Exp $ + || $Id: sparc.c,v 1.27 2002/11/08 17:37:00 grubba Exp $   */      /*    * Machine code generator for sparc.    *    * Henrik Grubbström 20010720    */      #include "global.h"   #include "svalue.h"
pike.git/src/code/sparc.c:249:    OFFSETOF(Pike_interpreter, stack_pointer), 1); \    sparc_codegen_state &= ~SPARC_CODEGEN_SP_NEEDS_STORE; \    } \    } while(0)      #define SPARC_UNLOAD_CACHED() \    (sparc_codegen_state &= ~(SPARC_CODEGEN_FP_IS_SET| \    SPARC_CODEGEN_SP_IS_SET| \    SPARC_CODEGEN_MARK_SP_IS_SET))    + void sparc_flush_codegen_state(void) + { +  SPARC_FLUSH_UNSTORED(); +  sparc_codegen_state = 0; + } +  + #define ADJUST_PIKE_PC(NEW_PC) do { \ +  sparc_last_pc = NEW_PC; \ +  sparc_codegen_state |= SPARC_CODEGEN_PC_IS_SET; \ +  } while(0) +    /*    * 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:467:   #endif       addr = instrs[b].address;      #ifdef PIKE_DEBUG    if (d_flag < 3)   #endif    /* This is not very pretty */    switch(b)    { - #if 0 +     case F_MARK2 - F_OFFSET:    sparc_mark(0);    /* FALL_THROUGH */    case F_SYNCH_MARK - F_OFFSET:    case F_MARK - F_OFFSET:    sparc_mark(0);    return;    case F_POP_MARK - F_OFFSET:    sparc_incr_mark_sp(-1);    return;
pike.git/src/code/sparc.c:501: Inside #if 0
   case F_MARK_AND_CONST1 - F_OFFSET:    sparc_mark(0);    sparc_push_int(1, 0);    return;    case F_CONST_1 - F_OFFSET:    sparc_push_int(-1, 0);    return;    case F_BIGNUM - F_OFFSET:    sparc_push_int(0x7fffffff, 0);    return; - #endif /* 0 */ +       #define F_ALIAS(F_FUN, O_FUN) \    case F_FUN - F_OFFSET: \    addr = (void *)O_FUN; \    break       case F_MAKE_ITERATOR - F_OFFSET:    {    extern void f_Iterator(INT32);    SET_REG(SPARC_REG_O0, 1);
pike.git/src/code/sparc.c:552:    low_ins_call(addr, delay_ok);   }      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)   { - #if 0 +     switch(a) {    case F_NUMBER:    sparc_push_int(b, 0);    return;    case F_NEG_NUMBER:    sparc_push_int(-b, 0);    return;    case F_LFUN:    sparc_push_lfun(b);    return;    case F_MARK_X:    sparc_mark(-b);    return;    } - #endif /* 0 */ +     SET_REG(SPARC_REG_O0, b);    low_ins_f_byte(a, 1);    return;   }      void ins_f_byte_with_2_args(unsigned int a,    unsigned INT32 c,    unsigned INT32 b)   {    SET_REG(SPARC_REG_O0, c);