winebuild: Create stubs for ARM

André Hentschel nerv at dawncrow.de
Thu Sep 8 17:09:10 CDT 2011


this improves the testresults, as some tests expect to get stubs through GetProcAddress but never use them.
---
 tools/winebuild/import.c |   19 +++++++++++++++++++
 tools/winebuild/parser.c |    4 ++--
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 00c030b..50792ca 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1255,6 +1255,25 @@ void output_stubs( DLLSPEC *spec )
                 output( "\tmovq $%d,%%rsi\n", odp->ordinal );
             output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") );
             break;
+        case CPU_ARM:
+            output( "\tldr r0,[PC,#0]\n");
+            output( "\tmov PC,PC\n");
+            output( "\t.long .L__wine_spec_file_name\n" );
+            if (exp_name)
+            {
+                output( "\tldr r1,[PC,#0]\n");
+                output( "\tmov PC,PC\n");
+                output( "\t.long .L%s_string\n", name );
+                count++;
+            }
+            else
+            {
+                output( "\tldr r1,[PC,#0]\n");
+                output( "\tmov PC,PC\n");
+                output( "\t.long %d\n", odp->ordinal );
+            }
+            output( "\tbl %s\n", asm_name("__wine_spec_unimplemented_stub") );
+            break;
         default:
             assert(0);
         }
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index 6a1eb85..1e23e3c 100644
--- a/tools/winebuild/parser.c
+++ b/tools/winebuild/parser.c
@@ -403,9 +403,9 @@ static int parse_spec_stub( ORDDEF *odp, DLLSPEC *spec )
     odp->link_name = xstrdup("");
     /* don't bother generating stubs for Winelib */
     if (odp->flags & FLAG_CPU_MASK)
-        odp->flags &= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64);
+        odp->flags &= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64) | FLAG_CPU(CPU_ARM);
     else
-        odp->flags |= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64);
+        odp->flags |= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64) | FLAG_CPU(CPU_ARM);
 
     return parse_spec_arguments( odp, spec, 1 );
 }
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list