summaryrefslogtreecommitdiffhomepage
path: root/ir/be/begnuas.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2007-03-19 18:05:21 +0100
committerMatthias Braun <matze@braunis.de>2007-03-19 18:05:21 +0100
commit8535fe8732b0acf822be252812a7158ce5b8134a (patch)
tree7c90501572493f3bbcf2fd56183a135c5a99e5b2 /ir/be/begnuas.h
parentded8c3995ddca132ef312a6fdeeba7eae2e42c43 (diff)
The big committ:
- Replace limit callback in register requirements with a simple bitset - Fix backends, generators and the rest of the code for the change register requirements structure - Eliminated the custom register_requirement structures in the backend, they are pointless now, use the normal arch_register_req_t - Fix TEMPLATE backend - Extract emitter framework from ia32 and provide generic header/code for it - Port TEMPLATE backend to new emitter - Extract gas specific emit stuff (declarations, sections) from ia32 backend and provide it as generic header/code. Make TEMPLATE backend use that - Remove several FIRM_DBG_REGISTERs from functions which are called very often. Before we had millions of string hashtable lookups because of that. The prefered way is to have 1 static debug module per file and initialize it in the module constructor. No passing around in environment structs and in no case should you dynamically register it in single functions.
Diffstat (limited to 'ir/be/begnuas.h')
-rw-r--r--ir/be/begnuas.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/ir/be/begnuas.h b/ir/be/begnuas.h
new file mode 100644
index 0000000..53f853f
--- /dev/null
+++ b/ir/be/begnuas.h
@@ -0,0 +1,41 @@
+/**
+ * Header for ia32 assembler declarations dumper.
+ * @author Christian Wuerdig, Matthias Braun
+ * $Id$
+ */
+#ifndef _BE_GEN_DECLS_H_
+#define _BE_GEN_DECLS_H_
+
+#include "be.h"
+#include "beemitter.h"
+
+/**
+ * Sections.
+ */
+typedef enum section_t {
+ GAS_SECTION_TEXT = 0, /**< text section */
+ GAS_SECTION_DATA = 1, /**< data section */
+ GAS_SECTION_RODATA = 2, /**< rodata section */
+ GAS_SECTION_COMMON = 3, /**< common section */
+ GAS_SECTION_TLS = 4, /**< thread local storage section */
+ GAS_SECTION_CTOR = 5, /**< ctor section for instrumentation code init */
+ GAS_SECTION_MAX = 6
+} be_gas_section_t;
+
+typedef enum asm_flavour_t {
+ GAS_FLAVOUR_NORMAL = 0, /**< normal gas */
+ GAS_FLAVOUR_MINGW = 1, /**< MinGW variant */
+ GAS_FLAVOUR_MAX = 2
+} be_gas_flavour_t;
+
+extern be_gas_flavour_t be_gas_flavour;
+
+
+/**
+ * Generate all entities.
+ */
+void be_gas_emit_decls(be_emit_env_t *env, const be_main_env_t *main_env);
+
+void be_gas_emit_switch_section(be_emit_env_t *env, be_gas_section_t section);
+
+#endif