pike.git / src / code / amd64.c

version» Context lines:

pike.git/src/code/amd64.c:3763:    }       /* Note: It is not actually possible to do ins_debug_instr_prologue    * here.    */    amd64_call_c_opcode(Pike_compiler->new_program->constants[b].sval.u.efun->function,    I_UPDATE_SP);    return;       case F_CONSTANT: +  { +  struct svalue *cval = &Pike_compiler->new_program->constants[b].sval;    ins_debug_instr_prologue(a-F_OFFSET, b, 0); -  +  if( TYPEOF(*cval) == PIKE_T_INT && +  SUBTYPEOF(*cval) == NUMBER_UNDEFINED) +  {    amd64_load_fp_reg();    amd64_load_sp_reg(); - #if 0 +  /* We end up here in programs decoded from decode_value. +  constants are not restored until after the program +  code is generated. +  +  (there is no way to differentiate a 'real' undefined here) +  */    mov_mem_reg( fp_reg, OFFSETOF(pike_frame,context), P_REG_RCX );    mov_mem_reg( P_REG_RCX, OFFSETOF(inherit,prog), P_REG_RCX );    mov_mem_reg( P_REG_RCX, OFFSETOF(program,constants), P_REG_RCX );    add_reg_imm( P_REG_RCX, b*sizeof(struct program_constant) +    OFFSETOF(program_constant,sval) );    amd64_push_svaluep( P_REG_RCX ); -  /* ~14 instructions total */ - #else +  /* ~14 instructions total, 3-4 deref */ +  } +  else    { -  struct svalue *cval = &Pike_compiler->new_program->constants[b].sval; +  amd64_load_sp_reg();    mov_imm_mem(cval->tu.type_subtype, sp_reg, SVAL(0).type);    if( TYPEOF(*cval) >= MIN_REF_TYPE )    {    mov_imm_reg(cval->u.integer, P_REG_RCX);    mov_reg_mem(P_REG_RCX, sp_reg, SVAL(0).value);    add_imm_mem( 1, P_REG_RCX, OFFSETOF(pike_string, refs));    }    else    {    mov_imm_mem(cval->u.integer, sp_reg, SVAL(0).value);    }    amd64_add_sp(1); -  +  /* 2 or 4 instructions total, 0-1 deref */    } -  /* 2 or 4 instructions total */ - #endif +  }    return;       case F_GLOBAL_LVALUE:    ins_debug_instr_prologue(a-F_OFFSET, b, 0);    amd64_load_fp_reg();    amd64_load_sp_reg();       amd64_push_this_object( );       mov_imm_mem( T_OBJ_INDEX, sp_reg, OFFSETOF(svalue, tu.t.type));