Iasm and obj lowering for advanced switch lowering.

Jump table emission is delayed until offsets are known. X86 local jumps can be
near or far. Sanboxing is applied to indirect jumps from jump table.

BUG=
R=stichnot@chromium.org, jvoung

Review URL: https://codereview.chromium.org/1257283004.
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 018a555..c7ef918 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -177,6 +177,7 @@
   void updateStackAdjustment(int32_t Offset) { StackAdjustment += Offset; }
   void resetStackAdjustment() { StackAdjustment = 0; }
   SizeT makeNextLabelNumber() { return NextLabelNumber++; }
+  SizeT makeNextJumpTableNumber() { return NextJumpTableNumber++; }
   LoweringContext &getContext() { return Context; }
 
   enum RegSet {
@@ -212,6 +213,8 @@
   /// Get the minimum number of clusters required for a jump table to be
   /// considered.
   virtual SizeT getMinJumpTableSize() const = 0;
+  virtual void emitJumpTable(const Cfg *Func,
+                             const InstJumpTable *JumpTable) const = 0;
 
   virtual void emitVariable(const Variable *Var) const = 0;
 
@@ -338,6 +341,7 @@
   /// natural location, as arguments are pushed for a function call.
   int32_t StackAdjustment = 0;
   SizeT NextLabelNumber = 0;
+  SizeT NextJumpTableNumber = 0;
   LoweringContext Context;
 
   // Runtime helper function names
@@ -397,6 +401,7 @@
   virtual void lowerGlobals(const VariableDeclarationList &Vars,
                             const IceString &SectionSuffix) = 0;
   virtual void lowerConstants() = 0;
+  virtual void lowerJumpTables() = 0;
 
 protected:
   void emitGlobal(const VariableDeclaration &Var,