Diego898
July 12th, 2005, 09:34 AM
Im making a class in C++ to classify a declaration in g++ generated assembly
".def __Unwind_SjLj_Unregister; .scl 2; .type 32; .endef"
and
".ascii "Ace of Diamonds\0""
are two examples. Now what member functions could I create that would be usefull in identifying this as a declaration? IE what are ALL the aspects of a declaration that I need to make note of in my C++ class? Be it from what is being declared to what type etc. I am quite new to assembly and therefore am unsure as to what to include, exclude etc.
The same for instructions. IE operand 1 , 2, 3, etc.
For example, how would I check if a line is a valid declaration or a valid instruction? An instruction would not include a label, or a declaration. Any other valid assembly would be an instruction. But, how what are some characteristics of valid declarations and instructions? IE what would I tell my parsing engine to look for?
".def __Unwind_SjLj_Unregister; .scl 2; .type 32; .endef"
and
".ascii "Ace of Diamonds\0""
are two examples. Now what member functions could I create that would be usefull in identifying this as a declaration? IE what are ALL the aspects of a declaration that I need to make note of in my C++ class? Be it from what is being declared to what type etc. I am quite new to assembly and therefore am unsure as to what to include, exclude etc.
The same for instructions. IE operand 1 , 2, 3, etc.
For example, how would I check if a line is a valid declaration or a valid instruction? An instruction would not include a label, or a declaration. Any other valid assembly would be an instruction. But, how what are some characteristics of valid declarations and instructions? IE what would I tell my parsing engine to look for?