[10/13] winebuild: Remove SPARC support
André Hentschel
nerv at dawncrow.de
Wed Feb 20 14:11:05 CST 2013
---
tools/winebuild/build.h | 3 +-
tools/winebuild/import.c | 36 +------------
tools/winebuild/main.c | 2 -
tools/winebuild/res16.c | 12 ++---
tools/winebuild/res32.c | 9 ++--
tools/winebuild/spec16.c | 130 +++++++++++++++++++++--------------------------
tools/winebuild/spec32.c | 51 +++++++------------
tools/winebuild/utils.c | 12 -----
8 files changed, 87 insertions(+), 168 deletions(-)
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 3fbf89d..e477505 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -140,7 +140,7 @@ typedef struct
enum target_cpu
{
- CPU_x86, CPU_x86_64, CPU_SPARC, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_LAST = CPU_ARM64
+ CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_LAST = CPU_ARM64
};
enum target_platform
@@ -271,7 +271,6 @@ extern const char *func_declaration( const char *func );
extern const char *asm_globl( const char *func );
extern const char *get_asm_ptr_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_string_section(void);
extern void output_function_size( const char *name );
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 81325e9..3756c75 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -648,28 +648,6 @@ static void output_import_thunk( const char *name, const char *table, int pos )
case CPU_x86_64:
output( "\tjmpq *%s+%d(%%rip)\n", table, pos );
break;
- case CPU_SPARC:
- if ( !UsePIC )
- {
- output( "\tsethi %%hi(%s+%d), %%g1\n", table, pos );
- output( "\tld [%%g1+%%lo(%s+%d)], %%g1\n", table, pos );
- output( "\tjmp %%g1\n" );
- output( "\tnop\n" );
- }
- else
- {
- /* Hmpf. Stupid sparc assembler always interprets global variable
- names as GOT offsets, so we have to do it the long way ... */
- output( "\tsave %%sp, -96, %%sp\n" );
- output( "0:\tcall 1f\n" );
- output( "\tnop\n" );
- output( "1:\tsethi %%hi(%s+%d-0b), %%g1\n", table, pos );
- output( "\tor %%g1, %%lo(%s+%d-0b), %%g1\n", table, pos );
- output( "\tld [%%g1+%%o7], %%g1\n" );
- output( "\tjmp %%g1\n" );
- output( "\trestore\n" );
- }
- break;
case CPU_ARM:
output( "\tldr IP,[PC,#0]\n");
output( "\tldr PC,[IP,#%d]\n", pos);
@@ -793,7 +771,7 @@ static void output_immediate_imports(void)
{
output( "\t.align %d\n", get_alignment(2) );
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 );
}
}
@@ -987,13 +965,6 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
output_cfi( ".cfi_adjust_cfa_offset -88" );
output( "\tjmp *%%rax\n" );
break;
- case CPU_SPARC:
- output( "\tsave %%sp, -96, %%sp\n" );
- output( "\tcall %s\n", asm_name("__wine_spec_delay_load") );
- output( "\tmov %%g1, %%o0\n" );
- output( "\tjmp %%o0\n" );
- output( "\trestore\n" );
- break;
case CPU_ARM:
output( "\tstmfd SP!, {r4-r10,FP,LR}\n" );
output( "\tmov LR,PC\n");
@@ -1094,11 +1065,6 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
output( "\tmovq $%d,%%rax\n", (idx << 16) | j );
output( "\tjmp %s\n", asm_name("__wine_delay_load_asm") );
break;
- case CPU_SPARC:
- output( "\tset %d, %%g1\n", (idx << 16) | j );
- output( "\tb,a %s\n", asm_name("__wine_delay_load_asm") );
- output( "\tnop\n" );
- break;
case CPU_ARM:
output( "\tstmfd SP!, {r0-r3}\n" );
output( "\tmov r0, #%d\n", idx );
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index 594b31b..e8f72ec 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -53,8 +53,6 @@ int unwind_tables = 0;
enum target_cpu target_cpu = CPU_x86;
#elif defined(__x86_64__)
enum target_cpu target_cpu = CPU_x86_64;
-#elif defined(__sparc__)
-enum target_cpu target_cpu = CPU_SPARC;
#elif defined(__powerpc__)
enum target_cpu target_cpu = CPU_POWERPC;
#elif defined(__arm__)
diff --git a/tools/winebuild/res16.c b/tools/winebuild/res16.c
index 4a6dddd..216d253 100644
--- a/tools/winebuild/res16.c
+++ b/tools/winebuild/res16.c
@@ -246,22 +246,22 @@ void output_res16_directory( DLLSPEC *spec )
tree = build_resource_tree( spec );
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 */
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++)
{
- output( "\t%s .L__wine_spec_resource_%lu-.L__wine_spec_dos_header,%u\n",
- get_asm_short_keyword(), (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 .L__wine_spec_resource_%lu-.L__wine_spec_dos_header,%u\n",
+ (unsigned long)(res - spec->resources), res->data_size );
+ 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 */
diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c
index 729aa2f..bd3f6fa 100644
--- a/tools/winebuild/res32.c
+++ b/tools/winebuild/res32.c
@@ -407,7 +407,7 @@ static void free_resource_tree( struct res_tree *tree )
static void output_string( const WCHAR *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] );
output( " /* " );
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 )
{
output( "\t.long 0\n" ); /* Characteristics */
output( "\t.long 0\n" ); /* TimeDateStamp */
- output( "\t%s 0,0\n", /* Major/MinorVersion */
- get_asm_short_keyword() );
- output( "\t%s %u,%u\n", /* NumberOfNamed/IdEntries */
- get_asm_short_keyword(), nb_names, nb_ids );
+ output( "\t.short 0,0\n" ); /* Major/MinorVersion */
+ output( "\t.short %u,%u\n", /* NumberOfNamed/IdEntries */
+ nb_names, nb_ids );
}
/* output the resource definitions */
diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c
index 481ed13..726dc31 100644
--- a/tools/winebuild/spec16.c
+++ b/tools/winebuild/spec16.c
@@ -110,18 +110,16 @@ static void output_entries( DLLSPEC *spec, int first, int count )
case TYPE_PASCAL:
case TYPE_VARARGS:
case TYPE_STUB:
- output( "\t%s .L__wine_%s_%u-.L__wine_spec_code_segment\n",
- get_asm_short_keyword(),
+ output( "\t.short .L__wine_%s_%u-.L__wine_spec_code_segment\n",
make_c_identifier(spec->dll_name), first + i );
break;
case TYPE_VARIABLE:
- output( "\t%s .L__wine_%s_%u-.L__wine_spec_data_segment\n",
- get_asm_short_keyword(),
+ output( "\t.short .L__wine_%s_%u-.L__wine_spec_data_segment\n",
make_c_identifier(spec->dll_name), first + i );
break;
case TYPE_ABS:
- output( "\t%s 0x%04x /* %s */\n",
- get_asm_short_keyword(), odp->u.abs.value, odp->name );
+ output( "\t.short 0x%04x /* %s */\n",
+ odp->u.abs.value, odp->name );
break;
default:
assert(0);
@@ -213,7 +211,7 @@ static void output_resident_name( const char *string, int ordinal )
output( "\t.byte 0x%02x", len );
for (i = 0; i < len; i++) output( ",0x%02x", (unsigned char)toupper(string[i]) );
output( " /* %s */\n", string );
- output( "\t%s %u\n", get_asm_short_keyword(), ordinal );
+ output( "\t.short %u\n", ordinal );
}
@@ -570,68 +568,60 @@ static void output_module16( DLLSPEC *spec )
output( "\t.data\n" );
output( "\t.align %d\n", get_alignment(4) );
output( ".L__wine_spec_dos_header:\n" );
- output( "\t%s 0x5a4d\n", get_asm_short_keyword() ); /* e_magic */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_cblp */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_cp */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_crlc */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_cparhdr */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_minalloc */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_maxalloc */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_ss */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_sp */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_csum */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_ip */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_cs */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_lfarlc */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_ovno */
- output( "\t%s 0,0,0,0\n", get_asm_short_keyword() ); /* e_res */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_oemid */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* e_oeminfo */
- output( "\t%s 0,0,0,0,0,0,0,0,0,0\n", get_asm_short_keyword() ); /* e_res2 */
+ output( "\t.short 0x5a4d\n" ); /* e_magic */
+ output( "\t.short 0\n" ); /* e_cblp */
+ output( "\t.short 0\n" ); /* e_cp */
+ output( "\t.short 0\n" ); /* e_crlc */
+ output( "\t.short 0\n" ); /* e_cparhdr */
+ output( "\t.short 0\n" ); /* e_minalloc */
+ output( "\t.short 0\n" ); /* e_maxalloc */
+ output( "\t.short 0\n" ); /* e_ss */
+ output( "\t.short 0\n" ); /* e_sp */
+ output( "\t.short 0\n" ); /* e_csum */
+ output( "\t.short 0\n" ); /* e_ip */
+ output( "\t.short 0\n" ); /* e_cs */
+ output( "\t.short 0\n" ); /* e_lfarlc */
+ output( "\t.short 0\n" ); /* e_ovno */
+ output( "\t.short 0,0,0,0\n" ); /* e_res */
+ output( "\t.short 0\n" ); /* e_oemid */
+ output( "\t.short 0\n" ); /* e_oeminfo */
+ output( "\t.short 0,0,0,0,0,0,0,0,0,0\n" ); /* e_res2 */
output( "\t.long .L__wine_spec_ne_header-.L__wine_spec_dos_header\n" );/* e_lfanew */
output( ".L__wine_spec_ne_header:\n" );
- output( "\t%s 0x454e\n", get_asm_short_keyword() ); /* ne_magic */
+ output( "\t.short 0x454e\n" ); /* ne_magic */
output( "\t.byte 0\n" ); /* ne_ver */
output( "\t.byte 0\n" ); /* ne_rev */
- output( "\t%s .L__wine_spec_ne_enttab-.L__wine_spec_ne_header\n", /* ne_enttab */
- get_asm_short_keyword() );
- output( "\t%s .L__wine_spec_ne_enttab_end-.L__wine_spec_ne_enttab\n", /* ne_cbenttab */
- get_asm_short_keyword() );
+ output( "\t.short .L__wine_spec_ne_enttab-.L__wine_spec_ne_header\n" );/* ne_enttab */
+ output( "\t.short .L__wine_spec_ne_enttab_end-.L__wine_spec_ne_enttab\n" );/* ne_cbenttab */
output( "\t.long 0\n" ); /* ne_crc */
- output( "\t%s 0x%04x\n", get_asm_short_keyword(), /* ne_flags */
- NE_FFLAGS_SINGLEDATA |
+ output( "\t.short 0x%04x\n", NE_FFLAGS_SINGLEDATA | /* ne_flags */
((spec->characteristics & IMAGE_FILE_DLL) ? NE_FFLAGS_LIBMODULE : 0) );
- output( "\t%s 2\n", get_asm_short_keyword() ); /* ne_autodata */
- output( "\t%s %u\n", get_asm_short_keyword(), spec->heap_size ); /* ne_heap */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_stack */
+ output( "\t.short 2\n" ); /* ne_autodata */
+ output( "\t.short %u\n", spec->heap_size ); /* ne_heap */
+ output( "\t.short 0\n" ); /* ne_stack */
if (!entry_point) output( "\t.long 0\n" ); /* ne_csip */
- else output( "\t%s .L__wine_%s_0-.L__wine_spec_code_segment,1\n",
- get_asm_short_keyword(), make_c_identifier(spec->dll_name) );
- output( "\t%s 0,2\n", get_asm_short_keyword() ); /* ne_sssp */
- output( "\t%s 2\n", get_asm_short_keyword() ); /* ne_cseg */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_cmod */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_cbnrestab */
- output( "\t%s .L__wine_spec_ne_segtab-.L__wine_spec_ne_header\n", /* ne_segtab */
- get_asm_short_keyword() );
- output( "\t%s .L__wine_spec_ne_rsrctab-.L__wine_spec_ne_header\n", /* ne_rsrctab */
- get_asm_short_keyword() );
- output( "\t%s .L__wine_spec_ne_restab-.L__wine_spec_ne_header\n", /* ne_restab */
- get_asm_short_keyword() );
- output( "\t%s .L__wine_spec_ne_modtab-.L__wine_spec_ne_header\n", /* ne_modtab */
- get_asm_short_keyword() );
- output( "\t%s .L__wine_spec_ne_imptab-.L__wine_spec_ne_header\n", /* ne_imptab */
- get_asm_short_keyword() );
+ else output( "\t.short .L__wine_%s_0-.L__wine_spec_code_segment,1\n",
+ make_c_identifier(spec->dll_name) );
+ output( "\t.short 0,2\n" ); /* ne_sssp */
+ output( "\t.short 2\n" ); /* ne_cseg */
+ output( "\t.short 0\n" ); /* ne_cmod */
+ output( "\t.short 0\n" ); /* ne_cbnrestab */
+ output( "\t.short .L__wine_spec_ne_segtab-.L__wine_spec_ne_header\n" );/* ne_segtab */
+ output( "\t.short .L__wine_spec_ne_rsrctab-.L__wine_spec_ne_header\n" ); /* ne_rsrctab */
+ output( "\t.short .L__wine_spec_ne_restab-.L__wine_spec_ne_header\n" ); /* ne_restab */
+ output( "\t.short .L__wine_spec_ne_modtab-.L__wine_spec_ne_header\n" ); /* ne_modtab */
+ output( "\t.short .L__wine_spec_ne_imptab-.L__wine_spec_ne_header\n" ); /* ne_imptab */
output( "\t.long 0\n" ); /* ne_nrestab */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_cmovent */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_align */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_cres */
+ output( "\t.short 0\n" ); /* ne_cmovent */
+ output( "\t.short 0\n" ); /* ne_align */
+ output( "\t.short 0\n" ); /* ne_cres */
output( "\t.byte 0x02\n" ); /* ne_exetyp = NE_OSFLAGS_WINDOWS */
output( "\t.byte 0x08\n" ); /* ne_flagsothers = NE_AFLAGS_FASTLOAD */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_pretthunks */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_psegrefbytes */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_swaparea */
- output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_expver */
+ output( "\t.short 0\n" ); /* ne_pretthunks */
+ output( "\t.short 0\n" ); /* ne_psegrefbytes */
+ output( "\t.short 0\n" ); /* ne_swaparea */
+ output( "\t.short 0\n" ); /* ne_expver */
/* segment table */
@@ -639,23 +629,17 @@ static void output_module16( DLLSPEC *spec )
/* code segment entry */
- output( "\t%s .L__wine_spec_code_segment-.L__wine_spec_dos_header\n", /* filepos */
- get_asm_short_keyword() );
- output( "\t%s .L__wine_spec_code_segment_end-.L__wine_spec_code_segment\n", /* size */
- get_asm_short_keyword() );
- output( "\t%s 0x2000\n", get_asm_short_keyword() ); /* flags = NE_SEGFLAGS_32BIT */
- output( "\t%s .L__wine_spec_code_segment_end-.L__wine_spec_code_segment\n", /* minsize */
- get_asm_short_keyword() );
+ output( "\t.short .L__wine_spec_code_segment-.L__wine_spec_dos_header\n" ); /* filepos */
+ output( "\t.short .L__wine_spec_code_segment_end-.L__wine_spec_code_segment\n" ); /* size */
+ output( "\t.short 0x2000\n" ); /* flags = NE_SEGFLAGS_32BIT */
+ output( "\t.short .L__wine_spec_code_segment_end-.L__wine_spec_code_segment\n" ); /* minsize */
/* data segment entry */
- output( "\t%s .L__wine_spec_data_segment-.L__wine_spec_dos_header\n", /* filepos */
- get_asm_short_keyword() );
- output( "\t%s .L__wine_spec_data_segment_end-.L__wine_spec_data_segment\n", /* size */
- get_asm_short_keyword() );
- output( "\t%s 0x0001\n", get_asm_short_keyword() ); /* flags = NE_SEGFLAGS_DATA */
- output( "\t%s .L__wine_spec_data_segment_end-.L__wine_spec_data_segment\n", /* minsize */
- get_asm_short_keyword() );
+ output( "\t.short .L__wine_spec_data_segment-.L__wine_spec_dos_header\n" ); /* filepos */
+ output( "\t.short .L__wine_spec_data_segment_end-.L__wine_spec_data_segment\n" ); /* size */
+ output( "\t.short 0x0001\n" ); /* flags = NE_SEGFLAGS_DATA */
+ output( "\t.short .L__wine_spec_data_segment_end-.L__wine_spec_data_segment\n" ); /* minsize */
/* resource directory */
@@ -762,7 +746,7 @@ static void output_module16( DLLSPEC *spec )
/* the movl is here so that the code contains only valid instructions, */
/* it's never actually executed, we only care about the arg_types[] values */
- output( "\t%s 0x86c7\n", get_asm_short_keyword() );
+ output( "\t.short 0x86c7\n" );
output( "\t.long 0x%08x,0x%08x\n", arg_types[0], arg_types[1] );
}
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index f6c8cd2..ae739d8 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -38,7 +38,6 @@
#define IMAGE_FILE_MACHINE_AMD64 0x8664
#define IMAGE_FILE_MACHINE_ARMNT 0x01C4
/* Wine extension */
-#define IMAGE_FILE_MACHINE_SPARC 0x2000
#define IMAGE_FILE_MACHINE_ARM64 0x01C5
#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER 224
@@ -364,12 +363,11 @@ void output_exports( DLLSPEC *spec )
output( "\n.L__wine_spec_exp_ordinals:\n" );
for (i = 0; i < spec->nb_names; i++)
{
- output( "\t%s %d\n",
- get_asm_short_keyword(), spec->names[i]->ordinal - spec->base );
+ output( "\t.short %d\n", spec->names[i]->ordinal - spec->base );
}
if (spec->nb_names % 2)
{
- output( "\t%s 0\n", get_asm_short_keyword() );
+ output( "\t.short 0\n" );
}
}
@@ -439,11 +437,6 @@ static void output_asm_constructor( const char *constructor )
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tcall %s\n", asm_name(constructor) );
break;
- case CPU_SPARC:
- output( "\n\t.section \".init\",\"ax\"\n" );
- output( "\tcall %s\n", asm_name(constructor) );
- output( "\tnop\n" );
- break;
case CPU_ARM:
output( "\n\t.section \".text\",\"ax\"\n" );
output( "\tblx %s\n", asm_name(constructor) );
@@ -488,7 +481,6 @@ void output_module( DLLSPEC *spec )
{
case CPU_x86:
case CPU_x86_64:
- case CPU_SPARC:
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tjmp 1f\n" );
break;
@@ -520,25 +512,21 @@ void output_module( DLLSPEC *spec )
{
case CPU_x86: machine = IMAGE_FILE_MACHINE_I386; break;
case CPU_x86_64: machine = IMAGE_FILE_MACHINE_AMD64; break;
+ case CPU_POWERPC: machine = IMAGE_FILE_MACHINE_POWERPC; break;
case CPU_ARM: machine = IMAGE_FILE_MACHINE_ARMNT; break;
case CPU_ARM64: machine = IMAGE_FILE_MACHINE_ARM64; break;
- case CPU_POWERPC: machine = IMAGE_FILE_MACHINE_POWERPC; break;
- case CPU_SPARC: machine = IMAGE_FILE_MACHINE_SPARC; break;
}
- output( "\t%s 0x%04x\n", /* Machine */
- get_asm_short_keyword(), machine );
- output( "\t%s 0\n", /* NumberOfSections */
- get_asm_short_keyword() );
+ output( "\t.short 0x%04x\n", /* Machine */
+ machine );
+ output( "\t.short 0\n" ); /* NumberOfSections */
output( "\t.long 0\n" ); /* TimeDateStamp */
output( "\t.long 0\n" ); /* PointerToSymbolTable */
output( "\t.long 0\n" ); /* NumberOfSymbols */
- output( "\t%s %d\n", /* SizeOfOptionalHeader */
- get_asm_short_keyword(),
+ output( "\t.short %d\n", /* SizeOfOptionalHeader */
get_ptr_size() == 8 ? IMAGE_SIZEOF_NT_OPTIONAL64_HEADER : IMAGE_SIZEOF_NT_OPTIONAL32_HEADER );
- output( "\t%s 0x%04x\n", /* Characteristics */
- get_asm_short_keyword(), spec->characteristics );
- output( "\t%s 0x%04x\n", /* Magic */
- get_asm_short_keyword(),
+ output( "\t.short 0x%04x\n", /* Characteristics */
+ spec->characteristics );
+ output( "\t.short 0x%04x\n", /* 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" ); /* MinorLinkerVersion */
@@ -557,21 +545,19 @@ void output_module( DLLSPEC *spec )
get_asm_ptr_keyword() );
output( "\t.long %u\n", page_size ); /* SectionAlignment */
output( "\t.long %u\n", page_size ); /* FileAlignment */
- output( "\t%s 1,0\n", /* Major/MinorOperatingSystemVersion */
- get_asm_short_keyword() );
- output( "\t%s 0,0\n", /* Major/MinorImageVersion */
- get_asm_short_keyword() );
- output( "\t%s %u,%u\n", /* Major/MinorSubsystemVersion */
- get_asm_short_keyword(), spec->subsystem_major, spec->subsystem_minor );
+ output( "\t.short 1,0\n" ); /* Major/MinorOperatingSystemVersion */
+ output( "\t.short 0,0\n" ); /* Major/MinorImageVersion */
+ output( "\t.short %u,%u\n", /* Major/MinorSubsystemVersion */
+ spec->subsystem_major, spec->subsystem_minor );
output( "\t.long 0\n" ); /* Win32VersionValue */
output( "\t.long %s-.L__wine_spec_rva_base\n", /* SizeOfImage */
asm_name("_end") );
output( "\t.long %u\n", page_size ); /* SizeOfHeaders */
output( "\t.long 0\n" ); /* CheckSum */
- output( "\t%s 0x%04x\n", /* Subsystem */
- get_asm_short_keyword(), spec->subsystem );
- output( "\t%s 0x%04x\n", /* DllCharacteristics */
- get_asm_short_keyword(), spec->dll_characteristics );
+ output( "\t.short 0x%04x\n", /* Subsystem */
+ spec->subsystem );
+ output( "\t.short 0x%04x\n", /* DllCharacteristics */
+ spec->dll_characteristics );
output( "\t%s %u,%u\n", /* SizeOfStackReserve/Commit */
get_asm_ptr_keyword(), (spec->stack_size ? spec->stack_size : 1024) * 1024, page_size );
output( "\t%s %u,%u\n", /* SizeOfHeapReserve/Commit */
@@ -709,7 +695,6 @@ void output_fake_module( DLLSPEC *spec )
case CPU_x86: put_word( IMAGE_FILE_MACHINE_I386 ); break;
case CPU_x86_64: put_word( IMAGE_FILE_MACHINE_AMD64 ); break;
case CPU_POWERPC: put_word( IMAGE_FILE_MACHINE_POWERPC ); break;
- case CPU_SPARC: put_word( IMAGE_FILE_MACHINE_SPARC ); break;
case CPU_ARM: put_word( IMAGE_FILE_MACHINE_ARMNT ); break;
case CPU_ARM64: put_word( IMAGE_FILE_MACHINE_ARM64 ); break;
}
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index 262ff3a..19dbdc6 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -56,7 +56,6 @@ static const struct
{ "i786", CPU_x86 },
{ "amd64", CPU_x86_64 },
{ "x86_64", CPU_x86_64 },
- { "sparc", CPU_SPARC },
{ "powerpc", CPU_POWERPC },
{ "arm", CPU_ARM },
{ "arm64", CPU_ARM64 },
@@ -894,7 +893,6 @@ unsigned int get_alignment(unsigned int align)
{
case CPU_x86:
case CPU_x86_64:
- case CPU_SPARC:
if (target_platform != PLATFORM_APPLE) return align;
/* fall through */
case CPU_POWERPC:
@@ -919,7 +917,6 @@ unsigned int get_page_size(void)
case CPU_POWERPC: return 4096;
case CPU_ARM: return 4096;
case CPU_ARM64: return 4096;
- case CPU_SPARC: return 8192;
}
/* unreached */
assert(0);
@@ -933,7 +930,6 @@ unsigned int get_ptr_size(void)
{
case CPU_x86:
case CPU_POWERPC:
- case CPU_SPARC:
case CPU_ARM:
return 4;
case CPU_x86_64:
@@ -1115,14 +1111,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)
{
switch (target_platform)
--
1.8.0
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list