LANGUAGES revision 52284
1Right now there is no documentation for the GCC tree -> rtl interfaces 2(or more generally the interfaces for adding new languages). 3 4Such documentation would be of great benefit to the project. Until such 5time as we can formally start documenting the interface this file will 6serve as a repository for information on these interface and any incompatable 7changes we've made. 8 9Aug 31, 1998: 10 The interface to HANDLE_PRAGMA has changed. It now takes three arguments. 11 The first two are pointers to functions that should be used to read characters 12 from the input stream, and to push them back into the input stream respectively. 13 The third argument is a pointer to a null terminate string which is the first 14 word after #pragma. The expression supplied by HANDLE_PRAGMA should return 15 non-zero if it parsed and implemented the pragma. Otherwise it should return 16 zero, and leave the input stream as it was before the expression was evaluated. 17 18 A new back-end definable macro has been added: INSERT_ATTRIBUTES. This macro 19 allows backend to add attributes to decls as they are created. 20 21Jun 10, 1998: 22 The interface to lang_decode_option has changed. It now uses and argc/argv 23 interface to allow for options that use more than one input string. The new 24 declaration is: int lang_decode_option (int argc, char** argv). It now 25 returns the number of input strings processed, or 0 if the option is 26 unknown. 27 28Jun 7, 1998: 29 Front-ends must now define lang_init_options. It is safe for this 30 function to do nothing. See c-lang.c. 31 32Apr 21, 1998: 33 Front ends which link with c-common or other files from the C/C++ 34 front-ends may need to handle TI types. Look for references to 35 [unsigned]int_DI_type_node in your front end. If you have references 36 to these variables, you'll need up update the front end. 37 38 To update the front end you must mirror all the code which currently 39 deals with intDI_type_node to also handle intTI_type_node. 40 41 42Apr 7, 1998: 43 The interface between toplev.c and the language front ends for opening the 44 source file has changed: 45 46 o init_lex() has been renamed to init_parse (char *filename) where filename 47 is the name of the source file. 48 o The code in toplev.c which opened the source file should be moved to 49 the new init_parse function. 50 o toplev.c now calls finish_parse() instead of closing the source file 51 using fclose(). This should now be done in finish_parse, if necessary. 52 53Apr 1, 1998: 54 Front-ends must now define lang_print_xnode. It is safe for this 55 function to do nothing. See c-lang.c. 56 57Feb 1, 1998: 58 59 GCC used to store structure sizes & offsets to elements as bitsize 60 quantities. This causes problems because a structure can only be 61 (target memsize / 8) bytes long (this may effect arrays too). This 62 is particularly problematical on machines with small address spaces. 63 64 So: 65 66 All trees that represent sizes in bits should have a TREE_TYPE of 67 bitsizetype (rather than sizetype). 68 69 Accordingly, when such values are computed / initialized, care has to 70 be takes to use / compute the proper type. 71 72 When a size in bits is converted into a size in bytes, which is expressed 73 in trees, care should be taken to change the tree's type again to sizetype. 74 75 We've updated C, C++, Fortran & Objective-C to work with the new 76 scheme. Other languages will need to be updated accordingly. 77 Contact amylaar@cygnus.com for additional information. 78 79?? 1997: 80 81 In an effort to decrease cache thrashing and useless loads we've changed the 82 third argument to the DEFTREECODE macro to be a single char. This will 83 effect languages that defined their own tree codes (usually in a .def file). 84 85 Old way: 86 87 DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", "d", 0) 88 89 New way: 90 91 DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", 'd', 0) 92