From 4b3eaf1b66b4807b437023180800fed2e0bc965b Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Wed, 21 Jun 2017 17:08:28 +0300 Subject: [PATCH] Tag functions in asm properly. Thanks to Matthias Klose for debugging the issue. --- test cases/common/127 cpp and asm/retval-arm.S | 7 +++++-- test cases/common/127 cpp and asm/retval-x86.S | 7 +++++-- test cases/common/127 cpp and asm/retval-x86_64.S | 7 +++++-- test cases/common/141 c cpp and asm/retval-arm.S | 7 +++++-- test cases/common/141 c cpp and asm/retval-x86.S | 8 ++++++-- test cases/common/141 c cpp and asm/retval-x86_64.S | 7 +++++-- 6 files changed, 31 insertions(+), 12 deletions(-) diff --git a/test cases/common/127 cpp and asm/retval-arm.S b/test cases/common/127 cpp and asm/retval-arm.S index 8b3719765..a8923624a 100644 --- a/test cases/common/127 cpp and asm/retval-arm.S +++ b/test cases/common/127 cpp and asm/retval-arm.S @@ -2,7 +2,10 @@ .text .globl SYMBOL_NAME(get_retval) +# ifdef __linux__ +.type get_retval, %function +#endif SYMBOL_NAME(get_retval): - mov r0, #0 - mov pc, lr + mov r0, #0 + mov pc, lr diff --git a/test cases/common/127 cpp and asm/retval-x86.S b/test cases/common/127 cpp and asm/retval-x86.S index 06bd75c28..f9e819070 100644 --- a/test cases/common/127 cpp and asm/retval-x86.S +++ b/test cases/common/127 cpp and asm/retval-x86.S @@ -2,7 +2,10 @@ .text .globl SYMBOL_NAME(get_retval) +# ifdef __linux__ +.type get_retval, %function +#endif SYMBOL_NAME(get_retval): - xorl %eax, %eax - retl + xorl %eax, %eax + retl diff --git a/test cases/common/127 cpp and asm/retval-x86_64.S b/test cases/common/127 cpp and asm/retval-x86_64.S index 638921e3e..1a5f3eb23 100644 --- a/test cases/common/127 cpp and asm/retval-x86_64.S +++ b/test cases/common/127 cpp and asm/retval-x86_64.S @@ -2,7 +2,10 @@ .text .globl SYMBOL_NAME(get_retval) +# ifdef __linux__ +.type get_retval, %function +#endif SYMBOL_NAME(get_retval): - xorl %eax, %eax - retq + xorl %eax, %eax + retq diff --git a/test cases/common/141 c cpp and asm/retval-arm.S b/test cases/common/141 c cpp and asm/retval-arm.S index 8b3719765..a8923624a 100644 --- a/test cases/common/141 c cpp and asm/retval-arm.S +++ b/test cases/common/141 c cpp and asm/retval-arm.S @@ -2,7 +2,10 @@ .text .globl SYMBOL_NAME(get_retval) +# ifdef __linux__ +.type get_retval, %function +#endif SYMBOL_NAME(get_retval): - mov r0, #0 - mov pc, lr + mov r0, #0 + mov pc, lr diff --git a/test cases/common/141 c cpp and asm/retval-x86.S b/test cases/common/141 c cpp and asm/retval-x86.S index 06bd75c28..3cb023764 100644 --- a/test cases/common/141 c cpp and asm/retval-x86.S +++ b/test cases/common/141 c cpp and asm/retval-x86.S @@ -2,7 +2,11 @@ .text .globl SYMBOL_NAME(get_retval) +/* Only supported on Linux with GAS */ +# ifdef __linux__ +.type get_retval, %function +#endif SYMBOL_NAME(get_retval): - xorl %eax, %eax - retl + xorl %eax, %eax + retl diff --git a/test cases/common/141 c cpp and asm/retval-x86_64.S b/test cases/common/141 c cpp and asm/retval-x86_64.S index 638921e3e..1a5f3eb23 100644 --- a/test cases/common/141 c cpp and asm/retval-x86_64.S +++ b/test cases/common/141 c cpp and asm/retval-x86_64.S @@ -2,7 +2,10 @@ .text .globl SYMBOL_NAME(get_retval) +# ifdef __linux__ +.type get_retval, %function +#endif SYMBOL_NAME(get_retval): - xorl %eax, %eax - retq + xorl %eax, %eax + retq