Subzero: Add Non-SFI support for x86-32.

The basic model is that each translated function begins with a special "GotVar = getIP" instruction, and each ConstantRelocatable reference is changed to GotVar+ConstantRelocatable@GOTOFF (assuming GotVar is legalized into a physical register).  The getIP instruction is late-lowered into:
  call __Sz_getIP_<reg>
  add <reg>, $_GLOBAL_OFFSET_TABLE_
  mov GotVar, <reg>
Note that _GLOBAL_OFFSET_TABLE_ gets a special relocation type.

The register allocator takes GotVar uses into account, giving appropriate weight toward register allocation.

If there are no uses of GotVar, the getIP instruction gets naturally dead-code eliminated.  Special treatment is needed to prevent this elimination when the only GotVar uses are for (floating point) constant pool values from Phi instructions, since the Phi lowering with its GotVar legalization happens after the main round of register allocation.

The x86 mem operand now has a IsPIC field to indicate whether it has been PIC-legalized.  Mem operands are sometimes legalized more than once, and this IsPIC field keeps GotVar from being added more than once.

We have to limit the aggressiveness of address mode inference, to make sure a register slot is left for the GotVar.

The Subzero runtime has new asm files to implement all possible __Sz_getIP_<reg> helpers.

The szbuild.py script and the spec2k version support Non-SFI builds.  Running spec2k depends on a pending change to the spec2k run_all.sh script.

Read-only data sections need to be named .data.rel.ro instead of .rodata because of PIC rules.

Most cross tests are working, but there is some problem with vector types that seems to be not Subzero related, so most vector tests are disabled for now.

Still to do:

* Fix "--nonsfi --filetype=iasm".  The llvm-mc assembler doesn't properly apply the _GLOBAL_OFFSET_TABLE_ relocation in iasm mode.  Maybe I can find a different syntactic trick that works, or use hybrid iasm for this limited case.

BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4327
R=jpp@chromium.org

Review URL: https://codereview.chromium.org/1506653002 .
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index e602f04..799872e 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -152,7 +152,9 @@
   TargetLowering &operator=(const TargetLowering &) = delete;
 
 public:
-  static void staticInit(TargetArch Target);
+  static void staticInit(const ClFlags &Flags);
+  // Each target must define a public static method:
+  //   static void staticInit(const ClFlags &Flags);
 
   static std::unique_ptr<TargetLowering> createLowering(TargetArch Target,
                                                         Cfg *Func);
@@ -242,6 +244,8 @@
   SizeT makeNextLabelNumber() { return NextLabelNumber++; }
   SizeT makeNextJumpTableNumber() { return NextJumpTableNumber++; }
   LoweringContext &getContext() { return Context; }
+  Cfg *getFunc() const { return Func; }
+  GlobalContext *getGlobalContext() const { return Ctx; }
 
   enum RegSet {
     RegSet_None = 0,
@@ -274,15 +278,15 @@
 
   virtual void emitVariable(const Variable *Var) const = 0;
 
-  void emitWithoutPrefix(const ConstantRelocatable *CR) const;
-  void emit(const ConstantRelocatable *CR) const;
-  virtual const char *getConstantPrefix() const = 0;
+  void emitWithoutPrefix(const ConstantRelocatable *CR,
+                         const char *Suffix = "") const;
 
-  virtual void emit(const ConstantUndef *C) const = 0;
   virtual void emit(const ConstantInteger32 *C) const = 0;
   virtual void emit(const ConstantInteger64 *C) const = 0;
   virtual void emit(const ConstantFloat *C) const = 0;
   virtual void emit(const ConstantDouble *C) const = 0;
+  virtual void emit(const ConstantUndef *C) const = 0;
+  virtual void emit(const ConstantRelocatable *CR) const = 0;
 
   /// Performs target-specific argument lowering.
   virtual void lowerArguments() = 0;
@@ -423,6 +427,7 @@
   const static constexpr char *H_fptoui_f64_i64 = "__Sz_fptoui_f64_i64";
   const static constexpr char *H_frem_f32 = "fmodf";
   const static constexpr char *H_frem_f64 = "fmod";
+  const static constexpr char *H_getIP_prefix = "__Sz_getIP_";
   const static constexpr char *H_sdiv_i32 = "__divsi3";
   const static constexpr char *H_sdiv_i64 = "__divdi3";
   const static constexpr char *H_sitofp_i64_f32 = "__Sz_sitofp_i64_f32";