Commit 710a6adb authored by Matthias Braun's avatar Matthias Braun
Browse files

.word has different size on different architecutres, use .short

[r26647]
parent 1cd6d439
......@@ -46,7 +46,8 @@
#include "be_dbgout.h"
/** by default, we generate assembler code for the Linux gas */
be_gas_flavour_t be_gas_flavour = GAS_FLAVOUR_ELF;
be_gas_flavour_t be_gas_flavour = GAS_FLAVOUR_ELF;
bool be_gas_emit_types = true;
static be_gas_section_t current_section = (be_gas_section_t) -1;
......@@ -466,7 +467,7 @@ static void dump_size_type(size_t size) {
break;
case 2:
be_emit_cstring("\t.word\t");
be_emit_cstring("\t.short\t");
break;
case 4:
......@@ -1190,7 +1191,8 @@ static void dump_global(be_gas_decl_env_t *env, ir_entity *ent)
}
if (visibility != visibility_external_allocated && !emit_as_common
&& be_gas_flavour == GAS_FLAVOUR_ELF) {
&& be_gas_flavour == GAS_FLAVOUR_ELF
&& be_gas_emit_types) {
be_emit_cstring("\t.type\t");
be_emit_ident(ld_ident);
be_emit_cstring(", @object\n\t.size\t");
......
......@@ -27,6 +27,7 @@
#ifndef FIRM_BE_BEGNUAS_H
#define FIRM_BE_BEGNUAS_H
#include <stdbool.h>
#include "be.h"
#include "beemitter.h"
......@@ -60,6 +61,7 @@ typedef enum asm_flavour_t {
/** The variable where the GAS dialect is stored. */
extern be_gas_flavour_t be_gas_flavour;
extern bool be_gas_emit_types;
/**
* Generate all entities.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment