LANGUAGES revision 50397
150397SobrienRight now there is no documentation for the GCC tree -> rtl interfaces 250397Sobrien(or more generally the interfaces for adding new languages). 350397Sobrien 450397SobrienSuch documentation would be of great benefit to the project. Until such 550397Sobrientime as we can formally start documenting the interface this file will 650397Sobrienserve as a repository for information on these interface and any incompatable 750397Sobrienchanges we've made. 850397Sobrien 950397SobrienJun 10, 1998: 1050397Sobrien The interface to lang_decode_option has changed. It now uses and argc/argv 1150397Sobrien interface to allow for options that use more than one input string. The new 1250397Sobrien declaration is: int lang_decode_option (int argc, char** argv). It now 1350397Sobrien returns the number of input strings processed, or 0 if the option is 1450397Sobrien unknown. 1550397Sobrien 1650397SobrienJun 7, 1998: 1750397Sobrien Front-ends must now define lang_init_options. It is safe for this 1850397Sobrien function to do nothing. See c-lang.c. 1950397Sobrien 2050397SobrienApr 21, 1998: 2150397Sobrien Front ends which link with c-common or other files from the C/C++ 2250397Sobrien front-ends may need to handle TI types. Look for references to 2350397Sobrien [unsigned]int_DI_type_node in your front end. If you have references 2450397Sobrien to these variables, you'll need up update the front end. 2550397Sobrien 2650397Sobrien To update the front end you must mirror all the code which currently 2750397Sobrien deals with intDI_type_node to also handle intTI_type_node. 2850397Sobrien 2950397Sobrien 3050397SobrienApr 7, 1998: 3150397Sobrien The interface between toplev.c and the language front ends for opening the 3250397Sobrien source file has changed: 3350397Sobrien 3450397Sobrien o init_lex() has been renamed to init_parse (char *filename) where filename 3550397Sobrien is the name of the source file. 3650397Sobrien o The code in toplev.c which opened the source file should be moved to 3750397Sobrien the new init_parse function. 3850397Sobrien o toplev.c now calls finish_parse() instead of closing the source file 3950397Sobrien using fclose(). This should now be done in finish_parse, if necessary. 4050397Sobrien 4150397SobrienApr 1, 1998: 4250397Sobrien Front-ends must now define lang_print_xnode. It is safe for this 4350397Sobrien function to do nothing. See c-lang.c. 4450397Sobrien 4550397SobrienFeb 1, 1998: 4650397Sobrien 4750397Sobrien GCC used to store structure sizes & offsets to elements as bitsize 4850397Sobrien quantities. This causes problems because a structure can only be 4950397Sobrien (target memsize / 8) bytes long (this may effect arrays too). This 5050397Sobrien is particularly problematical on machines with small address spaces. 5150397Sobrien 5250397Sobrien So: 5350397Sobrien 5450397Sobrien All trees that represent sizes in bits should have a TREE_TYPE of 5550397Sobrien bitsizetype (rather than sizetype). 5650397Sobrien 5750397Sobrien Accordingly, when such values are computed / initialized, care has to 5850397Sobrien be takes to use / compute the proper type. 5950397Sobrien 6050397Sobrien When a size in bits is converted into a size in bytes, which is expressed 6150397Sobrien in trees, care should be taken to change the tree's type again to sizetype. 6250397Sobrien 6350397Sobrien We've updated C, C++, Fortran & Objective-C to work with the new 6450397Sobrien scheme. Other languages will need to be updated accordingly. 6550397Sobrien Contact amylaar@cygnus.com for additional information. 6650397Sobrien 6750397Sobrien?? 1997: 6850397Sobrien 6950397Sobrien In an effort to decrease cache thrashing and useless loads we've changed the 7050397Sobrien third argument to the DEFTREECODE macro to be a single char. This will 7150397Sobrien effect languages that defined their own tree codes (usually in a .def file). 7250397Sobrien 7350397Sobrien Old way: 7450397Sobrien 7550397Sobrien DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", "d", 0) 7650397Sobrien 7750397Sobrien New way: 7850397Sobrien 7950397Sobrien DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", 'd', 0) 80