Lines Matching +defs:Global +defs:A
57 // A wasm data segment. A wasm binary contains only a single data section
71 // A wasm function to be written into the function section.
77 // A wasm global to be written into the global section.
95 int64_t Addend; // A value to add to the symbol.
866 W->OS << char(Import.Global.Type);
867 W->OS << char(Import.Global.Mutable ? 1 : 0);
928 for (const wasm::WasmGlobal &Global : Globals) {
929 encodeULEB128(Global.Type.Type, W->OS);
930 W->OS << char(Global.Type.Mutable);
931 if (Global.InitExpr.Extended) {
934 W->OS << char(Global.InitExpr.Inst.Opcode);
935 switch (Global.Type.Type) {
1121 Relocs, [](const WasmRelocationEntry &A, const WasmRelocationEntry &B) {
1122 return (A.Offset + A.FixupSection->getSectionOffset()) <
1399 Import.Global = WS.getGlobalType();
1442 Import.Global = {wasm::WASM_TYPE_I32, true};
1602 // A definition. Write out the function body.
1664 // A "true" Wasm global (currently just __stack_pointer)
1666 wasm::WasmGlobal Global;
1667 Global.Type = WS.getGlobalType();
1668 Global.Index = NumGlobalImports + Globals.size();
1669 Global.InitExpr.Extended = false;
1670 switch (Global.Type.Type) {
1672 Global.InitExpr.Inst.Opcode = wasm::WASM_OPCODE_I32_CONST;
1675 Global.InitExpr.Inst.Opcode = wasm::WASM_OPCODE_I64_CONST;
1678 Global.InitExpr.Inst.Opcode = wasm::WASM_OPCODE_F32_CONST;
1681 Global.InitExpr.Inst.Opcode = wasm::WASM_OPCODE_F64_CONST;
1684 Global.InitExpr.Inst.Opcode = wasm::WASM_OPCODE_REF_NULL;
1690 WasmIndices[&WS] = Global.Index;
1691 Globals.push_back(Global);