summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td
blob: 8457dc89c4debe027ff4b070c0808673ed0acff4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// WebAssemblyInstrMemory.td-WebAssembly Memory codegen support -*- tablegen -*-
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief WebAssembly Memory operand code-gen constructs.
///
//===----------------------------------------------------------------------===//

/*
 * TODO(jfb): Add the following.
 * Each has optional alignment and immediate byte offset.
 *
 * int32.load_sx[int8]: sign-extend to int32
 * int32.load_sx[int16]: sign-extend to int32
 * int32.load_zx[int8]: zero-extend to int32
 * int32.load_zx[int16]: zero-extend to int32
 * int32.load[int32]: (no conversion)
 * int64.load_sx[int8]: sign-extend to int64
 * int64.load_sx[int16]: sign-extend to int64
 * int64.load_sx[int32]: sign-extend to int64
 * int64.load_zx[int8]: zero-extend to int64
 * int64.load_zx[int16]: zero-extend to int64
 * int64.load_zx[int32]: zero-extend to int64
 * int64.load[int64]: (no conversion)
 * float32.load[float32]: (no conversion)
 * float64.load[float64]: (no conversion)
 * 
 * int32.store[int8]: wrap int32 to int8
 * int32.store[int16]: wrap int32 to int16
 * int32.store[int32]: (no conversion)
 * int64.store[int8]: wrap int64 to int8
 * int64.store[int16]: wrap int64 to int16
 * int64.store[int32]: wrap int64 to int32
 * int64.store[int64]: (no conversion)
 * float32.store[float32]: (no conversion)
 * float64.store[float64]: (no conversion)
 * 
 * load_global: load the value of a given global variable
 * store_global: store a given value to a given global variable
 */

def page_size_I32 : I<(outs Int32:$dst), (ins),
                      [(set Int32:$dst, (int_wasm_page_size))]>,
                    Requires<[HasAddr32]>;
def page_size_I64 : I<(outs Int64:$dst), (ins),
                      [(set Int64:$dst, (int_wasm_page_size))]>,
                    Requires<[HasAddr64]>;
OpenPOWER on IntegriCloud