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

Issue 1188603002: Move lowerGlobal() from target-specific code to emitGlobal() in generic code. (Closed)

Created:
5 years, 6 months ago by jvoung (off chromium)
Modified:
5 years, 6 months ago
Reviewers:
Karl, Jim Stichnoth, John
CC:
native-client-reviews_googlegroups.com, reed.kotler
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Move lowerGlobal() from target-specific code to emitGlobal() in generic code. Emitting the global initializers is mostly the same across each architecture (same filling, alignment, etc.). The only difference is in assembler-directive quirks. E.g., on ARM for ".align N" N is the exponent for a power of 2, while on x86 N is the actual number of bytes. To avoid target-specific directives, use .p2align which is always a power of 2. Similarly, use % instead of @. Either one may be a comment character for *some* architecture, but for the architectures we care about % is not a comment character while @ is sometimes (ARM). Usually MIPS uses ".space N" for ".zero", but the assembler seems to accept ".zero" so don't change that for now. May need to adjust .long in the future too. .word for AArch64 and .4byte for MIPS? Potentially we can refactor the lowerGlobals() dispatcher (ELF vs ASM vs IASM). The only thing target-specific about that is *probably* just the relocation type. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=58eea4d1c41d4783aadc7ff489029cffdbd38f78

Patch Set 1 #

Patch Set 2 : .long vs .4byte #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -195 lines) Patch
M src/IceTargetLowering.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 2 chunks +84 lines, -0 lines 0 comments Download
M src/IceTargetLoweringARM32.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/IceTargetLoweringARM32.cpp View 2 chunks +1 line, -6 lines 0 comments Download
M src/IceTargetLoweringMIPS32.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/IceTargetLoweringMIPS32.cpp View 2 chunks +1 line, -6 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/IceTargetLoweringX8632.cpp View 2 chunks +1 line, -77 lines 0 comments Download
M tests_lit/llvm2ice_tests/globalinit.pnacl.ll View 3 chunks +64 lines, -45 lines 0 comments Download
M tests_lit/llvm2ice_tests/globalrelocs.ll View 5 chunks +58 lines, -58 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
jvoung (off chromium)
5 years, 6 months ago (2015-06-15 19:22:22 UTC) #2
Jim Stichnoth
lgtm
5 years, 6 months ago (2015-06-15 21:33:49 UTC) #3
jvoung (off chromium)
5 years, 6 months ago (2015-06-15 22:12:01 UTC) #4
Message was sent while issue was closed.
Committed patchset #2 (id:2) manually as
58eea4d1c41d4783aadc7ff489029cffdbd38f78 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698