Skip to content

Commit

Permalink
Add __USER_LABEL_PREFIX__ to the asm names for targets that need it.
Browse files Browse the repository at this point in the history
2018-08-16  Iain Sandoe <[email protected]>

gcc/testsuite

        * gcc.dg/memcmp-1.c (lib_memcmp): Apply __USER_LABEL_PREFIX__.
        (lib_strncmp): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263586 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
iains committed Aug 16, 2018
1 parent c872cfd commit f049a00
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2018-08-16 Iain Sandoe <[email protected]>

* gcc.dg/memcmp-1.c (lib_memcmp): Apply __USER_LABEL_PREFIX__.
(lib_strncmp): Likewise.

2018-08-16 Iain Sandoe <[email protected]>

* c-c++-common/asan/pointer-subtract-3.c: Skip for Darwin.
Expand Down
9 changes: 7 additions & 2 deletions gcc/testsuite/gcc.dg/memcmp-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@
#include <string.h>
#include <stdint.h>

int lib_memcmp(const void *a, const void *b, size_t n) asm("memcmp");
int lib_strncmp(const char *a, const char *b, size_t n) asm("strncmp");
#define STR1(X) #X
#define STR2(X) STR1(X)

int lib_memcmp(const void *a, const void *b, size_t n)
asm(STR2(__USER_LABEL_PREFIX__) "memcmp");
int lib_strncmp(const char *a, const char *b, size_t n)
asm(STR2(__USER_LABEL_PREFIX__) "strncmp");

#ifndef NRAND
#ifdef TEST_ALL
Expand Down

0 comments on commit f049a00

Please sign in to comment.