Commit 4f1beed1 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

winebuild: Remove get_asm_short_keyword.

parent 6e8be236
...@@ -272,7 +272,6 @@ extern const char *func_declaration( const char *func ); ...@@ -272,7 +272,6 @@ extern const char *func_declaration( const char *func );
extern const char *asm_globl( const char *func ); extern const char *asm_globl( const char *func );
extern const char *get_asm_ptr_keyword(void); extern const char *get_asm_ptr_keyword(void);
extern const char *get_asm_string_keyword(void); extern const char *get_asm_string_keyword(void);
extern const char *get_asm_short_keyword(void);
extern const char *get_asm_rodata_section(void); extern const char *get_asm_rodata_section(void);
extern const char *get_asm_string_section(void); extern const char *get_asm_string_section(void);
extern void output_function_size( const char *name ); extern void output_function_size( const char *name );
......
...@@ -771,7 +771,7 @@ static void output_immediate_imports(void) ...@@ -771,7 +771,7 @@ static void output_immediate_imports(void)
{ {
output( "\t.align %d\n", get_alignment(2) ); output( "\t.align %d\n", get_alignment(2) );
output( ".L__wine_spec_import_data_%s_%s:\n", dll_name, odp->name ); output( ".L__wine_spec_import_data_%s_%s:\n", dll_name, odp->name );
output( "\t%s %d\n", get_asm_short_keyword(), odp->ordinal ); output( "\t.short %d\n", odp->ordinal );
output( "\t%s \"%s\"\n", get_asm_string_keyword(), odp->name ); output( "\t%s \"%s\"\n", get_asm_string_keyword(), odp->name );
} }
} }
......
...@@ -246,22 +246,22 @@ void output_res16_directory( DLLSPEC *spec ) ...@@ -246,22 +246,22 @@ void output_res16_directory( DLLSPEC *spec )
tree = build_resource_tree( spec ); tree = build_resource_tree( spec );
output( "\n.L__wine_spec_ne_rsrctab:\n" ); output( "\n.L__wine_spec_ne_rsrctab:\n" );
output( "\t%s 0\n", get_asm_short_keyword() ); /* alignment */ output( "\t.short 0\n" ); /* alignment */
/* type and name structures */ /* type and name structures */
for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) for (i = 0, type = tree->types; i < tree->nb_types; i++, type++)
{ {
output( "\t%s 0x%04x,%u,0,0\n", get_asm_short_keyword(), type->name_offset, type->nb_names ); output( "\t.short 0x%04x,%u,0,0\n", type->name_offset, type->nb_names );
for (j = 0, res = type->res; j < type->nb_names; j++, res++) for (j = 0, res = type->res; j < type->nb_names; j++, res++)
{ {
output( "\t%s .L__wine_spec_resource_%lu-.L__wine_spec_dos_header,%u\n", output( "\t.short .L__wine_spec_resource_%lu-.L__wine_spec_dos_header,%u\n",
get_asm_short_keyword(), (unsigned long)(res - spec->resources), res->data_size ); (unsigned long)(res - spec->resources), res->data_size );
output( "\t%s 0x%04x,0x%04x,0,0\n", get_asm_short_keyword(), res->memopt, res->name_offset ); output( "\t.short 0x%04x,0x%04x,0,0\n", res->memopt, res->name_offset );
} }
} }
output( "\t%s 0\n", get_asm_short_keyword() ); /* terminator */ output( "\t.short 0\n" ); /* terminator */
/* name strings */ /* name strings */
......
...@@ -407,7 +407,7 @@ static void free_resource_tree( struct res_tree *tree ) ...@@ -407,7 +407,7 @@ static void free_resource_tree( struct res_tree *tree )
static void output_string( const WCHAR *name ) static void output_string( const WCHAR *name )
{ {
int i, len = strlenW(name); int i, len = strlenW(name);
output( "\t%s 0x%04x", get_asm_short_keyword(), len ); output( "\t.short 0x%04x", len );
for (i = 0; i < len; i++) output( ",0x%04x", name[i] ); for (i = 0; i < len; i++) output( ",0x%04x", name[i] );
output( " /* " ); output( " /* " );
for (i = 0; i < len; i++) output( "%c", isprint((char)name[i]) ? (char)name[i] : '?' ); for (i = 0; i < len; i++) output( "%c", isprint((char)name[i]) ? (char)name[i] : '?' );
...@@ -419,10 +419,9 @@ static inline void output_res_dir( unsigned int nb_names, unsigned int nb_ids ) ...@@ -419,10 +419,9 @@ static inline void output_res_dir( unsigned int nb_names, unsigned int nb_ids )
{ {
output( "\t.long 0\n" ); /* Characteristics */ output( "\t.long 0\n" ); /* Characteristics */
output( "\t.long 0\n" ); /* TimeDateStamp */ output( "\t.long 0\n" ); /* TimeDateStamp */
output( "\t%s 0,0\n", /* Major/MinorVersion */ output( "\t.short 0,0\n" ); /* Major/MinorVersion */
get_asm_short_keyword() ); output( "\t.short %u,%u\n", /* NumberOfNamed/IdEntries */
output( "\t%s %u,%u\n", /* NumberOfNamed/IdEntries */ nb_names, nb_ids );
get_asm_short_keyword(), nb_names, nb_ids );
} }
/* output the resource definitions */ /* output the resource definitions */
......
...@@ -363,12 +363,11 @@ void output_exports( DLLSPEC *spec ) ...@@ -363,12 +363,11 @@ void output_exports( DLLSPEC *spec )
output( "\n.L__wine_spec_exp_ordinals:\n" ); output( "\n.L__wine_spec_exp_ordinals:\n" );
for (i = 0; i < spec->nb_names; i++) for (i = 0; i < spec->nb_names; i++)
{ {
output( "\t%s %d\n", output( "\t.short %d\n", spec->names[i]->ordinal - spec->base );
get_asm_short_keyword(), spec->names[i]->ordinal - spec->base );
} }
if (spec->nb_names % 2) if (spec->nb_names % 2)
{ {
output( "\t%s 0\n", get_asm_short_keyword() ); output( "\t.short 0\n" );
} }
} }
...@@ -517,20 +516,17 @@ void output_module( DLLSPEC *spec ) ...@@ -517,20 +516,17 @@ void output_module( DLLSPEC *spec )
case CPU_ARM: machine = IMAGE_FILE_MACHINE_ARMNT; break; case CPU_ARM: machine = IMAGE_FILE_MACHINE_ARMNT; break;
case CPU_ARM64: machine = IMAGE_FILE_MACHINE_ARM64; break; case CPU_ARM64: machine = IMAGE_FILE_MACHINE_ARM64; break;
} }
output( "\t%s 0x%04x\n", /* Machine */ output( "\t.short 0x%04x\n", /* Machine */
get_asm_short_keyword(), machine ); machine );
output( "\t%s 0\n", /* NumberOfSections */ output( "\t.short 0\n" ); /* NumberOfSections */
get_asm_short_keyword() );
output( "\t.long 0\n" ); /* TimeDateStamp */ output( "\t.long 0\n" ); /* TimeDateStamp */
output( "\t.long 0\n" ); /* PointerToSymbolTable */ output( "\t.long 0\n" ); /* PointerToSymbolTable */
output( "\t.long 0\n" ); /* NumberOfSymbols */ output( "\t.long 0\n" ); /* NumberOfSymbols */
output( "\t%s %d\n", /* SizeOfOptionalHeader */ output( "\t.short %d\n", /* SizeOfOptionalHeader */
get_asm_short_keyword(),
get_ptr_size() == 8 ? IMAGE_SIZEOF_NT_OPTIONAL64_HEADER : IMAGE_SIZEOF_NT_OPTIONAL32_HEADER ); get_ptr_size() == 8 ? IMAGE_SIZEOF_NT_OPTIONAL64_HEADER : IMAGE_SIZEOF_NT_OPTIONAL32_HEADER );
output( "\t%s 0x%04x\n", /* Characteristics */ output( "\t.short 0x%04x\n", /* Characteristics */
get_asm_short_keyword(), spec->characteristics ); spec->characteristics );
output( "\t%s 0x%04x\n", /* Magic */ output( "\t.short 0x%04x\n", /* Magic */
get_asm_short_keyword(),
get_ptr_size() == 8 ? IMAGE_NT_OPTIONAL_HDR64_MAGIC : IMAGE_NT_OPTIONAL_HDR32_MAGIC ); get_ptr_size() == 8 ? IMAGE_NT_OPTIONAL_HDR64_MAGIC : IMAGE_NT_OPTIONAL_HDR32_MAGIC );
output( "\t.byte 0\n" ); /* MajorLinkerVersion */ output( "\t.byte 0\n" ); /* MajorLinkerVersion */
output( "\t.byte 0\n" ); /* MinorLinkerVersion */ output( "\t.byte 0\n" ); /* MinorLinkerVersion */
...@@ -549,21 +545,19 @@ void output_module( DLLSPEC *spec ) ...@@ -549,21 +545,19 @@ void output_module( DLLSPEC *spec )
get_asm_ptr_keyword() ); get_asm_ptr_keyword() );
output( "\t.long %u\n", page_size ); /* SectionAlignment */ output( "\t.long %u\n", page_size ); /* SectionAlignment */
output( "\t.long %u\n", page_size ); /* FileAlignment */ output( "\t.long %u\n", page_size ); /* FileAlignment */
output( "\t%s 1,0\n", /* Major/MinorOperatingSystemVersion */ output( "\t.short 1,0\n" ); /* Major/MinorOperatingSystemVersion */
get_asm_short_keyword() ); output( "\t.short 0,0\n" ); /* Major/MinorImageVersion */
output( "\t%s 0,0\n", /* Major/MinorImageVersion */ output( "\t.short %u,%u\n", /* Major/MinorSubsystemVersion */
get_asm_short_keyword() ); spec->subsystem_major, spec->subsystem_minor );
output( "\t%s %u,%u\n", /* Major/MinorSubsystemVersion */
get_asm_short_keyword(), spec->subsystem_major, spec->subsystem_minor );
output( "\t.long 0\n" ); /* Win32VersionValue */ output( "\t.long 0\n" ); /* Win32VersionValue */
output( "\t.long %s-.L__wine_spec_rva_base\n", /* SizeOfImage */ output( "\t.long %s-.L__wine_spec_rva_base\n", /* SizeOfImage */
asm_name("_end") ); asm_name("_end") );
output( "\t.long %u\n", page_size ); /* SizeOfHeaders */ output( "\t.long %u\n", page_size ); /* SizeOfHeaders */
output( "\t.long 0\n" ); /* CheckSum */ output( "\t.long 0\n" ); /* CheckSum */
output( "\t%s 0x%04x\n", /* Subsystem */ output( "\t.short 0x%04x\n", /* Subsystem */
get_asm_short_keyword(), spec->subsystem ); spec->subsystem );
output( "\t%s 0x%04x\n", /* DllCharacteristics */ output( "\t.short 0x%04x\n", /* DllCharacteristics */
get_asm_short_keyword(), spec->dll_characteristics ); spec->dll_characteristics );
output( "\t%s %u,%u\n", /* SizeOfStackReserve/Commit */ output( "\t%s %u,%u\n", /* SizeOfStackReserve/Commit */
get_asm_ptr_keyword(), (spec->stack_size ? spec->stack_size : 1024) * 1024, page_size ); get_asm_ptr_keyword(), (spec->stack_size ? spec->stack_size : 1024) * 1024, page_size );
output( "\t%s %u,%u\n", /* SizeOfHeapReserve/Commit */ output( "\t%s %u,%u\n", /* SizeOfHeapReserve/Commit */
......
...@@ -1109,14 +1109,6 @@ const char *get_asm_string_keyword(void) ...@@ -1109,14 +1109,6 @@ const char *get_asm_string_keyword(void)
} }
} }
const char *get_asm_short_keyword(void)
{
switch (target_platform)
{
default: return ".short";
}
}
const char *get_asm_rodata_section(void) const char *get_asm_rodata_section(void)
{ {
switch (target_platform) switch (target_platform)
......
Markdown is supported
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