Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: src/assembler-ia32.cc

Issue 7669: Incomplete change for inlining more smi cases for (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/codegen-ia32.h » ('j') | src/codegen-ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler-ia32.cc
===================================================================
--- src/assembler-ia32.cc (revision 535)
+++ src/assembler-ia32.cc (working copy)
@@ -428,12 +428,24 @@
// relocation information generated between the last instruction and this
// pop instruction.
byte instr = last_pc_[0];
- if (instr == (0x50 | dst.code())) {
- pc_ = last_pc_;
+ if ((instr & ~0x7) == 0x50) {
+ int push_reg_code = instr & 0x7;
+ if (push_reg_code == dst.code()) {
+ pc_ = last_pc_;
+ if (FLAG_print_push_pop_elimination) {
+ PrintF("%d push/pop (same reg) eliminated\n", pc_offset());
+ }
+ } else {
+ // Convert 'push src; pop dst' to 'mov dst, src'.
+ last_pc_[0] = 0x8b;
+ Register src = { push_reg_code };
+ EnsureSpace ensure_space(this);
+ emit_operand(dst, Operand(src));
+ if (FLAG_print_push_pop_elimination) {
+ PrintF("%d push/pop (reg->reg) eliminated\n", pc_offset());
+ }
+ }
last_pc_ = NULL;
- if (FLAG_print_push_pop_elimination) {
- PrintF("%d push/pop (same reg) eliminated\n", pc_offset());
- }
return;
} else if (instr == 0xff) { // push of an operand, convert to a move
byte op1 = last_pc_[1];
« no previous file with comments | « no previous file | src/codegen-ia32.h » ('j') | src/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698