Assemble calls to constant addresses.
Finally address this TODO in the assembler. This will help translate
non-IRT using programs (no ABI stability). The default scons testing
mode is non-IRT, so this helps with that. I haven't actually tested
this against scons yet, but I'm filling in the tests based on how
LLVM translates the same bitcode.
The filetype=asm is adjusted to omit the "*" and the "$".
The filetype=obj is adjusted to check for fixups with NullSymbols,
and also fill the assembler buffer at the instruction's immediate
field w/ the right constant.
The filetype=iasm is still TODO (hits an new assert in the Fixup's emit() function).
Reverts 7ad1bed99d058199a3ba246a5383458518596fbc:
"Allow stubbing of called constant addresses using command line argument."
since this is now handled (except for iasm).
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4080
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/1017373002
diff --git a/src/IceFixups.h b/src/IceFixups.h
index bbe7d4a..1bc45f3 100644
--- a/src/IceFixups.h
+++ b/src/IceFixups.h
@@ -38,6 +38,10 @@
RelocOffsetT offset() const;
IceString symbol(const GlobalContext *Ctx) const;
+
+ static const Constant *NullSymbol;
+ bool isNullSymbol() const { return value_ == NullSymbol; }
+
void set_value(const Constant *Value) { value_ = Value; }
void emit(GlobalContext *Ctx) const;