DescriptionSubzero: Partial implementation of global initializers.
This is still missing a couple things:
1. It only supports flat arrays and zeroinitializers. Arrays of structs are not yet supported.
2. Initializers can't yet contain relocatables, e.g. the address of another global.Mod
Some changes are made to work around an llvm-mc assembler bug. When assembling using intel syntax, llvm-mc doesn't correctly parse symbolic constants or add relocation entries in some circumstances. Call instructions work, and use in a memory operand works, e.g. mov eax, [ArrayBase+4*ecx]. To work around this, we adjust legalize() to not allow ConstantRelocatable by default, except for memory operands and when called from lowerCall(), so the relocatable ends up being the source operand of a mov instruction. Then, the mov emit routine actually emits an lea instruction for such moves.
A few lit tests needed to be adjusted to make szdiff work properly with respect to global initializers.
In the new cross test, the driver calls test code that returns a pointer to an array with a global initializer, and the driver compares the arrays returned by llc and Subzero.
BUG= none
R=jvoung@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=de4ca71
Patch Set 1 #
Total comments: 1
Patch Set 2 : Run "make format" on the new cross tests #
Total comments: 24
Patch Set 3 : First-round updates #
Total comments: 5
Patch Set 4 : Second-round comments #Patch Set 5 : After rebasing from laster master #
Messages
Total messages: 8 (0 generated)
|