|  | Sets the stage for enabling the use of the 8-bit high registers, but doesn't yet turn it on because more work is needed for correctness.
In the lowering, typing is tightened up so that we don't specify e.g. eax when we really mean ax or al.  This gets rid of the ShiftHack hack.  The one exception is the pinsr instruction which always requires an r32 register even if the memory operand is m8 or m16.
The x86 assembler unit tests are fixed, by not passing a GlobalContext arg to the Assembler ctor.
Many constexpr and "auto *" upgrades are applied.  Sorry for not putting this into a separate CL - a few local fixes got out of hand...
Tested in the following ways:
- "make check-lit" - some .ll CHECK line changes due to register randomization
- "make check-xtest"
- "make check-xtest" with forced filetype=asm (via local .py hack)
- spec2k with all -filetype options
- compare before-and-after spec2k filetype=asm output - a few differences where the correct narrow register is used instead of the full-width register
To do in the next CL:
1. Add new register classes:
  (a) 32-bit GPR truncable to 8-bit (eax, ecx, edx, ebx)
  (b) 16-bit GPR truncable to 8-bit (ax, cx, dx, bx)
  (c) 8-bit truncable from 16/32-bit (al, bl, cl, dl)
  (c) 8-bit "mov"able from ah/bh/ch/dh
2. Enable use of ah/bh/ch/dh for x86-32.
3. Enable use of ah (but skip bh/ch/dh) for x86-64.
4. Statically initialize register tables in the TargetLowering subclass.
BUG= none
R=jpp@chromium.org , kschimpf@google.com 
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=5bff61c44841990680781892036adb17b3cff0c4
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
   
  
   
      Total comments: 28
      
     
  
   
  
   
  
   
      Total comments: 10
      
     
  
   
    
  
  
    
      |  | Unified diffs | Side-by-side diffs | Delta from patch set | Stats (+1564 lines, -1166 lines) | Patch |  
        |  | M | src/IceAssembler.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 3 chunks | +3 lines, -4 lines | 0 comments | Download |  
        |  | M | src/IceAssembler.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 1 chunk | +1 line, -1 line | 0 comments | Download |  
        |  | M | src/IceAssemblerARM32.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14 | 1 chunk | +2 lines, -3 lines | 0 comments | Download |  
        |  | M | src/IceAssemblerARM32.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 1 chunk | +1 line, -0 lines | 0 comments | Download |  
        |  | M | src/IceAssemblerMIPS32.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14 | 1 chunk | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceAssemblerX8632.h | View | 1
        
          2
        
          3 | 1 chunk | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceAssemblerX8664.h | View | 1
        
          2
        
          3 | 1 chunk | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceAssemblerX86Base.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 1 chunk | +2 lines, -3 lines | 0 comments | Download |  
        |  | M | src/IceBrowserCompileServer.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 1 chunk | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceCfg.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 2 chunks | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceCfgNode.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14 | 1 chunk | +2 lines, -0 lines | 0 comments | Download |  
        |  | M | src/IceCfgNode.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14 | 6 chunks | +6 lines, -6 lines | 0 comments | Download |  
        |  | M | src/IceCompiler.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 1 chunk | +1 line, -1 line | 0 comments | Download |  
        |  | M | src/IceConditionCodesX8632.h | View | 1
        
          2
        
          3 | 2 chunks | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceConditionCodesX8664.h | View | 1
        
          2
        
          3 | 2 chunks | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceConverter.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 1 chunk | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceELFObjectWriter.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14 | 14 chunks | +18 lines, -18 lines | 0 comments | Download |  
        |  | M | src/IceFixups.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 2 chunks | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceGlobalContext.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 3 chunks | +5 lines, -5 lines | 0 comments | Download |  
        |  | M | src/IceInst.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 1 chunk | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceInstARM32.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 2 chunks | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceInstARM32.def | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12 | 9 chunks | +148 lines, -251 lines | 0 comments | Download |  
        |  | M | src/IceInstX8632.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 8 chunks | +18 lines, -19 lines | 0 comments | Download |  
        |  | M | src/IceInstX8632.def | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 1 chunk | +197 lines, -114 lines | 0 comments | Download |  
        |  | M | src/IceInstX8664.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 8 chunks | +18 lines, -19 lines | 0 comments | Download |  
        |  | M | src/IceInstX8664.def | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 1 chunk | +274 lines, -121 lines | 0 comments | Download |  
        |  | M | src/IceInstX86Base.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 11 chunks | +36 lines, -20 lines | 0 comments | Download |  
        |  | M | src/IceInstX86BaseImpl.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 74 chunks | +198 lines, -225 lines | 0 comments | Download |  
        |  | M | src/IceIntrinsics.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 1 chunk | +1 line, -1 line | 0 comments | Download |  
        |  | M | src/IceOperand.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 4 chunks | +9 lines, -8 lines | 0 comments | Download |  
        |  | M | src/IceOperand.cpp | View | 1
        
          2
        
          3 | 2 chunks | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IcePhiLoweringImpl.h | View | 1
        
          2
        
          3 | 1 chunk | +1 line, -1 line | 0 comments | Download |  
        |  | M | src/IceRegAlloc.cpp | View | 1
        
          2
        
          3 | 1 chunk | +1 line, -1 line | 0 comments | Download |  
        |  | A | src/IceRegList.h | View | 1 | 1 chunk | +35 lines, -0 lines | 0 comments | Download |  
        |  | M | src/IceRegistersX8632.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 4 chunks | +15 lines, -37 lines | 0 comments | Download |  
        |  | M | src/IceRegistersX8664.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 3 chunks | +16 lines, -38 lines | 0 comments | Download |  
        |  | M | src/IceTargetLowering.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 2 chunks | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceTargetLoweringARM32.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 5 chunks | +6 lines, -6 lines | 0 comments | Download |  
        |  | M | src/IceTargetLoweringMIPS32.cpp | View | 1
        
          2
        
          3 | 2 chunks | +2 lines, -2 lines | 0 comments | Download |  
        |  | M | src/IceTargetLoweringX8632.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6 | 2 chunks | +4 lines, -5 lines | 0 comments | Download |  
        |  | M | src/IceTargetLoweringX8632Traits.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 6 chunks | +149 lines, -39 lines | 0 comments | Download |  
        |  | M | src/IceTargetLoweringX8664Traits.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16 | 6 chunks | +120 lines, -40 lines | 0 comments | Download |  
        |  | M | src/IceTargetLoweringX86BaseImpl.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 43 chunks | +190 lines, -98 lines | 0 comments | Download |  
        |  | M | src/IceTimerTree.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9 | 3 chunks | +3 lines, -3 lines | 0 comments | Download |  
        |  | M | tests_lit/llvm2ice_tests/randomize-regalloc.ll | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12 | 4 chunks | +17 lines, -17 lines | 0 comments | Download |  
        |  | M | tests_lit/llvm2ice_tests/rng.ll | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12 | 1 chunk | +7 lines, -7 lines | 0 comments | Download |  
        |  | M | unittest/AssemblerX8632/GPRArith.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 2 chunks | +2 lines, -3 lines | 0 comments | Download |  
        |  | M | unittest/AssemblerX8632/LowLevel.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 2 chunks | +8 lines, -8 lines | 0 comments | Download |  
        |  | M | unittest/AssemblerX8632/TestUtil.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 1 chunk | +1 line, -1 line | 0 comments | Download |  
        |  | M | unittest/AssemblerX8632/X87.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 4 chunks | +8 lines, -8 lines | 0 comments | Download |  
        |  | M | unittest/AssemblerX8664/GPRArith.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 3 chunks | +3 lines, -2 lines | 0 comments | Download |  
        |  | M | unittest/AssemblerX8664/LowLevel.cpp | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 1 chunk | +3 lines, -4 lines | 0 comments | Download |  
        |  | M | unittest/AssemblerX8664/TestUtil.h | View | 1
        
          2
        
          3
        
          4
        
          5
        
          6
        
          7
        
          8
        
          9
        
          10
        
          11
        
          12
        
          13
        
          14
        
          15
        
          16
        
          17 | 3 chunks | +7 lines, -1 line | 0 comments | Download |  
    Total messages: 15 (8 generated)
     |