Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* GOAS front-end language hooks and GCC middle-end interface
- Copyright (C) 2012
- Free Software Foundation, Inc.
- This file is part of GCC.
- GCC is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 3, or (at your option) any later
- version.
- GCC is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>.
- */
- #include "config.h"
- #include "system.h"
- #include "ansidecl.h"
- #include "coretypes.h"
- #include "tm.h"
- #include "opts.h"
- #include "tree.h"
- #include "tree-iterator.h"
- #include "tree-pass.h"
- #include "gimple.h"
- #include "toplev.h"
- #include "debug.h"
- #include "options.h"
- #include "flags.h"
- #include "convert.h"
- #include "diagnostic-core.h"
- #include "langhooks.h"
- #include "langhooks-def.h"
- #include "target.h"
- #include "cgraph.h"
- #include <gmp.h>
- #include <mpfr.h>
- #include "vec.h"
- #include "hashtab.h"
- #include "oas1.h"
- #include <stdio.h>
- #include "oas_lang.h"
- VEC(tree,gc) * global_decls_vec;
- /* bison symbols */
- extern FILE *oas_in;
- extern int oas_parse(void);
- struct GTY(()) lang_identifier {
- struct tree_identifier common;
- };
- /* Data structures required by the GCC middle-end */
- union GTY((desc ("0"),
- chain_next ("(union lang_tree_node *) TREE_CHAIN (&%h.generic)")))
- lang_tree_node {
- union tree_node GTY((tag ("0"), desc ("tree_node_structure (&%h)"))) generic;
- int GTY((tag("1"), desc("1"))) andi;
- };
- struct GTY(()) lang_type {
- char dummy;
- };
- /* Language-specific declaration information. */
- struct GTY(()) lang_decl {
- char dummy;
- };
- struct GTY(()) language_function
- {
- char dummy;
- };
- /* Parsing language hook */
- void oas_parse_file (int debug_flag ATTRIBUTE_UNUSED) {
- /* Call the bison parser */
- oas_parse();
- }
- tree oas_type_for_size (unsigned precision ATTRIBUTE_UNUSED,
- int unsignedp ATTRIBUTE_UNUSED) {
- printf("TYPE_FOR_SIZE!");
- gcc_unreachable ();
- }
- tree oas_type_for_mode (enum machine_mode mode ATTRIBUTE_UNUSED,
- int unsignedp ATTRIBUTE_UNUSED) {
- printf("TYPE_FOR_MODE!");
- gcc_unreachable ();
- }
- tree oas_pushdecl (tree decl ATTRIBUTE_UNUSED) {
- printf("PUSH_DECL!");
- gcc_unreachable ();
- }
- bool oas_global_bindings_p (void) {
- printf("GLOBAL_BIND!");
- gcc_unreachable ();
- }
- tree
- oas_getdecls (void)
- {
- printf("GET_DECLS!");
- tree global_decls = NULL_TREE;
- return global_decls;
- }
- tree
- convert (tree type ATTRIBUTE_UNUSED, tree expr ATTRIBUTE_UNUSED)
- {
- printf("CONVERT!");
- return NULL;
- }
- /* The language hooks data structure. This is the main interface between the
- * GCC front-end and the GCC middle-end/back-end. A list of language hooks could
- * be found in <gcc>/langhooks.h
- */
- struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
- #include "debug.h"
- #include "gt-oas-oas1.h"
- #include "gtype-oas.h"
Advertisement
Add Comment
Please, Sign In to add comment