pike.git / src / code / sparc.c

version» Context lines:

pike.git/src/code/sparc.c:1:   /* -  * $Id: sparc.c,v 1.7 2001/07/24 12:19:31 grubba Exp $ +  * $Id: sparc.c,v 1.8 2001/07/24 12:23:14 grubba Exp $    *    * Machine code generator for sparc.    *    * Henrik Grubbström 20010720    */      #include "operators.h"      #define ADD_CALL(X, DELAY_OK) do { \    INT32 delta_; \
pike.git/src/code/sparc.c:23:    } \    /* call X */ \    delta_ = ((PIKE_OPCODE_T *)(X)) - (p_->program + off_); \    p_->program[off_] = 0x40000000 | (delta_ & 0x3fffffff); \    add_to_relocations(off_); \    add_to_program(delay_); \    } while(0)      static void low_ins_f_byte(unsigned int b, int delay_ok)   { -  void *addr = instrs[b].address; +  void *addr;      #ifdef PIKE_DEBUG    if(store_linenumbers && b<F_MAX_OPCODE)    ADD_COMPILED(b);   #endif /* PIKE_DEBUG */       b-=F_OFFSET;   #ifdef PIKE_DEBUG    if(b>255)    Pike_error("Instruction too big %d\n",b);
pike.git/src/code/sparc.c:49:    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;    last_num_linenumbers = Pike_compiler->new_program->num_linenumbers;    UPDATE_PC();    delay_ok = 1;    }    }    +  addr = instrs[b].address; +    #ifndef PIKE_DEBUG    /* This is not very pretty */    switch(b)    {    case F_MAKE_ITERATOR - F_OFFSET:    {    extern void f_Iterator(INT32);    SET_REG(SPARC_REG_O0, 1);    delay_ok = 1;    addr = (void *)f_Iterator;
pike.git/src/code/sparc.c:84: Inside #if undefined(PIKE_DEBUG)
   case F_DIVIDE - F_OFFSET: addr=(void *)o_divide; break;    case F_MOD - F_OFFSET: addr=(void *)o_mod; break;    case F_CAST - F_OFFSET: addr = (void *)f_cast; break;    case F_CAST_TO_INT - F_OFFSET: addr = (void *)o_cast_to_int; break;    case F_CAST_TO_STRING - F_OFFSET: addr = (void *)o_cast_to_string; break;    case F_RANGE - F_OFFSET: addr = (void *)o_range; break;    case F_SSCANF - F_OFFSET: addr=(void *)o_sscanf; break;    }   #endif    -  ADD_CALL(instrs[b].address, delay_ok); +  ADD_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)   {    SET_REG(SPARC_REG_O0, b);