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

Issue 1651163002: Subzero. Enables moar complex relocation offsets. (Closed)

Created:
4 years, 10 months ago by John
Modified:
4 years, 10 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Subzero. Enables moar complex relocation offsets. This CL allows ConstantRelocatables in to Subzero have symbolic constants. A symbolic constant is an assembly label whose value is not known during lowering, but it is well defined during code emission. For example, the following code is now possible in Subzero: foo: push $foo.bar jmp target nop nop foo.bar: ... BUG= R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=27fddcc36ad3f0c7531e481f9b249bd36ef83057

Patch Set 1 #

Patch Set 2 : Fixes filetype=asm; use the new symbolic relocation offsets for x86-64-nacl call. #

Patch Set 3 : Removes Assembler::InternalRelocs wart. #

Patch Set 4 : Fixes Absolute Relocation Type for x86-64. #

Total comments: 14

Patch Set 5 : Addresses comments. #

Total comments: 10

Patch Set 6 : Addresses comments. #

Patch Set 7 : make format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -67 lines) Patch
M Makefile.standalone View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceAssembler.h View 1 2 2 chunks +0 lines, -14 lines 0 comments Download
M src/IceAssemblerX86Base.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/IceAssemblerX86BaseImpl.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/IceDefs.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceELFObjectWriter.cpp View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
M src/IceGlobalContext.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 3 4 5 6 2 chunks +24 lines, -4 lines 0 comments Download
M src/IceInstX86Base.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceInstX86BaseImpl.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M src/IceOperand.h View 1 2 3 4 5 5 chunks +73 lines, -14 lines 0 comments Download
M src/IceOperand.cpp View 1 2 3 4 2 chunks +67 lines, -3 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8664.cpp View 1 2 3 4 2 chunks +33 lines, -5 lines 0 comments Download
M src/IceTargetLoweringX8664Traits.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/assembler/x86/sandboxing.ll View 1 2 3 5 chunks +5 lines, -10 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
John
4 years, 10 months ago (2016-02-02 00:35:18 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/1651163002/diff/60001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp (right): https://codereview.chromium.org/1651163002/diff/60001/src/IceGlobalContext.cpp#newcode47 src/IceGlobalContext.cpp:47: return hash<Ice::IceString>()(Key.Name); Any reason not to add some aspect ...
4 years, 10 months ago (2016-02-02 17:13:45 UTC) #4
John
https://codereview.chromium.org/1651163002/diff/60001/src/IceGlobalContext.cpp File src/IceGlobalContext.cpp (right): https://codereview.chromium.org/1651163002/diff/60001/src/IceGlobalContext.cpp#newcode47 src/IceGlobalContext.cpp:47: return hash<Ice::IceString>()(Key.Name); On 2016/02/02 17:13:44, stichnot wrote: > Any ...
4 years, 10 months ago (2016-02-02 19:36:39 UTC) #5
Jim Stichnoth
lgtm https://codereview.chromium.org/1651163002/diff/80001/src/IceDefs.h File src/IceDefs.h (right): https://codereview.chromium.org/1651163002/diff/80001/src/IceDefs.h#newcode313 src/IceDefs.h:313: using RelocOffsetArray = llvm::SmallVector<RelocOffset *, 4>; You could ...
4 years, 10 months ago (2016-02-02 20:57:49 UTC) #6
John
Committed patchset #7 (id:120001) manually as 27fddcc36ad3f0c7531e481f9b249bd36ef83057 (presubmit successful).
4 years, 10 months ago (2016-02-02 23:06:13 UTC) #8
John
4 years, 10 months ago (2016-02-03 15:50:41 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/1651163002/diff/80001/src/IceDefs.h
File src/IceDefs.h (right):

https://codereview.chromium.org/1651163002/diff/80001/src/IceDefs.h#newcode313
src/IceDefs.h:313: using RelocOffsetArray = llvm::SmallVector<RelocOffset *, 4>;
On 2016/02/02 20:57:49, stichnot wrote:
> You could use "class RelocOffset" here and remove the explicit forward
> declaration above, if you prefer.

Done.

https://codereview.chromium.org/1651163002/diff/80001/src/IceGlobalContext.cpp
File src/IceGlobalContext.cpp (right):

https://codereview.chromium.org/1651163002/diff/80001/src/IceGlobalContext.cp...
src/IceGlobalContext.cpp:50: if (Key.OffsetExpr[0]->hasOffset()) {
On 2016/02/02 20:57:49, stichnot wrote:
> Please assert(!Key.OffsetExpr.empty())
> otherwise it looks like a bug.

Done.

https://codereview.chromium.org/1651163002/diff/80001/src/IceGlobalContext.cp...
src/IceGlobalContext.cpp:55: hash<std::size_t>()(Key.OffsetExpr.size());
On 2016/02/02 20:57:49, stichnot wrote:
> remove this

I meant to add it to the return value.

https://codereview.chromium.org/1651163002/diff/80001/src/IceOperand.h
File src/IceOperand.h (right):

https://codereview.chromium.org/1651163002/diff/80001/src/IceOperand.h#newcode29
src/IceOperand.h:29: #include <limits>
On 2016/02/02 20:57:49, stichnot wrote:
> I don't think this is actually necessary, is it?

well, numeric_limits appear in this file. leaving it.

https://codereview.chromium.org/1651163002/diff/80001/src/IceOperand.h#newcod...
src/IceOperand.h:365: const IceString EmitString;        /// optional for
textual output
On 2016/02/02 20:57:49, stichnot wrote:
> I would change "output" to "asm" or "emission"

Done.

Powered by Google App Engine
This is Rietveld 408576698