diff --git a/lib/codegen/meta-python/base/instructions.py b/lib/codegen/meta-python/base/instructions.py index 0b48fb84f2..83459a17bc 100644 --- a/lib/codegen/meta-python/base/instructions.py +++ b/lib/codegen/meta-python/base/instructions.py @@ -502,15 +502,15 @@ global_value = Instruction( 'global_value', r""" Compute the value of global GV. """, - ins=GV, outs=addr) + ins=GV, outs=a) # A specialized form of global_value instructions that only handles # symbolic names. symbol_value = Instruction( 'symbol_value', r""" - Compute the value of global GV, which is a symbolic address. + Compute the value of global GV, which is a symbolic value. """, - ins=GV, outs=addr) + ins=GV, outs=a) # # WebAssembly bounds-checked heap accesses. diff --git a/lib/codegen/src/ir/globalvalue.rs b/lib/codegen/src/ir/globalvalue.rs index 97ebdae262..47696fe3d1 100644 --- a/lib/codegen/src/ir/globalvalue.rs +++ b/lib/codegen/src/ir/globalvalue.rs @@ -39,8 +39,13 @@ pub enum GlobalValueData { global_type: Type, }, - /// Value is a symbolic address. Cranelift itself does not interpret this name; - /// it's used by embedders to link with other data structures. + /// Value is symbolic, meaning it's a name which will be resolved to an + /// actual value later (eg. by linking). Cranelift itself does not interpret + /// this name; it's used by embedders to link with other data structures. + /// + /// For now, symbolic values always have pointer type, and represent + /// addresses, however in the future they could be used to represent other + /// things as well. Symbol { /// The symbolic name. name: ExternalName,