Please review, i'll commit it, just need an OK.
diff --git a/mingw-w64-crt/misc/mingw_getsp.S b/mingw-w64-crt/misc/mingw_getsp.S
index 517a351..e15a0f4 100644
--- a/mingw-w64-crt/misc/mingw_getsp.S
+++ b/mingw-w64-crt/misc/mingw_getsp.S
@@ -12,26 +12,39 @@
#else
.align 4
#endif
-.globl __MINGW_USYMBOL(mingw_getsp)
+ .globl __MINGW_USYMBOL(mingw_getsp)
.def __MINGW_USYMBOL(mingw_getsp); .scl 2; .type 32; .endef
__MINGW_USYMBOL(mingw_getsp):
-#ifdef _WIN64
+#if defined(_AMD64_) || defined(__x86_64__)
leaq 8(%rsp),%rax
-#else
+ ret
+#elif defined(_X86_) || defined(__i386__)
lea 4(%esp),%eax
-#endif
ret
+#elif defined(_ARM_) || defined(__arm__)
+ mov r0, sp
+ bx lr
+#endif
-.globl __MINGW_USYMBOL(longjmp)
+/* On ARM:
+ * Error: cannot represent BFD_RELOC_32_PCREL relocation in this object file format
+ * But anyway, nothing is needed here as libarm32/libmsvcrt.a is exporting longjmp
+ ldr ip, 1f
+ ldr pc, [pc, ip]
+ 1: .long __imp_longjmp - (1b + 4)
+*/
+#if !(defined(_ARM_) || defined(__arm__))
+ .globl __MINGW_USYMBOL(longjmp)
.def __MINGW_USYMBOL(longjmp); .scl 2; .type 32; .endef
__MINGW_USYMBOL(longjmp):
-#ifdef _WIN64
+#if defined(_AMD64_) || defined(__x86_64__)
#ifndef __SEH__
xorl %eax,%eax
movl %eax, (%rcx)
#endif
leaq __MINGW_IMP_LSYMBOL(longjmp)(%rip), %rax
jmpq *(%rax)
-#else
+#elif defined(_X86_) || defined(__i386__)
jmp *__imp__longjmp
#endif
+#endif /* !(defined(_ARM_) || defined(__arm__)) */
diff --git a/mingw-w64-crt/stdio/vfscanf2.S b/mingw-w64-crt/stdio/vfscanf2.S
index e3586eb..f6ba5d6 100644
--- a/mingw-w64-crt/stdio/vfscanf2.S
+++ b/mingw-w64-crt/stdio/vfscanf2.S
@@ -20,7 +20,11 @@ FCT:
#ifdef _WIN64
.seh_endprologue
#endif
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
jmp FWD
+#elif defined(_ARM_) || defined(__arm__)
+ b FWD
+#endif
#ifdef _WIN64
.seh_endproc
#endif
diff --git a/mingw-w64-crt/stdio/vfwscanf2.S b/mingw-w64-crt/stdio/vfwscanf2.S
index e3cd28c..c27fb7d 100644
--- a/mingw-w64-crt/stdio/vfwscanf2.S
+++ b/mingw-w64-crt/stdio/vfwscanf2.S
@@ -20,7 +20,11 @@ FCT:
#ifdef _WIN64
.seh_endprologue
#endif
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
jmp FWD
+#elif defined(_ARM_) || defined(__arm__)
+ b FWD
+#endif
#ifdef _WIN64
.seh_endproc
#endif
diff --git a/mingw-w64-crt/stdio/vscanf2.S b/mingw-w64-crt/stdio/vscanf2.S
index 191a48a..4114cd0 100644
--- a/mingw-w64-crt/stdio/vscanf2.S
+++ b/mingw-w64-crt/stdio/vscanf2.S
@@ -20,7 +20,11 @@ FCT:
#ifdef _WIN64
.seh_endprologue
#endif
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
jmp FWD
+#elif defined(_ARM_) || defined(__arm__)
+ b FWD
+#endif
#ifdef _WIN64
.seh_endproc
#endif
diff --git a/mingw-w64-crt/stdio/vsscanf2.S b/mingw-w64-crt/stdio/vsscanf2.S
index 7e1ffc2..5f814bb 100644
--- a/mingw-w64-crt/stdio/vsscanf2.S
+++ b/mingw-w64-crt/stdio/vsscanf2.S
@@ -20,7 +20,11 @@ FCT:
#ifdef _WIN64
.seh_endprologue
#endif
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
jmp FWD
+#elif defined(_ARM_) || defined(__arm__)
+ b FWD
+#endif
#ifdef _WIN64
.seh_endproc
#endif
diff --git a/mingw-w64-crt/stdio/vswscanf2.S b/mingw-w64-crt/stdio/vswscanf2.S
index 8b20c31a..87cbe2d 100644
--- a/mingw-w64-crt/stdio/vswscanf2.S
+++ b/mingw-w64-crt/stdio/vswscanf2.S
@@ -20,7 +20,11 @@ FCT:
#ifdef _WIN64
.seh_endprologue
#endif
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
jmp FWD
+#elif defined(_ARM_) || defined(__arm__)
+ b FWD
+#endif
#ifdef _WIN64
.seh_endproc
#endif
diff --git a/mingw-w64-crt/stdio/vwscanf2.S b/mingw-w64-crt/stdio/vwscanf2.S
index f1e2cb5..c4c6716 100644
--- a/mingw-w64-crt/stdio/vwscanf2.S
+++ b/mingw-w64-crt/stdio/vwscanf2.S
@@ -20,7 +20,11 @@ FCT:
#ifdef _WIN64
.seh_endprologue
#endif
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
jmp FWD
+#elif defined(_ARM_) || defined(__arm__)
+ b FWD
+#endif
#ifdef _WIN64
.seh_endproc
#endif
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public