diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-10-25 00:17:11 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-10-25 00:17:11 +0000 |
commit | 48abaa9c7409e58d1c4dd7b67cb3ac6e788bd314 (patch) | |
tree | d9740adeafc3a7c86fa7d932849f90c130152f2e /llvm/lib/Target/WebAssembly/MCTargetDesc | |
parent | 5c61c703877df673b89cb98a74edeb956b94506c (diff) | |
download | bcm5719-llvm-48abaa9c7409e58d1c4dd7b67cb3ac6e788bd314.tar.gz bcm5719-llvm-48abaa9c7409e58d1c4dd7b67cb3ac6e788bd314.zip |
[WebAssembly] Reorder load/store operands to match binary encoding.
The p2align operand of a load/store is encoded before the offset
operand; reorder the MachineInstr operands accordingly.
llvm-svn: 285044
Diffstat (limited to 'llvm/lib/Target/WebAssembly/MCTargetDesc')
-rw-r--r-- | llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h index ae3fb7bfd13..2d6821fad8e 100644 --- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h +++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h @@ -128,12 +128,12 @@ inline unsigned GetDefaultP2Align(unsigned Opcode) { } /// The operand number of the load or store address in load/store instructions. -static const unsigned LoadAddressOperandNo = 2; -static const unsigned StoreAddressOperandNo = 1; +static const unsigned LoadAddressOperandNo = 3; +static const unsigned StoreAddressOperandNo = 2; /// The operand number of the load or store p2align in load/store instructions. -static const unsigned LoadP2AlignOperandNo = 3; -static const unsigned StoreP2AlignOperandNo = 2; +static const unsigned LoadP2AlignOperandNo = 1; +static const unsigned StoreP2AlignOperandNo = 0; /// This is used to indicate block signatures. enum class ExprType { |