pike.git / src / code / amd64.c

version» Context lines:

pike.git/src/code/amd64.c:1255:    (amd64_prev_stored_pc == -1) ||    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();    }   }    + static void maybe_load_fp(void) + { +  static int last_prog_id=-1; +  static size_t last_num_linenumbers=-1; +  +  if( + #ifdef PIKE_DEBUG +  /* Update the pc more often for the sake of the opcode level trace. */ +  d_flag || + #endif +  (amd64_prev_stored_pc == -1) || +  last_prog_id != Pike_compiler->new_program->id || +  last_num_linenumbers != Pike_compiler->new_program->num_linenumbers +  ) { +  amd64_load_fp_reg(); +  } + } +    static void sync_registers(int flags)   {    maybe_update_pc();    flush_dirty_regs();       if (flags & I_UPDATE_SP) sp_reg = REG_INVALID;    if (flags & I_UPDATE_M_SP) mark_sp_reg = REG_INVALID;    if (flags & I_UPDATE_FP) fp_reg = REG_INVALID;   }   
pike.git/src/code/amd64.c:1277:    sync_registers(flags);    call_imm( addr );   }         #ifdef PIKE_DEBUG   static void ins_debug_instr_prologue (PIKE_INSTR_T instr, INT32 arg1, INT32 arg2)   {    int flags = instrs[instr].flags;    +  /* Note: maybe_update_pc() is called by amd64_call_c_opcode() above, +  * which has the side-effect of loading fp_reg. Some of the +  * opcodes use amd64_call_c_opcode() in conditional segments. +  * This is to make sure that fp_reg is always loaded on exit +  * from such opcodes. +  */ +  +  maybe_load_fp(); +    /* For now: It is very hard to read the disassembled source when    this is inserted */    if( !d_flag )    return;       maybe_update_pc();       if (flags & I_HASARG2)    mov_imm_reg(arg2, ARG3_REG);    if (flags & I_HASARG)