diff options
| author | Derek Schuff <dschuff@google.com> | 2016-01-30 21:43:08 +0000 |
|---|---|---|
| committer | Derek Schuff <dschuff@google.com> | 2016-01-30 21:43:08 +0000 |
| commit | c97ba939d15c4d6dc371e9ccf7cd88d1e8c32768 (patch) | |
| tree | e30cf0c1eb14d7eb1eedca87029e0f21393ab611 /llvm/lib/Target/WebAssembly/MCTargetDesc | |
| parent | fbc89d21dd7c878d5238d90eafd597aff46f33e0 (diff) | |
| download | bcm5719-llvm-c97ba939d15c4d6dc371e9ccf7cd88d1e8c32768.tar.gz bcm5719-llvm-c97ba939d15c4d6dc371e9ccf7cd88d1e8c32768.zip | |
[WebAssembly] Fix uses of FrameIndex as store values
Previously the code assumed all uses of FI on loads and stores were as
addresses. This checks whether the use is the address or a value and
handles the latter case as it does for non-memory instructions.
llvm-svn: 259306
Diffstat (limited to 'llvm/lib/Target/WebAssembly/MCTargetDesc')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h index df541f8c499..af970929bfa 100644 --- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h +++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h @@ -125,6 +125,8 @@ inline unsigned GetDefaultP2Align(unsigned Opcode) { } } +/// The operand number of the load or store address in load/store instructions. +static const unsigned MemOpAddressOperandNo = 2; /// The operand number of the stored value in a store instruction. static const unsigned StoreValueOperandNo = 4; |

