aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/go-gcc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go/go-gcc.cc')
-rw-r--r--gcc/go/go-gcc.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 62baa91..7c6147a 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -506,6 +506,10 @@ class Gcc_backend : public Backend
const std::vector<Bfunction*>&,
const std::vector<Bvariable*>&);
+ void
+ write_export_data(const char* bytes, unsigned int size);
+
+
private:
// Make a Bexpression from a tree.
Bexpression*
@@ -748,6 +752,13 @@ Gcc_backend::Gcc_backend()
this->define_builtin(BUILT_IN_TRAP, "__builtin_trap", NULL,
build_function_type(void_type_node, void_list_node),
false, true);
+
+ // The runtime uses __builtin_prefetch.
+ this->define_builtin(BUILT_IN_PREFETCH, "__builtin_prefetch", NULL,
+ build_varargs_function_type_list(void_type_node,
+ const_ptr_type_node,
+ NULL_TREE),
+ false, false);
}
// Get an unnamed integer type.
@@ -3212,6 +3223,13 @@ Gcc_backend::write_global_definitions(
delete[] defs;
}
+void
+Gcc_backend::write_export_data(const char* bytes, unsigned int size)
+{
+ go_write_export_data(bytes, size);
+}
+
+
// Define a builtin function. BCODE is the builtin function code
// defined by builtins.def. NAME is the name of the builtin function.
// LIBNAME is the name of the corresponding library function, and is