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

Issue 25696004: Add support to load/store byte fields. (Closed)

Created:
7 years, 2 months ago by Benedikt Meurer
Modified:
7 years, 2 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add support to load/store byte fields. This adds a new Byte representation and support for zero-extended loads in HLoadNamedField and truncated stores in HStoreNamedField. R=mvstanton@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=17079 Committed: https://code.google.com/p/v8/source/detail?r=17100

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed nits. #

Patch Set 3 : REBASE #

Patch Set 4 : REBASE #

Patch Set 5 : Also adjust HLoadNamedField::InferRange. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -58 lines) Patch
M src/arm/lithium-codegen-arm.cc View 1 2 5 chunks +32 lines, -8 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 2 chunks +11 lines, -6 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 4 chunks +40 lines, -14 lines 4 comments Download
M src/property-details.h View 4 chunks +4 lines, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 4 chunks +10 lines, -28 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 1 chunk +8 lines, -1 line 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Benedikt Meurer
Hey Michael, Here's the byte load CL we were talking about. PTAL -- Benedikt
7 years, 2 months ago (2013-10-02 10:47:50 UTC) #1
mvstanton
2 comments, otherwise LGTM. https://codereview.chromium.org/25696004/diff/1/src/x64/lithium-codegen-x64.cc File src/x64/lithium-codegen-x64.cc (right): https://codereview.chromium.org/25696004/diff/1/src/x64/lithium-codegen-x64.cc#newcode2791 src/x64/lithium-codegen-x64.cc:2791: MemOperand operand = MemOperand(ToRegister(instr->object()), offset); ...
7 years, 2 months ago (2013-10-02 11:13:12 UTC) #2
Benedikt Meurer
https://codereview.chromium.org/25696004/diff/1/src/x64/lithium-codegen-x64.cc File src/x64/lithium-codegen-x64.cc (right): https://codereview.chromium.org/25696004/diff/1/src/x64/lithium-codegen-x64.cc#newcode2791 src/x64/lithium-codegen-x64.cc:2791: MemOperand operand = MemOperand(ToRegister(instr->object()), offset); On 2013/10/02 11:13:12, mvstanton ...
7 years, 2 months ago (2013-10-02 11:48:06 UTC) #3
mvstanton
right on, looks good.
7 years, 2 months ago (2013-10-02 11:59:06 UTC) #4
Benedikt Meurer
Committed patchset #5 manually as r17079 (presubmit successful).
7 years, 2 months ago (2013-10-02 13:29:38 UTC) #5
Jakob Kummerow
DBC. Unless I'm missing something, this patch is buggy. https://codereview.chromium.org/25696004/diff/21001/src/ia32/lithium-codegen-ia32.cc File src/ia32/lithium-codegen-ia32.cc (right): https://codereview.chromium.org/25696004/diff/21001/src/ia32/lithium-codegen-ia32.cc#newcode4440 src/ia32/lithium-codegen-ia32.cc:4440: ...
7 years, 2 months ago (2013-10-02 16:25:42 UTC) #6
Benedikt Meurer
Committed patchset #5 manually as r17100 (presubmit successful).
7 years, 2 months ago (2013-10-04 07:13:51 UTC) #7
Benedikt Meurer
7 years, 2 months ago (2013-10-04 07:14:53 UTC) #8
Message was sent while issue was closed.
Fixed and relanded.

https://codereview.chromium.org/25696004/diff/21001/src/ia32/lithium-codegen-...
File src/ia32/lithium-codegen-ia32.cc (right):

https://codereview.chromium.org/25696004/diff/21001/src/ia32/lithium-codegen-...
src/ia32/lithium-codegen-ia32.cc:4440: __ mov_b(operand,
ToInteger32(operand_value));
On 2013/10/02 16:25:42, Jakob wrote:
> Here you're passing an int32_t to a function that expects an int8_t. I'm
> surprised this even compiles on Windows.

It simply truncates to int8_t according to implicit type conversion rules. Just
what we want here.

https://codereview.chromium.org/25696004/diff/21001/src/ia32/lithium-codegen-...
src/ia32/lithium-codegen-ia32.cc:4447: __ mov_b(operand, value);
On 2013/10/02 16:25:42, Jakob wrote:
> This will fail the CHECK in mov_b when the register allocator happens to pick,
> say, edi for |value|. If you had added a test case, you would have noticed ;-)

Good catch, thanks.

Powered by Google App Engine
This is Rietveld 408576698