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

Issue 10002: Use shorting encoding for mov reg, imm. (Closed)

Created:
12 years, 1 month ago by Dean McNamee
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Use shorter encoding for mov REG, IMM. Use Set() in two places to generate smaller code when the immediate is 0.

Patch Set 1 #

Patch Set 2 : Remove an accidental change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -27 lines) Patch
M src/assembler-ia32.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/assembler-ia32.cc View 2 chunks +16 lines, -0 lines 0 comments Download
M src/builtins-ia32.cc View 1 5 chunks +5 lines, -5 lines 0 comments Download
M src/codegen-ia32.cc View 5 chunks +6 lines, -6 lines 3 comments Download
M src/ic-ia32.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/macro-assembler-ia32.cc View 4 chunks +5 lines, -5 lines 2 comments Download
M src/stub-cache-ia32.cc View 6 chunks +8 lines, -8 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
Dean McNamee
There is a bit of duplication for the mov(reg, reg), since it could have used ...
12 years, 1 month ago (2008-11-09 18:18:09 UTC) #1
Kevin Millikin (Chromium)
12 years, 1 month ago (2008-11-10 15:05:41 UTC) #2
I like it.  Even if it doesn't result in a shorter encoding, I think it reads
better to get rid of Immediate in places where it isn't needed.

http://codereview.chromium.org/10002/diff/401/604
File src/codegen-ia32.cc (right):

http://codereview.chromium.org/10002/diff/401/604#newcode1044
Line 1044: __ mov(eax, Immediate(value));
Couldn't this just be __ mov(eax, value)?

http://codereview.chromium.org/10002/diff/401/604#newcode4987
Line 4987: __ mov(eax, Immediate(reinterpret_cast<int32_t>(failure)));
Similarly __ mov(eax, reinterpret_cast<int32_t>(failure))?

http://codereview.chromium.org/10002/diff/401/604#newcode5005
Line 5005: __ mov(eax, Immediate(reinterpret_cast<int32_t>(failure)));
Ditto.

http://codereview.chromium.org/10002/diff/401/606
File src/macro-assembler-ia32.cc (right):

http://codereview.chromium.org/10002/diff/401/606#newcode698
Line 698: mov(eax, Immediate(Factory::undefined_value()));
Just mov(eax, Factory::undefined_value())?

http://codereview.chromium.org/10002/diff/401/606#newcode790
Line 790: mov(edx, Immediate(code_constant));
Ditto.

http://codereview.chromium.org/10002/diff/401/607
File src/stub-cache-ia32.cc (right):

http://codereview.chromium.org/10002/diff/401/607#newcode398
Line 398: __ mov(ecx, Immediate(Handle<Map>(transition)));
Ditto and below.

Powered by Google App Engine
This is Rietveld 408576698