Branch: Tag:

2012-06-28

2012-06-28 21:56:29 by Per Hedbor <ph@opera.com>

[compiler][amd64] Attempt at faster PC updates.

Always just assign PC to the current address instead of adding the
difference. This is somewhat faster.

We still do too many updates, though.

As an example it is commont to have 2-3 update_pc in a row.

682:    rel -= 5; // counts from the next instruction    opcode( 0xe8 );    id( rel ); +  sp_reg = -1;    return;   }   
1215:    fprintf (stderr, "pc %d update pc relative: %d\n", tmp, disp);   #endif    amd64_load_fp_reg(); -  add_imm_mem(disp, fp_reg, OFFSETOF (pike_frame, pc)); +  mov_rip_imm_reg(tmp - PIKE_PC, tmp_reg); +  mov_reg_mem(tmp_reg, fp_reg, OFFSETOF(pike_frame, pc)); +  /* amd64_load_fp_reg(); */ +  /* add_imm_mem(disp, fp_reg, OFFSETOF (pike_frame, pc)); */    amd64_prev_stored_pc += disp;    }    else {