Skip to content

Commit

Permalink
* testsuite/ifunc.h (IFUNC_ASM): Add s390x and s390 version.
Browse files Browse the repository at this point in the history
git-svn-id: http://sourceware.org/svn/prelink@208 94c539fb-cf18-0410-b60f-edeeb537fa16
  • Loading branch information
jakub committed Oct 1, 2013
1 parent 77003a3 commit b6bceb1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions trunk/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2013-10-01 Jakub Jelinek <[email protected]>

* testsuite/ifunc.h (IFUNC_ASM): Add s390x and s390 version.

2013-09-30 Richard Sandiford <[email protected]>

* src/arch-s390.c (s390_prelink_conflict_rela): Fix handling of
Expand Down
16 changes: 16 additions & 0 deletions trunk/testsuite/ifunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ asm (".text\n" \
IFUNC_ASM (PICK (fn1, fn2)) \
"\t.size " #name ", .-.L" #name "\n")
# endif
#elif defined __s390x__
# define IFUNC_ASM(fn) "\tlarl %r2," fn "\n" \
"\tbr %r14\n"
#elif defined __s390__
# define IFUNC_ASM(fn) "\t" \
"\tst %r12,48(%r15)\n" \
"\tbasr %r5,0\n" \
"1:\tl %r12,3f-1b(%r5)\n" \
"\tl %r1,2f-1b(%r5)\n" \
"\tla %r12,0(%r12,%r5)\n" \
"\tla %r2,0(%r1,%r12)\n" \
"\tl %r12,48(%r15)\n" \
"\tbr %r14\n" \
"\t.align 4\n" \
"2:\t.long " fn "@GOTOFF\n" \
"3:\t.long _GLOBAL_OFFSET_TABLE_-1b\n"
#else
# error Architecture not supported
#endif
Expand Down

0 comments on commit b6bceb1

Please sign in to comment.