diff options
author | Karl Schimpf <kschimpf@google.com> | 2013-08-01 07:12:23 -0700 |
---|---|---|
committer | Karl Schimpf <kschimpf@google.com> | 2013-08-01 07:12:23 -0700 |
commit | b9657234ee8b1951db5977a8ffb55a2e5df6d76c (patch) | |
tree | da9f474ea4b35ff767b93715a13a3933f0355f39 /include/llvm | |
parent | 365546bcef14965546dc39ebcef35f07a897b9c5 (diff) |
Remove the inttoptr dependency from load instructions.
Elides inttoptr casts used (exclusively) in load instructions when
PNaClVersion=2. This is an incremental start on removing the inttoptr
instruction from the PNaCl wire format (See issue 3544 for more information
on the strategy of removing ptrtoint).
Also modifies PNaCl bitcode reader/writer to accept PNaClVersion=1 as supported,
and PNaClVersion=2 as unsupported but readable (allowing pnacl-freeze and
pnacl-thaw to work on such files).
Also allows command-line option --pnacl-version for setting PNaClVersion in the
PNaCl bitcode writer.
Also fixes some problems on PNaCl bitcode headers, using common support to
determine when the read/written PNaCl bitcode file is valid.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3544
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/5812155903377408
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h b/include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h index 5433ed5352..9b53e08ab8 100644 --- a/include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h +++ b/include/llvm/Bitcode/NaCl/NaClLLVMBitCodes.h @@ -286,7 +286,10 @@ namespace naclbitc { // 17 is unused. // 18 is unused. FUNC_CODE_INST_ALLOCA = 19, // ALLOCA: [op, align] - FUNC_CODE_INST_LOAD = 20, // LOAD: [op, align, vol] + FUNC_CODE_INST_LOAD = 20, // PNaCl version 1: + // LOAD: [op, align, vol] + // PNaCl version 2: + // LOAD: [op, align, vol, ty] // 21 is unused. // 22 is unused. FUNC_CODE_INST_VAARG = 23, // Not used in PNaCl. |