X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fir_spec.py;h=bfe1a74fa7431ab0cbf2aec7141836e5d801e006;hb=bd019d8cd785c1a433c19dee44bf3f9e82397286;hp=061f1f183f2aa3f77e4e2a1d5f45e631b513edfb;hpb=1c89dc2a2c3cccd6e29fcfbf65248496db66ab92;p=libfirm diff --git a/scripts/ir_spec.py b/scripts/ir_spec.py index 061f1f183..bfe1a74fa 100755 --- a/scripts/ir_spec.py +++ b/scripts/ir_spec.py @@ -175,6 +175,14 @@ class Block(Op): arity = "variable" flags = [ "labeled" ] attr_struct = "block_attr" + attrs = [ + dict( + name = "entity", + type = "ir_entity*", + comment = "entity representing this block", + init = "NULL", + ), + ] customSerializer = True init = ''' @@ -267,12 +275,6 @@ class Call(Op): name = "type", comment = "type of the call (usually type of the called procedure)", ), - dict( - type = "unsigned", - name = "tail_call", - # the tail call attribute can only be set by analysis - init = "0", - ) ] attr_struct = "call_attr" pinned = "memory" @@ -316,11 +318,7 @@ class Cmp(Binop): attr_struct = "cmp_attr" class Cond(Op): - """Conditionally change control flow. - Input: A value of mode_b - Output: A tuple of two control flows. The first is taken if the input is - false, the second if it is true. - """ + """Conditionally change control flow.""" ins = [ ("selector", "condition parameter"), ] @@ -632,6 +630,7 @@ class Mod(Op): """returns the remainder of its operands from an implied division. Examples: + * mod(5,3) produces 2 * mod(5,-3) produces 2 * mod(-5,3) produces -2 @@ -878,21 +877,21 @@ class Sub(Binop): class SymConst(Op): """A symbolic constant. - - symconst_type_tag The symbolic constant represents a type tag. The - type the tag stands for is given explicitly. - - symconst_type_size The symbolic constant represents the size of a type. - The type of which the constant represents the size - is given explicitly. - - symconst_type_align The symbolic constant represents the alignment of a - type. The type of which the constant represents the - size is given explicitly. - - symconst_addr_ent The symbolic constant represents the address of an - entity (variable or method). The variable is given - explicitly by a firm entity. - - symconst_ofs_ent The symbolic constant represents the offset of an - entity in its owner type. - - symconst_enum_const The symbolic constant is a enumeration constant of - an enumeration type.""" + - *symconst_type_tag* The symbolic constant represents a type tag. The + type the tag stands for is given explicitly. + - *symconst_type_size* The symbolic constant represents the size of a type. + The type of which the constant represents the size + is given explicitly. + - *symconst_type_align* The symbolic constant represents the alignment of a + type. The type of which the constant represents the + size is given explicitly. + - *symconst_addr_ent* The symbolic constant represents the address of an + entity (variable or method). The variable is given + explicitly by a firm entity. + - *symconst_ofs_ent* The symbolic constant represents the offset of an + entity in its owner type. + - *symconst_enum_const* The symbolic constant is a enumeration constant of + an enumeration type.""" mode = "mode_P" flags = [ "constlike", "start_block" ] knownBlock = True