This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch hjl/cet/master created. glibc-2.26.9000-1115-gcedcc4d
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 9 Jan 2018 14:13:46 -0000
- Subject: GNU C Library master sources branch hjl/cet/master created. glibc-2.26.9000-1115-gcedcc4d
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/cet/master has been created
at cedcc4d7951eb97d30500cae6e38cdeae17dba1c (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cedcc4d7951eb97d30500cae6e38cdeae17dba1c
commit cedcc4d7951eb97d30500cae6e38cdeae17dba1c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 16:12:20 2018 -0800
i386: Use INDIRECT_JUMP_ENTRY in memset-sse2-rep.S
* sysdeps/i386/i686/multiarch/memset-sse2-rep.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
index 9d6648b..ef5e7ef 100644
--- a/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
+++ b/sysdeps/i386/i686/multiarch/memset-sse2-rep.S
@@ -146,80 +146,80 @@ L(table_less_32bytes):
.popsection
ALIGN (4)
-L(write_28bytes):
+INDIRECT_JUMP_ENTRY(write_28bytes)
movl %eax, -28(%edx)
-L(write_24bytes):
+INDIRECT_JUMP_ENTRY(write_24bytes)
movl %eax, -24(%edx)
-L(write_20bytes):
+INDIRECT_JUMP_ENTRY(write_20bytes)
movl %eax, -20(%edx)
-L(write_16bytes):
+INDIRECT_JUMP_ENTRY(write_16bytes)
movl %eax, -16(%edx)
-L(write_12bytes):
+INDIRECT_JUMP_ENTRY(write_12bytes)
movl %eax, -12(%edx)
-L(write_8bytes):
+INDIRECT_JUMP_ENTRY(write_8bytes)
movl %eax, -8(%edx)
-L(write_4bytes):
+INDIRECT_JUMP_ENTRY(write_4bytes)
movl %eax, -4(%edx)
-L(write_0bytes):
+INDIRECT_JUMP_ENTRY(write_0bytes)
SETRTNVAL
RETURN
ALIGN (4)
-L(write_29bytes):
+INDIRECT_JUMP_ENTRY(write_29bytes)
movl %eax, -29(%edx)
-L(write_25bytes):
+INDIRECT_JUMP_ENTRY(write_25bytes)
movl %eax, -25(%edx)
-L(write_21bytes):
+INDIRECT_JUMP_ENTRY(write_21bytes)
movl %eax, -21(%edx)
-L(write_17bytes):
+INDIRECT_JUMP_ENTRY(write_17bytes)
movl %eax, -17(%edx)
-L(write_13bytes):
+INDIRECT_JUMP_ENTRY(write_13bytes)
movl %eax, -13(%edx)
-L(write_9bytes):
+INDIRECT_JUMP_ENTRY(write_9bytes)
movl %eax, -9(%edx)
-L(write_5bytes):
+INDIRECT_JUMP_ENTRY(write_5bytes)
movl %eax, -5(%edx)
-L(write_1bytes):
+INDIRECT_JUMP_ENTRY(write_1bytes)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(write_30bytes):
+INDIRECT_JUMP_ENTRY(write_30bytes)
movl %eax, -30(%edx)
-L(write_26bytes):
+INDIRECT_JUMP_ENTRY(write_26bytes)
movl %eax, -26(%edx)
-L(write_22bytes):
+INDIRECT_JUMP_ENTRY(write_22bytes)
movl %eax, -22(%edx)
-L(write_18bytes):
+INDIRECT_JUMP_ENTRY(write_18bytes)
movl %eax, -18(%edx)
-L(write_14bytes):
+INDIRECT_JUMP_ENTRY(write_14bytes)
movl %eax, -14(%edx)
-L(write_10bytes):
+INDIRECT_JUMP_ENTRY(write_10bytes)
movl %eax, -10(%edx)
-L(write_6bytes):
+INDIRECT_JUMP_ENTRY(write_6bytes)
movl %eax, -6(%edx)
-L(write_2bytes):
+INDIRECT_JUMP_ENTRY(write_2bytes)
movw %ax, -2(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(write_31bytes):
+INDIRECT_JUMP_ENTRY(write_31bytes)
movl %eax, -31(%edx)
-L(write_27bytes):
+INDIRECT_JUMP_ENTRY(write_27bytes)
movl %eax, -27(%edx)
-L(write_23bytes):
+INDIRECT_JUMP_ENTRY(write_23bytes)
movl %eax, -23(%edx)
-L(write_19bytes):
+INDIRECT_JUMP_ENTRY(write_19bytes)
movl %eax, -19(%edx)
-L(write_15bytes):
+INDIRECT_JUMP_ENTRY(write_15bytes)
movl %eax, -15(%edx)
-L(write_11bytes):
+INDIRECT_JUMP_ENTRY(write_11bytes)
movl %eax, -11(%edx)
-L(write_7bytes):
+INDIRECT_JUMP_ENTRY(write_7bytes)
movl %eax, -7(%edx)
-L(write_3bytes):
+INDIRECT_JUMP_ENTRY(write_3bytes)
movw %ax, -3(%edx)
movb %al, -1(%edx)
SETRTNVAL
@@ -471,163 +471,163 @@ L(table_16_128bytes):
.popsection
ALIGN (4)
-L(aligned_16_112bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_112bytes)
movdqa %xmm0, -112(%edx)
-L(aligned_16_96bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_96bytes)
movdqa %xmm0, -96(%edx)
-L(aligned_16_80bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_80bytes)
movdqa %xmm0, -80(%edx)
-L(aligned_16_64bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_64bytes)
movdqa %xmm0, -64(%edx)
-L(aligned_16_48bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_48bytes)
movdqa %xmm0, -48(%edx)
-L(aligned_16_32bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_32bytes)
movdqa %xmm0, -32(%edx)
-L(aligned_16_16bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_16bytes)
movdqa %xmm0, -16(%edx)
-L(aligned_16_0bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_0bytes)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_113bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_113bytes)
movdqa %xmm0, -113(%edx)
-L(aligned_16_97bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_97bytes)
movdqa %xmm0, -97(%edx)
-L(aligned_16_81bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_81bytes)
movdqa %xmm0, -81(%edx)
-L(aligned_16_65bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_65bytes)
movdqa %xmm0, -65(%edx)
-L(aligned_16_49bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_49bytes)
movdqa %xmm0, -49(%edx)
-L(aligned_16_33bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_33bytes)
movdqa %xmm0, -33(%edx)
-L(aligned_16_17bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_17bytes)
movdqa %xmm0, -17(%edx)
-L(aligned_16_1bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_1bytes)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_114bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_114bytes)
movdqa %xmm0, -114(%edx)
-L(aligned_16_98bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_98bytes)
movdqa %xmm0, -98(%edx)
-L(aligned_16_82bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_82bytes)
movdqa %xmm0, -82(%edx)
-L(aligned_16_66bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_66bytes)
movdqa %xmm0, -66(%edx)
-L(aligned_16_50bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_50bytes)
movdqa %xmm0, -50(%edx)
-L(aligned_16_34bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_34bytes)
movdqa %xmm0, -34(%edx)
-L(aligned_16_18bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_18bytes)
movdqa %xmm0, -18(%edx)
-L(aligned_16_2bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_2bytes)
movw %ax, -2(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_115bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_115bytes)
movdqa %xmm0, -115(%edx)
-L(aligned_16_99bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_99bytes)
movdqa %xmm0, -99(%edx)
-L(aligned_16_83bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_83bytes)
movdqa %xmm0, -83(%edx)
-L(aligned_16_67bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_67bytes)
movdqa %xmm0, -67(%edx)
-L(aligned_16_51bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_51bytes)
movdqa %xmm0, -51(%edx)
-L(aligned_16_35bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_35bytes)
movdqa %xmm0, -35(%edx)
-L(aligned_16_19bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_19bytes)
movdqa %xmm0, -19(%edx)
-L(aligned_16_3bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_3bytes)
movw %ax, -3(%edx)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_116bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_116bytes)
movdqa %xmm0, -116(%edx)
-L(aligned_16_100bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_100bytes)
movdqa %xmm0, -100(%edx)
-L(aligned_16_84bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_84bytes)
movdqa %xmm0, -84(%edx)
-L(aligned_16_68bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_68bytes)
movdqa %xmm0, -68(%edx)
-L(aligned_16_52bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_52bytes)
movdqa %xmm0, -52(%edx)
-L(aligned_16_36bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_36bytes)
movdqa %xmm0, -36(%edx)
-L(aligned_16_20bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_20bytes)
movdqa %xmm0, -20(%edx)
-L(aligned_16_4bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_4bytes)
movl %eax, -4(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_117bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_117bytes)
movdqa %xmm0, -117(%edx)
-L(aligned_16_101bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_101bytes)
movdqa %xmm0, -101(%edx)
-L(aligned_16_85bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_85bytes)
movdqa %xmm0, -85(%edx)
-L(aligned_16_69bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_69bytes)
movdqa %xmm0, -69(%edx)
-L(aligned_16_53bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_53bytes)
movdqa %xmm0, -53(%edx)
-L(aligned_16_37bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_37bytes)
movdqa %xmm0, -37(%edx)
-L(aligned_16_21bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_21bytes)
movdqa %xmm0, -21(%edx)
-L(aligned_16_5bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_5bytes)
movl %eax, -5(%edx)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_118bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_118bytes)
movdqa %xmm0, -118(%edx)
-L(aligned_16_102bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_102bytes)
movdqa %xmm0, -102(%edx)
-L(aligned_16_86bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_86bytes)
movdqa %xmm0, -86(%edx)
-L(aligned_16_70bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_70bytes)
movdqa %xmm0, -70(%edx)
-L(aligned_16_54bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_54bytes)
movdqa %xmm0, -54(%edx)
-L(aligned_16_38bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_38bytes)
movdqa %xmm0, -38(%edx)
-L(aligned_16_22bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_22bytes)
movdqa %xmm0, -22(%edx)
-L(aligned_16_6bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_6bytes)
movl %eax, -6(%edx)
movw %ax, -2(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_119bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_119bytes)
movdqa %xmm0, -119(%edx)
-L(aligned_16_103bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_103bytes)
movdqa %xmm0, -103(%edx)
-L(aligned_16_87bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_87bytes)
movdqa %xmm0, -87(%edx)
-L(aligned_16_71bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_71bytes)
movdqa %xmm0, -71(%edx)
-L(aligned_16_55bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_55bytes)
movdqa %xmm0, -55(%edx)
-L(aligned_16_39bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_39bytes)
movdqa %xmm0, -39(%edx)
-L(aligned_16_23bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_23bytes)
movdqa %xmm0, -23(%edx)
-L(aligned_16_7bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_7bytes)
movl %eax, -7(%edx)
movw %ax, -3(%edx)
movb %al, -1(%edx)
@@ -635,83 +635,83 @@ L(aligned_16_7bytes):
RETURN
ALIGN (4)
-L(aligned_16_120bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_120bytes)
movdqa %xmm0, -120(%edx)
-L(aligned_16_104bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_104bytes)
movdqa %xmm0, -104(%edx)
-L(aligned_16_88bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_88bytes)
movdqa %xmm0, -88(%edx)
-L(aligned_16_72bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_72bytes)
movdqa %xmm0, -72(%edx)
-L(aligned_16_56bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_56bytes)
movdqa %xmm0, -56(%edx)
-L(aligned_16_40bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_40bytes)
movdqa %xmm0, -40(%edx)
-L(aligned_16_24bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_24bytes)
movdqa %xmm0, -24(%edx)
-L(aligned_16_8bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_8bytes)
movq %xmm0, -8(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_121bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_121bytes)
movdqa %xmm0, -121(%edx)
-L(aligned_16_105bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_105bytes)
movdqa %xmm0, -105(%edx)
-L(aligned_16_89bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_89bytes)
movdqa %xmm0, -89(%edx)
-L(aligned_16_73bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_73bytes)
movdqa %xmm0, -73(%edx)
-L(aligned_16_57bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_57bytes)
movdqa %xmm0, -57(%edx)
-L(aligned_16_41bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_41bytes)
movdqa %xmm0, -41(%edx)
-L(aligned_16_25bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_25bytes)
movdqa %xmm0, -25(%edx)
-L(aligned_16_9bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_9bytes)
movq %xmm0, -9(%edx)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_122bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_122bytes)
movdqa %xmm0, -122(%edx)
-L(aligned_16_106bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_106bytes)
movdqa %xmm0, -106(%edx)
-L(aligned_16_90bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_90bytes)
movdqa %xmm0, -90(%edx)
-L(aligned_16_74bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_74bytes)
movdqa %xmm0, -74(%edx)
-L(aligned_16_58bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_58bytes)
movdqa %xmm0, -58(%edx)
-L(aligned_16_42bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_42bytes)
movdqa %xmm0, -42(%edx)
-L(aligned_16_26bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_26bytes)
movdqa %xmm0, -26(%edx)
-L(aligned_16_10bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_10bytes)
movq %xmm0, -10(%edx)
movw %ax, -2(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_123bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_123bytes)
movdqa %xmm0, -123(%edx)
-L(aligned_16_107bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_107bytes)
movdqa %xmm0, -107(%edx)
-L(aligned_16_91bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_91bytes)
movdqa %xmm0, -91(%edx)
-L(aligned_16_75bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_75bytes)
movdqa %xmm0, -75(%edx)
-L(aligned_16_59bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_59bytes)
movdqa %xmm0, -59(%edx)
-L(aligned_16_43bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_43bytes)
movdqa %xmm0, -43(%edx)
-L(aligned_16_27bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_27bytes)
movdqa %xmm0, -27(%edx)
-L(aligned_16_11bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_11bytes)
movq %xmm0, -11(%edx)
movw %ax, -3(%edx)
movb %al, -1(%edx)
@@ -719,42 +719,42 @@ L(aligned_16_11bytes):
RETURN
ALIGN (4)
-L(aligned_16_124bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_124bytes)
movdqa %xmm0, -124(%edx)
-L(aligned_16_108bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_108bytes)
movdqa %xmm0, -108(%edx)
-L(aligned_16_92bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_92bytes)
movdqa %xmm0, -92(%edx)
-L(aligned_16_76bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_76bytes)
movdqa %xmm0, -76(%edx)
-L(aligned_16_60bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_60bytes)
movdqa %xmm0, -60(%edx)
-L(aligned_16_44bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_44bytes)
movdqa %xmm0, -44(%edx)
-L(aligned_16_28bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_28bytes)
movdqa %xmm0, -28(%edx)
-L(aligned_16_12bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_12bytes)
movq %xmm0, -12(%edx)
movl %eax, -4(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_125bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_125bytes)
movdqa %xmm0, -125(%edx)
-L(aligned_16_109bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_109bytes)
movdqa %xmm0, -109(%edx)
-L(aligned_16_93bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_93bytes)
movdqa %xmm0, -93(%edx)
-L(aligned_16_77bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_77bytes)
movdqa %xmm0, -77(%edx)
-L(aligned_16_61bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_61bytes)
movdqa %xmm0, -61(%edx)
-L(aligned_16_45bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_45bytes)
movdqa %xmm0, -45(%edx)
-L(aligned_16_29bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_29bytes)
movdqa %xmm0, -29(%edx)
-L(aligned_16_13bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_13bytes)
movq %xmm0, -13(%edx)
movl %eax, -5(%edx)
movb %al, -1(%edx)
@@ -762,21 +762,21 @@ L(aligned_16_13bytes):
RETURN
ALIGN (4)
-L(aligned_16_126bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_126bytes)
movdqa %xmm0, -126(%edx)
-L(aligned_16_110bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_110bytes)
movdqa %xmm0, -110(%edx)
-L(aligned_16_94bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_94bytes)
movdqa %xmm0, -94(%edx)
-L(aligned_16_78bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_78bytes)
movdqa %xmm0, -78(%edx)
-L(aligned_16_62bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_62bytes)
movdqa %xmm0, -62(%edx)
-L(aligned_16_46bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_46bytes)
movdqa %xmm0, -46(%edx)
-L(aligned_16_30bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_30bytes)
movdqa %xmm0, -30(%edx)
-L(aligned_16_14bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_14bytes)
movq %xmm0, -14(%edx)
movl %eax, -6(%edx)
movw %ax, -2(%edx)
@@ -784,21 +784,21 @@ L(aligned_16_14bytes):
RETURN
ALIGN (4)
-L(aligned_16_127bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_127bytes)
movdqa %xmm0, -127(%edx)
-L(aligned_16_111bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_111bytes)
movdqa %xmm0, -111(%edx)
-L(aligned_16_95bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_95bytes)
movdqa %xmm0, -95(%edx)
-L(aligned_16_79bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_79bytes)
movdqa %xmm0, -79(%edx)
-L(aligned_16_63bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_63bytes)
movdqa %xmm0, -63(%edx)
-L(aligned_16_47bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_47bytes)
movdqa %xmm0, -47(%edx)
-L(aligned_16_31bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_31bytes)
movdqa %xmm0, -31(%edx)
-L(aligned_16_15bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_15bytes)
movq %xmm0, -15(%edx)
movl %eax, -7(%edx)
movw %ax, -3(%edx)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b64a00e2a649adbe456c3893e4d4c49ec11a473
commit 4b64a00e2a649adbe456c3893e4d4c49ec11a473
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 16:10:46 2018 -0800
i386: Use INDIRECT_JUMP_ENTRY in strcat-sse2.S
* sysdeps/i386/i686/multiarch/strcat-sse2.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/i386/i686/multiarch/strcat-sse2.S b/sysdeps/i386/i686/multiarch/strcat-sse2.S
index bed0b66..bbbd6db 100644
--- a/sysdeps/i386/i686/multiarch/strcat-sse2.S
+++ b/sysdeps/i386/i686/multiarch/strcat-sse2.S
@@ -665,7 +665,7 @@ L(CopyFrom1To16BytesTail1Case2OrCase3):
# ifdef USE_AS_STRNCAT
.p2align 4
-L(StrncatExit0):
+INDIRECT_JUMP_ENTRY(StrncatExit0)
movb %bh, (%eax)
mov STR3(%esp), %eax
RETURN
@@ -673,10 +673,10 @@ L(StrncatExit0):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit1):
+INDIRECT_JUMP_ENTRY(StrncatExit1)
movb %bh, 1(%eax)
# endif
-L(Exit1):
+INDIRECT_JUMP_ENTRY(Exit1)
# ifdef USE_AS_STRNCAT
movb (%esi), %dh
# endif
@@ -686,10 +686,10 @@ L(Exit1):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit2):
+INDIRECT_JUMP_ENTRY(StrncatExit2)
movb %bh, 2(%eax)
# endif
-L(Exit2):
+INDIRECT_JUMP_ENTRY(Exit2)
movw (%esi), %dx
movw %dx, (%eax)
mov STR3(%esp), %eax
@@ -697,10 +697,10 @@ L(Exit2):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit3):
+INDIRECT_JUMP_ENTRY(StrncatExit3)
movb %bh, 3(%eax)
# endif
-L(Exit3):
+INDIRECT_JUMP_ENTRY(Exit3)
movw (%esi), %cx
movw %cx, (%eax)
# ifdef USE_AS_STRNCAT
@@ -712,10 +712,10 @@ L(Exit3):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit4):
+INDIRECT_JUMP_ENTRY(StrncatExit4)
movb %bh, 4(%eax)
# endif
-L(Exit4):
+INDIRECT_JUMP_ENTRY(Exit4)
movl (%esi), %edx
movl %edx, (%eax)
mov STR3(%esp), %eax
@@ -723,10 +723,10 @@ L(Exit4):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit5):
+INDIRECT_JUMP_ENTRY(StrncatExit5)
movb %bh, 5(%eax)
# endif
-L(Exit5):
+INDIRECT_JUMP_ENTRY(Exit5)
movl (%esi), %ecx
# ifdef USE_AS_STRNCAT
movb 4(%esi), %dh
@@ -738,10 +738,10 @@ L(Exit5):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit6):
+INDIRECT_JUMP_ENTRY(StrncatExit6)
movb %bh, 6(%eax)
# endif
-L(Exit6):
+INDIRECT_JUMP_ENTRY(Exit6)
movl (%esi), %ecx
movw 4(%esi), %dx
movl %ecx, (%eax)
@@ -751,10 +751,10 @@ L(Exit6):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit7):
+INDIRECT_JUMP_ENTRY(StrncatExit7)
movb %bh, 7(%eax)
# endif
-L(Exit7):
+INDIRECT_JUMP_ENTRY(Exit7)
movl (%esi), %ecx
movl 3(%esi), %edx
movl %ecx, (%eax)
@@ -764,10 +764,10 @@ L(Exit7):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit8):
+INDIRECT_JUMP_ENTRY(StrncatExit8)
movb %bh, 8(%eax)
# endif
-L(Exit8):
+INDIRECT_JUMP_ENTRY(Exit8)
movlpd (%esi), %xmm0
movlpd %xmm0, (%eax)
mov STR3(%esp), %eax
@@ -775,10 +775,10 @@ L(Exit8):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit9):
+INDIRECT_JUMP_ENTRY(StrncatExit9)
movb %bh, 9(%eax)
# endif
-L(Exit9):
+INDIRECT_JUMP_ENTRY(Exit9)
movlpd (%esi), %xmm0
# ifdef USE_AS_STRNCAT
movb 8(%esi), %dh
@@ -790,10 +790,10 @@ L(Exit9):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit10):
+INDIRECT_JUMP_ENTRY(StrncatExit10)
movb %bh, 10(%eax)
# endif
-L(Exit10):
+INDIRECT_JUMP_ENTRY(Exit10)
movlpd (%esi), %xmm0
movw 8(%esi), %dx
movlpd %xmm0, (%eax)
@@ -803,10 +803,10 @@ L(Exit10):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit11):
+INDIRECT_JUMP_ENTRY(StrncatExit11)
movb %bh, 11(%eax)
# endif
-L(Exit11):
+INDIRECT_JUMP_ENTRY(Exit11)
movlpd (%esi), %xmm0
movl 7(%esi), %edx
movlpd %xmm0, (%eax)
@@ -816,10 +816,10 @@ L(Exit11):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit12):
+INDIRECT_JUMP_ENTRY(StrncatExit12)
movb %bh, 12(%eax)
# endif
-L(Exit12):
+INDIRECT_JUMP_ENTRY(Exit12)
movlpd (%esi), %xmm0
movl 8(%esi), %edx
movlpd %xmm0, (%eax)
@@ -829,10 +829,10 @@ L(Exit12):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit13):
+INDIRECT_JUMP_ENTRY(StrncatExit13)
movb %bh, 13(%eax)
# endif
-L(Exit13):
+INDIRECT_JUMP_ENTRY(Exit13)
movlpd (%esi), %xmm0
movlpd 5(%esi), %xmm1
movlpd %xmm0, (%eax)
@@ -842,10 +842,10 @@ L(Exit13):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit14):
+INDIRECT_JUMP_ENTRY(StrncatExit14)
movb %bh, 14(%eax)
# endif
-L(Exit14):
+INDIRECT_JUMP_ENTRY(Exit14)
movlpd (%esi), %xmm0
movlpd 6(%esi), %xmm1
movlpd %xmm0, (%eax)
@@ -855,10 +855,10 @@ L(Exit14):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit15):
+INDIRECT_JUMP_ENTRY(StrncatExit15)
movb %bh, 15(%eax)
# endif
-L(Exit15):
+INDIRECT_JUMP_ENTRY(Exit15)
movlpd (%esi), %xmm0
movlpd 7(%esi), %xmm1
movlpd %xmm0, (%eax)
@@ -868,10 +868,10 @@ L(Exit15):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit16):
+INDIRECT_JUMP_ENTRY(StrncatExit16)
movb %bh, 16(%eax)
# endif
-L(Exit16):
+INDIRECT_JUMP_ENTRY(Exit16)
movdqu (%esi), %xmm0
movdqu %xmm0, (%eax)
mov STR3(%esp), %eax
@@ -879,10 +879,10 @@ L(Exit16):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit17):
+INDIRECT_JUMP_ENTRY(StrncatExit17)
movb %bh, 17(%eax)
# endif
-L(Exit17):
+INDIRECT_JUMP_ENTRY(Exit17)
movdqu (%esi), %xmm0
# ifdef USE_AS_STRNCAT
movb 16(%esi), %dh
@@ -894,10 +894,10 @@ L(Exit17):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit18):
+INDIRECT_JUMP_ENTRY(StrncatExit18)
movb %bh, 18(%eax)
# endif
-L(Exit18):
+INDIRECT_JUMP_ENTRY(Exit18)
movdqu (%esi), %xmm0
movw 16(%esi), %cx
movdqu %xmm0, (%eax)
@@ -907,10 +907,10 @@ L(Exit18):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit19):
+INDIRECT_JUMP_ENTRY(StrncatExit19)
movb %bh, 19(%eax)
# endif
-L(Exit19):
+INDIRECT_JUMP_ENTRY(Exit19)
movdqu (%esi), %xmm0
movl 15(%esi), %ecx
movdqu %xmm0, (%eax)
@@ -920,10 +920,10 @@ L(Exit19):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit20):
+INDIRECT_JUMP_ENTRY(StrncatExit20)
movb %bh, 20(%eax)
# endif
-L(Exit20):
+INDIRECT_JUMP_ENTRY(Exit20)
movdqu (%esi), %xmm0
movl 16(%esi), %ecx
movdqu %xmm0, (%eax)
@@ -933,10 +933,10 @@ L(Exit20):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit21):
+INDIRECT_JUMP_ENTRY(StrncatExit21)
movb %bh, 21(%eax)
# endif
-L(Exit21):
+INDIRECT_JUMP_ENTRY(Exit21)
movdqu (%esi), %xmm0
movl 16(%esi), %ecx
# ifdef USE_AS_STRNCAT
@@ -950,10 +950,10 @@ L(Exit21):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit22):
+INDIRECT_JUMP_ENTRY(StrncatExit22)
movb %bh, 22(%eax)
# endif
-L(Exit22):
+INDIRECT_JUMP_ENTRY(Exit22)
movdqu (%esi), %xmm0
movlpd 14(%esi), %xmm3
movdqu %xmm0, (%eax)
@@ -963,10 +963,10 @@ L(Exit22):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit23):
+INDIRECT_JUMP_ENTRY(StrncatExit23)
movb %bh, 23(%eax)
# endif
-L(Exit23):
+INDIRECT_JUMP_ENTRY(Exit23)
movdqu (%esi), %xmm0
movlpd 15(%esi), %xmm3
movdqu %xmm0, (%eax)
@@ -976,10 +976,10 @@ L(Exit23):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit24):
+INDIRECT_JUMP_ENTRY(StrncatExit24)
movb %bh, 24(%eax)
# endif
-L(Exit24):
+INDIRECT_JUMP_ENTRY(Exit24)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movdqu %xmm0, (%eax)
@@ -989,10 +989,10 @@ L(Exit24):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit25):
+INDIRECT_JUMP_ENTRY(StrncatExit25)
movb %bh, 25(%eax)
# endif
-L(Exit25):
+INDIRECT_JUMP_ENTRY(Exit25)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
# ifdef USE_AS_STRNCAT
@@ -1006,10 +1006,10 @@ L(Exit25):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit26):
+INDIRECT_JUMP_ENTRY(StrncatExit26)
movb %bh, 26(%eax)
# endif
-L(Exit26):
+INDIRECT_JUMP_ENTRY(Exit26)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movw 24(%esi), %cx
@@ -1021,10 +1021,10 @@ L(Exit26):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit27):
+INDIRECT_JUMP_ENTRY(StrncatExit27)
movb %bh, 27(%eax)
# endif
-L(Exit27):
+INDIRECT_JUMP_ENTRY(Exit27)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movl 23(%esi), %ecx
@@ -1036,10 +1036,10 @@ L(Exit27):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit28):
+INDIRECT_JUMP_ENTRY(StrncatExit28)
movb %bh, 28(%eax)
# endif
-L(Exit28):
+INDIRECT_JUMP_ENTRY(Exit28)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movl 24(%esi), %ecx
@@ -1051,10 +1051,10 @@ L(Exit28):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit29):
+INDIRECT_JUMP_ENTRY(StrncatExit29)
movb %bh, 29(%eax)
# endif
-L(Exit29):
+INDIRECT_JUMP_ENTRY(Exit29)
movdqu (%esi), %xmm0
movdqu 13(%esi), %xmm2
movdqu %xmm0, (%eax)
@@ -1064,10 +1064,10 @@ L(Exit29):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit30):
+INDIRECT_JUMP_ENTRY(StrncatExit30)
movb %bh, 30(%eax)
# endif
-L(Exit30):
+INDIRECT_JUMP_ENTRY(Exit30)
movdqu (%esi), %xmm0
movdqu 14(%esi), %xmm2
movdqu %xmm0, (%eax)
@@ -1077,10 +1077,10 @@ L(Exit30):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit31):
+INDIRECT_JUMP_ENTRY(StrncatExit31)
movb %bh, 31(%eax)
# endif
-L(Exit31):
+INDIRECT_JUMP_ENTRY(Exit31)
movdqu (%esi), %xmm0
movdqu 15(%esi), %xmm2
movdqu %xmm0, (%eax)
@@ -1090,10 +1090,10 @@ L(Exit31):
.p2align 4
# ifdef USE_AS_STRNCAT
-L(StrncatExit32):
+INDIRECT_JUMP_ENTRY(StrncatExit32)
movb %bh, 32(%eax)
# endif
-L(Exit32):
+INDIRECT_JUMP_ENTRY(Exit32)
movdqu (%esi), %xmm0
movdqu 16(%esi), %xmm2
movdqu %xmm0, (%eax)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=336456814e61a725c2241979e3dcbd7c8af6aa44
commit 336456814e61a725c2241979e3dcbd7c8af6aa44
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 16:09:39 2018 -0800
i386: Use INDIRECT_JUMP_ENTRY in strcpy-sse2.S
* sysdeps/i386/i686/multiarch/strcpy-sse2.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/i386/i686/multiarch/strcpy-sse2.S b/sysdeps/i386/i686/multiarch/strcpy-sse2.S
index 64bdb91..a211b21 100644
--- a/sysdeps/i386/i686/multiarch/strcpy-sse2.S
+++ b/sysdeps/i386/i686/multiarch/strcpy-sse2.S
@@ -475,14 +475,14 @@ L(CopyFrom1To16BytesTail1Case2OrCase3):
BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %ebx, 4)
.p2align 4
-L(Exit0):
+INDIRECT_JUMP_ENTRY(Exit0)
# ifdef USE_AS_STPCPY
mov %edi, %eax
# endif
RETURN
.p2align 4
-L(Exit1):
+INDIRECT_JUMP_ENTRY(Exit1)
movb %dh, (%edi)
# ifdef USE_AS_STPCPY
lea (%edi), %eax
@@ -493,7 +493,7 @@ L(Exit1):
RETURN
.p2align 4
-L(Exit2):
+INDIRECT_JUMP_ENTRY(Exit2)
movw (%esi), %dx
movw %dx, (%edi)
# ifdef USE_AS_STPCPY
@@ -505,7 +505,7 @@ L(Exit2):
RETURN
.p2align 4
-L(Exit3):
+INDIRECT_JUMP_ENTRY(Exit3)
movw (%esi), %cx
movw %cx, (%edi)
movb %dh, 2(%edi)
@@ -518,7 +518,7 @@ L(Exit3):
RETURN
.p2align 4
-L(Exit4):
+INDIRECT_JUMP_ENTRY(Exit4)
movl (%esi), %edx
movl %edx, (%edi)
# ifdef USE_AS_STPCPY
@@ -530,7 +530,7 @@ L(Exit4):
RETURN
.p2align 4
-L(Exit5):
+INDIRECT_JUMP_ENTRY(Exit5)
movl (%esi), %ecx
movb %dh, 4(%edi)
movl %ecx, (%edi)
@@ -543,7 +543,7 @@ L(Exit5):
RETURN
.p2align 4
-L(Exit6):
+INDIRECT_JUMP_ENTRY(Exit6)
movl (%esi), %ecx
movw 4(%esi), %dx
movl %ecx, (%edi)
@@ -557,7 +557,7 @@ L(Exit6):
RETURN
.p2align 4
-L(Exit7):
+INDIRECT_JUMP_ENTRY(Exit7)
movl (%esi), %ecx
movl 3(%esi), %edx
movl %ecx, (%edi)
@@ -571,7 +571,7 @@ L(Exit7):
RETURN
.p2align 4
-L(Exit8):
+INDIRECT_JUMP_ENTRY(Exit8)
movlpd (%esi), %xmm0
movlpd %xmm0, (%edi)
# ifdef USE_AS_STPCPY
@@ -583,7 +583,7 @@ L(Exit8):
RETURN
.p2align 4
-L(Exit9):
+INDIRECT_JUMP_ENTRY(Exit9)
movlpd (%esi), %xmm0
movb %dh, 8(%edi)
movlpd %xmm0, (%edi)
@@ -596,7 +596,7 @@ L(Exit9):
RETURN
.p2align 4
-L(Exit10):
+INDIRECT_JUMP_ENTRY(Exit10)
movlpd (%esi), %xmm0
movw 8(%esi), %dx
movlpd %xmm0, (%edi)
@@ -610,7 +610,7 @@ L(Exit10):
RETURN
.p2align 4
-L(Exit11):
+INDIRECT_JUMP_ENTRY(Exit11)
movlpd (%esi), %xmm0
movl 7(%esi), %edx
movlpd %xmm0, (%edi)
@@ -624,7 +624,7 @@ L(Exit11):
RETURN
.p2align 4
-L(Exit12):
+INDIRECT_JUMP_ENTRY(Exit12)
movlpd (%esi), %xmm0
movl 8(%esi), %edx
movlpd %xmm0, (%edi)
@@ -638,7 +638,7 @@ L(Exit12):
RETURN
.p2align 4
-L(Exit13):
+INDIRECT_JUMP_ENTRY(Exit13)
movlpd (%esi), %xmm0
movlpd 5(%esi), %xmm1
movlpd %xmm0, (%edi)
@@ -652,7 +652,7 @@ L(Exit13):
RETURN
.p2align 4
-L(Exit14):
+INDIRECT_JUMP_ENTRY(Exit14)
movlpd (%esi), %xmm0
movlpd 6(%esi), %xmm1
movlpd %xmm0, (%edi)
@@ -666,7 +666,7 @@ L(Exit14):
RETURN
.p2align 4
-L(Exit15):
+INDIRECT_JUMP_ENTRY(Exit15)
movlpd (%esi), %xmm0
movlpd 7(%esi), %xmm1
movlpd %xmm0, (%edi)
@@ -680,7 +680,7 @@ L(Exit15):
RETURN
.p2align 4
-L(Exit16):
+INDIRECT_JUMP_ENTRY(Exit16)
movdqu (%esi), %xmm0
movdqu %xmm0, (%edi)
# ifdef USE_AS_STPCPY
@@ -692,7 +692,7 @@ L(Exit16):
RETURN
.p2align 4
-L(Exit17):
+INDIRECT_JUMP_ENTRY(Exit17)
movdqu (%esi), %xmm0
movdqu %xmm0, (%edi)
movb %dh, 16(%edi)
@@ -705,7 +705,7 @@ L(Exit17):
RETURN
.p2align 4
-L(Exit18):
+INDIRECT_JUMP_ENTRY(Exit18)
movdqu (%esi), %xmm0
movw 16(%esi), %cx
movdqu %xmm0, (%edi)
@@ -719,7 +719,7 @@ L(Exit18):
RETURN
.p2align 4
-L(Exit19):
+INDIRECT_JUMP_ENTRY(Exit19)
movdqu (%esi), %xmm0
movl 15(%esi), %ecx
movdqu %xmm0, (%edi)
@@ -733,7 +733,7 @@ L(Exit19):
RETURN
.p2align 4
-L(Exit20):
+INDIRECT_JUMP_ENTRY(Exit20)
movdqu (%esi), %xmm0
movl 16(%esi), %ecx
movdqu %xmm0, (%edi)
@@ -747,7 +747,7 @@ L(Exit20):
RETURN
.p2align 4
-L(Exit21):
+INDIRECT_JUMP_ENTRY(Exit21)
movdqu (%esi), %xmm0
movl 16(%esi), %ecx
movdqu %xmm0, (%edi)
@@ -762,7 +762,7 @@ L(Exit21):
RETURN
.p2align 4
-L(Exit22):
+INDIRECT_JUMP_ENTRY(Exit22)
movdqu (%esi), %xmm0
movlpd 14(%esi), %xmm3
movdqu %xmm0, (%edi)
@@ -776,7 +776,7 @@ L(Exit22):
RETURN
.p2align 4
-L(Exit23):
+INDIRECT_JUMP_ENTRY(Exit23)
movdqu (%esi), %xmm0
movlpd 15(%esi), %xmm3
movdqu %xmm0, (%edi)
@@ -790,7 +790,7 @@ L(Exit23):
RETURN
.p2align 4
-L(Exit24):
+INDIRECT_JUMP_ENTRY(Exit24)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -804,7 +804,7 @@ L(Exit24):
RETURN
.p2align 4
-L(Exit25):
+INDIRECT_JUMP_ENTRY(Exit25)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -819,7 +819,7 @@ L(Exit25):
RETURN
.p2align 4
-L(Exit26):
+INDIRECT_JUMP_ENTRY(Exit26)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movw 24(%esi), %cx
@@ -835,7 +835,7 @@ L(Exit26):
RETURN
.p2align 4
-L(Exit27):
+INDIRECT_JUMP_ENTRY(Exit27)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movl 23(%esi), %ecx
@@ -851,7 +851,7 @@ L(Exit27):
RETURN
.p2align 4
-L(Exit28):
+INDIRECT_JUMP_ENTRY(Exit28)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movl 24(%esi), %ecx
@@ -867,7 +867,7 @@ L(Exit28):
RETURN
.p2align 4
-L(Exit29):
+INDIRECT_JUMP_ENTRY(Exit29)
movdqu (%esi), %xmm0
movdqu 13(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -881,7 +881,7 @@ L(Exit29):
RETURN
.p2align 4
-L(Exit30):
+INDIRECT_JUMP_ENTRY(Exit30)
movdqu (%esi), %xmm0
movdqu 14(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -896,7 +896,7 @@ L(Exit30):
.p2align 4
-L(Exit31):
+INDIRECT_JUMP_ENTRY(Exit31)
movdqu (%esi), %xmm0
movdqu 15(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -910,7 +910,7 @@ L(Exit31):
RETURN
.p2align 4
-L(Exit32):
+INDIRECT_JUMP_ENTRY(Exit32)
movdqu (%esi), %xmm0
movdqu 16(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -924,7 +924,7 @@ L(Exit32):
RETURN
.p2align 4
-L(StrncpyExit1):
+INDIRECT_JUMP_ENTRY(StrncpyExit1)
movb (%esi), %dl
movb %dl, (%edi)
# ifdef USE_AS_STPCPY
@@ -933,7 +933,7 @@ L(StrncpyExit1):
RETURN
.p2align 4
-L(StrncpyExit2):
+INDIRECT_JUMP_ENTRY(StrncpyExit2)
movw (%esi), %dx
movw %dx, (%edi)
# ifdef USE_AS_STPCPY
@@ -942,7 +942,7 @@ L(StrncpyExit2):
RETURN
.p2align 4
-L(StrncpyExit3):
+INDIRECT_JUMP_ENTRY(StrncpyExit3)
movw (%esi), %cx
movb 2(%esi), %dl
movw %cx, (%edi)
@@ -953,7 +953,7 @@ L(StrncpyExit3):
RETURN
.p2align 4
-L(StrncpyExit4):
+INDIRECT_JUMP_ENTRY(StrncpyExit4)
movl (%esi), %edx
movl %edx, (%edi)
# ifdef USE_AS_STPCPY
@@ -962,7 +962,7 @@ L(StrncpyExit4):
RETURN
.p2align 4
-L(StrncpyExit5):
+INDIRECT_JUMP_ENTRY(StrncpyExit5)
movl (%esi), %ecx
movb 4(%esi), %dl
movl %ecx, (%edi)
@@ -973,7 +973,7 @@ L(StrncpyExit5):
RETURN
.p2align 4
-L(StrncpyExit6):
+INDIRECT_JUMP_ENTRY(StrncpyExit6)
movl (%esi), %ecx
movw 4(%esi), %dx
movl %ecx, (%edi)
@@ -984,7 +984,7 @@ L(StrncpyExit6):
RETURN
.p2align 4
-L(StrncpyExit7):
+INDIRECT_JUMP_ENTRY(StrncpyExit7)
movl (%esi), %ecx
movl 3(%esi), %edx
movl %ecx, (%edi)
@@ -995,7 +995,7 @@ L(StrncpyExit7):
RETURN
.p2align 4
-L(StrncpyExit8):
+INDIRECT_JUMP_ENTRY(StrncpyExit8)
movlpd (%esi), %xmm0
movlpd %xmm0, (%edi)
# ifdef USE_AS_STPCPY
@@ -1004,7 +1004,7 @@ L(StrncpyExit8):
RETURN
.p2align 4
-L(StrncpyExit9):
+INDIRECT_JUMP_ENTRY(StrncpyExit9)
movlpd (%esi), %xmm0
movb 8(%esi), %dl
movlpd %xmm0, (%edi)
@@ -1015,7 +1015,7 @@ L(StrncpyExit9):
RETURN
.p2align 4
-L(StrncpyExit10):
+INDIRECT_JUMP_ENTRY(StrncpyExit10)
movlpd (%esi), %xmm0
movw 8(%esi), %dx
movlpd %xmm0, (%edi)
@@ -1026,7 +1026,7 @@ L(StrncpyExit10):
RETURN
.p2align 4
-L(StrncpyExit11):
+INDIRECT_JUMP_ENTRY(StrncpyExit11)
movlpd (%esi), %xmm0
movl 7(%esi), %edx
movlpd %xmm0, (%edi)
@@ -1037,7 +1037,7 @@ L(StrncpyExit11):
RETURN
.p2align 4
-L(StrncpyExit12):
+INDIRECT_JUMP_ENTRY(StrncpyExit12)
movlpd (%esi), %xmm0
movl 8(%esi), %edx
movlpd %xmm0, (%edi)
@@ -1048,7 +1048,7 @@ L(StrncpyExit12):
RETURN
.p2align 4
-L(StrncpyExit13):
+INDIRECT_JUMP_ENTRY(StrncpyExit13)
movlpd (%esi), %xmm0
movlpd 5(%esi), %xmm1
movlpd %xmm0, (%edi)
@@ -1059,7 +1059,7 @@ L(StrncpyExit13):
RETURN
.p2align 4
-L(StrncpyExit14):
+INDIRECT_JUMP_ENTRY(StrncpyExit14)
movlpd (%esi), %xmm0
movlpd 6(%esi), %xmm1
movlpd %xmm0, (%edi)
@@ -1070,7 +1070,7 @@ L(StrncpyExit14):
RETURN
.p2align 4
-L(StrncpyExit15):
+INDIRECT_JUMP_ENTRY(StrncpyExit15)
movlpd (%esi), %xmm0
movlpd 7(%esi), %xmm1
movlpd %xmm0, (%edi)
@@ -1081,7 +1081,7 @@ L(StrncpyExit15):
RETURN
.p2align 4
-L(StrncpyExit16):
+INDIRECT_JUMP_ENTRY(StrncpyExit16)
movdqu (%esi), %xmm0
movdqu %xmm0, (%edi)
# ifdef USE_AS_STPCPY
@@ -1090,7 +1090,7 @@ L(StrncpyExit16):
RETURN
.p2align 4
-L(StrncpyExit17):
+INDIRECT_JUMP_ENTRY(StrncpyExit17)
movdqu (%esi), %xmm0
movb 16(%esi), %cl
movdqu %xmm0, (%edi)
@@ -1101,7 +1101,7 @@ L(StrncpyExit17):
RETURN
.p2align 4
-L(StrncpyExit18):
+INDIRECT_JUMP_ENTRY(StrncpyExit18)
movdqu (%esi), %xmm0
movw 16(%esi), %cx
movdqu %xmm0, (%edi)
@@ -1112,7 +1112,7 @@ L(StrncpyExit18):
RETURN
.p2align 4
-L(StrncpyExit19):
+INDIRECT_JUMP_ENTRY(StrncpyExit19)
movdqu (%esi), %xmm0
movl 15(%esi), %ecx
movdqu %xmm0, (%edi)
@@ -1123,7 +1123,7 @@ L(StrncpyExit19):
RETURN
.p2align 4
-L(StrncpyExit20):
+INDIRECT_JUMP_ENTRY(StrncpyExit20)
movdqu (%esi), %xmm0
movl 16(%esi), %ecx
movdqu %xmm0, (%edi)
@@ -1134,7 +1134,7 @@ L(StrncpyExit20):
RETURN
.p2align 4
-L(StrncpyExit21):
+INDIRECT_JUMP_ENTRY(StrncpyExit21)
movdqu (%esi), %xmm0
movl 16(%esi), %ecx
movb 20(%esi), %dl
@@ -1147,7 +1147,7 @@ L(StrncpyExit21):
RETURN
.p2align 4
-L(StrncpyExit22):
+INDIRECT_JUMP_ENTRY(StrncpyExit22)
movdqu (%esi), %xmm0
movlpd 14(%esi), %xmm3
movdqu %xmm0, (%edi)
@@ -1158,7 +1158,7 @@ L(StrncpyExit22):
RETURN
.p2align 4
-L(StrncpyExit23):
+INDIRECT_JUMP_ENTRY(StrncpyExit23)
movdqu (%esi), %xmm0
movlpd 15(%esi), %xmm3
movdqu %xmm0, (%edi)
@@ -1169,7 +1169,7 @@ L(StrncpyExit23):
RETURN
.p2align 4
-L(StrncpyExit24):
+INDIRECT_JUMP_ENTRY(StrncpyExit24)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -1180,7 +1180,7 @@ L(StrncpyExit24):
RETURN
.p2align 4
-L(StrncpyExit25):
+INDIRECT_JUMP_ENTRY(StrncpyExit25)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movb 24(%esi), %cl
@@ -1193,7 +1193,7 @@ L(StrncpyExit25):
RETURN
.p2align 4
-L(StrncpyExit26):
+INDIRECT_JUMP_ENTRY(StrncpyExit26)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movw 24(%esi), %cx
@@ -1206,7 +1206,7 @@ L(StrncpyExit26):
RETURN
.p2align 4
-L(StrncpyExit27):
+INDIRECT_JUMP_ENTRY(StrncpyExit27)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movl 23(%esi), %ecx
@@ -1219,7 +1219,7 @@ L(StrncpyExit27):
RETURN
.p2align 4
-L(StrncpyExit28):
+INDIRECT_JUMP_ENTRY(StrncpyExit28)
movdqu (%esi), %xmm0
movlpd 16(%esi), %xmm2
movl 24(%esi), %ecx
@@ -1232,7 +1232,7 @@ L(StrncpyExit28):
RETURN
.p2align 4
-L(StrncpyExit29):
+INDIRECT_JUMP_ENTRY(StrncpyExit29)
movdqu (%esi), %xmm0
movdqu 13(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -1243,7 +1243,7 @@ L(StrncpyExit29):
RETURN
.p2align 4
-L(StrncpyExit30):
+INDIRECT_JUMP_ENTRY(StrncpyExit30)
movdqu (%esi), %xmm0
movdqu 14(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -1254,7 +1254,7 @@ L(StrncpyExit30):
RETURN
.p2align 4
-L(StrncpyExit31):
+INDIRECT_JUMP_ENTRY(StrncpyExit31)
movdqu (%esi), %xmm0
movdqu 15(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -1265,7 +1265,7 @@ L(StrncpyExit31):
RETURN
.p2align 4
-L(StrncpyExit32):
+INDIRECT_JUMP_ENTRY(StrncpyExit32)
movdqu (%esi), %xmm0
movdqu 16(%esi), %xmm2
movdqu %xmm0, (%edi)
@@ -1276,7 +1276,7 @@ L(StrncpyExit32):
RETURN
.p2align 4
-L(StrncpyExit33):
+INDIRECT_JUMP_ENTRY(StrncpyExit33)
movdqu (%esi), %xmm0
movdqu 16(%esi), %xmm2
movb 32(%esi), %cl
@@ -1286,94 +1286,94 @@ L(StrncpyExit33):
RETURN
.p2align 4
-L(Fill0):
+INDIRECT_JUMP_ENTRY(Fill0)
RETURN
.p2align 4
-L(Fill1):
+INDIRECT_JUMP_ENTRY(Fill1)
movb %dl, (%edi)
RETURN
.p2align 4
-L(Fill2):
+INDIRECT_JUMP_ENTRY(Fill2)
movw %dx, (%edi)
RETURN
.p2align 4
-L(Fill3):
+INDIRECT_JUMP_ENTRY(Fill3)
movl %edx, -1(%edi)
RETURN
.p2align 4
-L(Fill4):
+INDIRECT_JUMP_ENTRY(Fill4)
movl %edx, (%edi)
RETURN
.p2align 4
-L(Fill5):
+INDIRECT_JUMP_ENTRY(Fill5)
movl %edx, (%edi)
movb %dl, 4(%edi)
RETURN
.p2align 4
-L(Fill6):
+INDIRECT_JUMP_ENTRY(Fill6)
movl %edx, (%edi)
movw %dx, 4(%edi)
RETURN
.p2align 4
-L(Fill7):
+INDIRECT_JUMP_ENTRY(Fill7)
movlpd %xmm0, -1(%edi)
RETURN
.p2align 4
-L(Fill8):
+INDIRECT_JUMP_ENTRY(Fill8)
movlpd %xmm0, (%edi)
RETURN
.p2align 4
-L(Fill9):
+INDIRECT_JUMP_ENTRY(Fill9)
movlpd %xmm0, (%edi)
movb %dl, 8(%edi)
RETURN
.p2align 4
-L(Fill10):
+INDIRECT_JUMP_ENTRY(Fill10)
movlpd %xmm0, (%edi)
movw %dx, 8(%edi)
RETURN
.p2align 4
-L(Fill11):
+INDIRECT_JUMP_ENTRY(Fill11)
movlpd %xmm0, (%edi)
movl %edx, 7(%edi)
RETURN
.p2align 4
-L(Fill12):
+INDIRECT_JUMP_ENTRY(Fill12)
movlpd %xmm0, (%edi)
movl %edx, 8(%edi)
RETURN
.p2align 4
-L(Fill13):
+INDIRECT_JUMP_ENTRY(Fill13)
movlpd %xmm0, (%edi)
movlpd %xmm0, 5(%edi)
RETURN
.p2align 4
-L(Fill14):
+INDIRECT_JUMP_ENTRY(Fill14)
movlpd %xmm0, (%edi)
movlpd %xmm0, 6(%edi)
RETURN
.p2align 4
-L(Fill15):
+INDIRECT_JUMP_ENTRY(Fill15)
movdqu %xmm0, -1(%edi)
RETURN
.p2align 4
-L(Fill16):
+INDIRECT_JUMP_ENTRY(Fill16)
movdqu %xmm0, (%edi)
RETURN
@@ -1853,7 +1853,7 @@ L(ExitHigh):
RETURN
.p2align 4
-L(Exit1):
+INDIRECT_JUMP_ENTRY(Exit1)
movb (%ecx), %al
movb %al, (%edx)
# ifdef USE_AS_STPCPY
@@ -1864,7 +1864,7 @@ L(Exit1):
RETURN
.p2align 4
-L(Exit2):
+INDIRECT_JUMP_ENTRY(Exit2)
movw (%ecx), %ax
movw %ax, (%edx)
# ifdef USE_AS_STPCPY
@@ -1875,7 +1875,7 @@ L(Exit2):
RETURN
.p2align 4
-L(Exit3):
+INDIRECT_JUMP_ENTRY(Exit3)
movw (%ecx), %ax
movw %ax, (%edx)
movb 2(%ecx), %al
@@ -1888,7 +1888,7 @@ L(Exit3):
RETURN
.p2align 4
-L(Exit4):
+INDIRECT_JUMP_ENTRY(Exit4)
movl (%ecx), %eax
movl %eax, (%edx)
# ifdef USE_AS_STPCPY
@@ -1899,7 +1899,7 @@ L(Exit4):
RETURN
.p2align 4
-L(Exit5):
+INDIRECT_JUMP_ENTRY(Exit5)
movl (%ecx), %eax
movl %eax, (%edx)
movb 4(%ecx), %al
@@ -1912,7 +1912,7 @@ L(Exit5):
RETURN
.p2align 4
-L(Exit6):
+INDIRECT_JUMP_ENTRY(Exit6)
movl (%ecx), %eax
movl %eax, (%edx)
movw 4(%ecx), %ax
@@ -1925,7 +1925,7 @@ L(Exit6):
RETURN
.p2align 4
-L(Exit7):
+INDIRECT_JUMP_ENTRY(Exit7)
movl (%ecx), %eax
movl %eax, (%edx)
movl 3(%ecx), %eax
@@ -1938,7 +1938,7 @@ L(Exit7):
RETURN
.p2align 4
-L(Exit9):
+INDIRECT_JUMP_ENTRY(Exit9)
movl (%ecx), %eax
movl %eax, (%edx)
movl 4(%ecx), %eax
@@ -1953,7 +1953,7 @@ L(Exit9):
RETURN
.p2align 4
-L(Exit10):
+INDIRECT_JUMP_ENTRY(Exit10)
movl (%ecx), %eax
movl %eax, (%edx)
movl 4(%ecx), %eax
@@ -1968,7 +1968,7 @@ L(Exit10):
RETURN
.p2align 4
-L(Exit11):
+INDIRECT_JUMP_ENTRY(Exit11)
movl (%ecx), %eax
movl %eax, (%edx)
movl 4(%ecx), %eax
@@ -1983,7 +1983,7 @@ L(Exit11):
RETURN
.p2align 4
-L(Exit12):
+INDIRECT_JUMP_ENTRY(Exit12)
movl (%ecx), %eax
movl %eax, (%edx)
movl 4(%ecx), %eax
@@ -1998,7 +1998,7 @@ L(Exit12):
RETURN
.p2align 4
-L(Exit13):
+INDIRECT_JUMP_ENTRY(Exit13)
movlpd (%ecx), %xmm0
movlpd %xmm0, (%edx)
movlpd 5(%ecx), %xmm0
@@ -2011,7 +2011,7 @@ L(Exit13):
RETURN
.p2align 4
-L(Exit14):
+INDIRECT_JUMP_ENTRY(Exit14)
movlpd (%ecx), %xmm0
movlpd %xmm0, (%edx)
movlpd 6(%ecx), %xmm0
@@ -2024,7 +2024,7 @@ L(Exit14):
RETURN
.p2align 4
-L(Exit15):
+INDIRECT_JUMP_ENTRY(Exit15)
movlpd (%ecx), %xmm0
movlpd %xmm0, (%edx)
movlpd 7(%ecx), %xmm0
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e58b049b5a5435202c92e521b7f91d5617651dc7
commit e58b049b5a5435202c92e521b7f91d5617651dc7
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 16:06:37 2018 -0800
i386: Use INDIRECT_JUMP_ENTRY in memcpy-ssse3.S
* sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
index bb35c4c..617111b 100644
--- a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
@@ -173,7 +173,7 @@ L(48bytesormore):
BRANCH_TO_JMPTBL_ENTRY (L(shl_table), %edi, 4)
.p2align 4
-L(shl_0):
+INDIRECT_JUMP_ENTRY(shl_0)
# ifdef USE_AS_MEMMOVE
movl DEST+4(%esp), %edi
movdqu %xmm0, (%edi)
@@ -379,7 +379,7 @@ L(shl_0_mem_less_16bytes):
BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd_align), %ecx, 4)
.p2align 4
-L(shl_1):
+INDIRECT_JUMP_ENTRY(shl_1)
# ifndef USE_AS_MEMMOVE
movaps -1(%eax), %xmm1
# else
@@ -483,7 +483,7 @@ L(sh_1_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_2):
+INDIRECT_JUMP_ENTRY(shl_2)
# ifndef USE_AS_MEMMOVE
movaps -2(%eax), %xmm1
# else
@@ -587,7 +587,7 @@ L(sh_2_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_3):
+INDIRECT_JUMP_ENTRY(shl_3)
# ifndef USE_AS_MEMMOVE
movaps -3(%eax), %xmm1
# else
@@ -693,7 +693,7 @@ L(sh_3_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_4):
+INDIRECT_JUMP_ENTRY(shl_4)
# ifndef USE_AS_MEMMOVE
movaps -4(%eax), %xmm1
# else
@@ -799,7 +799,7 @@ L(sh_4_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_5):
+INDIRECT_JUMP_ENTRY(shl_5)
# ifndef USE_AS_MEMMOVE
movaps -5(%eax), %xmm1
# else
@@ -905,7 +905,7 @@ L(sh_5_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_6):
+INDIRECT_JUMP_ENTRY(shl_6)
# ifndef USE_AS_MEMMOVE
movaps -6(%eax), %xmm1
# else
@@ -1011,7 +1011,7 @@ L(sh_6_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_7):
+INDIRECT_JUMP_ENTRY(shl_7)
# ifndef USE_AS_MEMMOVE
movaps -7(%eax), %xmm1
# else
@@ -1115,7 +1115,7 @@ L(sh_7_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_8):
+INDIRECT_JUMP_ENTRY(shl_8)
# ifndef USE_AS_MEMMOVE
movaps -8(%eax), %xmm1
# else
@@ -1219,7 +1219,7 @@ L(sh_8_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_9):
+INDIRECT_JUMP_ENTRY(shl_9)
# ifndef USE_AS_MEMMOVE
movaps -9(%eax), %xmm1
# else
@@ -1324,7 +1324,7 @@ L(sh_9_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_10):
+INDIRECT_JUMP_ENTRY(shl_10)
# ifndef USE_AS_MEMMOVE
movaps -10(%eax), %xmm1
# else
@@ -1429,7 +1429,7 @@ L(sh_10_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_11):
+INDIRECT_JUMP_ENTRY(shl_11)
# ifndef USE_AS_MEMMOVE
movaps -11(%eax), %xmm1
# else
@@ -1534,7 +1534,7 @@ L(sh_11_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_12):
+INDIRECT_JUMP_ENTRY(shl_12)
# ifndef USE_AS_MEMMOVE
movaps -12(%eax), %xmm1
# else
@@ -1639,7 +1639,7 @@ L(sh_12_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_13):
+INDIRECT_JUMP_ENTRY(shl_13)
# ifndef USE_AS_MEMMOVE
movaps -13(%eax), %xmm1
# else
@@ -1744,7 +1744,7 @@ L(sh_13_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_14):
+INDIRECT_JUMP_ENTRY(shl_14)
# ifndef USE_AS_MEMMOVE
movaps -14(%eax), %xmm1
# else
@@ -1849,7 +1849,7 @@ L(sh_14_end_no_prefetch_loop):
CFI_PUSH (%edi)
.p2align 4
-L(shl_15):
+INDIRECT_JUMP_ENTRY(shl_15)
# ifndef USE_AS_MEMMOVE
movaps -15(%eax), %xmm1
# else
@@ -1962,22 +1962,22 @@ L(shl_end_0):
BRANCH_TO_JMPTBL_ENTRY(L(table_48bytes_fwd), %ecx, 4)
.p2align 4
-L(fwd_write_44bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_44bytes)
movq -44(%eax), %xmm0
movq %xmm0, -44(%edx)
-L(fwd_write_36bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_36bytes)
movq -36(%eax), %xmm0
movq %xmm0, -36(%edx)
-L(fwd_write_28bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_28bytes)
movq -28(%eax), %xmm0
movq %xmm0, -28(%edx)
-L(fwd_write_20bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_20bytes)
movq -20(%eax), %xmm0
movq %xmm0, -20(%edx)
-L(fwd_write_12bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_12bytes)
movq -12(%eax), %xmm0
movq %xmm0, -12(%edx)
-L(fwd_write_4bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_4bytes)
movl -4(%eax), %ecx
movl %ecx, -4(%edx)
# ifndef USE_AS_BCOPY
@@ -1990,22 +1990,22 @@ L(fwd_write_4bytes):
RETURN
.p2align 4
-L(fwd_write_40bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_40bytes)
movq -40(%eax), %xmm0
movq %xmm0, -40(%edx)
-L(fwd_write_32bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_32bytes)
movq -32(%eax), %xmm0
movq %xmm0, -32(%edx)
-L(fwd_write_24bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_24bytes)
movq -24(%eax), %xmm0
movq %xmm0, -24(%edx)
-L(fwd_write_16bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_16bytes)
movq -16(%eax), %xmm0
movq %xmm0, -16(%edx)
-L(fwd_write_8bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_8bytes)
movq -8(%eax), %xmm0
movq %xmm0, -8(%edx)
-L(fwd_write_0bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_0bytes)
# ifndef USE_AS_BCOPY
# ifdef USE_AS_MEMPCPY
movl %edx, %eax
@@ -2016,7 +2016,7 @@ L(fwd_write_0bytes):
RETURN
.p2align 4
-L(fwd_write_5bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_5bytes)
movl -5(%eax), %ecx
movl -4(%eax), %eax
movl %ecx, -5(%edx)
@@ -2031,19 +2031,19 @@ L(fwd_write_5bytes):
RETURN
.p2align 4
-L(fwd_write_45bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_45bytes)
movq -45(%eax), %xmm0
movq %xmm0, -45(%edx)
-L(fwd_write_37bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_37bytes)
movq -37(%eax), %xmm0
movq %xmm0, -37(%edx)
-L(fwd_write_29bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_29bytes)
movq -29(%eax), %xmm0
movq %xmm0, -29(%edx)
-L(fwd_write_21bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_21bytes)
movq -21(%eax), %xmm0
movq %xmm0, -21(%edx)
-L(fwd_write_13bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_13bytes)
movq -13(%eax), %xmm0
movq %xmm0, -13(%edx)
movl -5(%eax), %ecx
@@ -2060,22 +2060,22 @@ L(fwd_write_13bytes):
RETURN
.p2align 4
-L(fwd_write_41bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_41bytes)
movq -41(%eax), %xmm0
movq %xmm0, -41(%edx)
-L(fwd_write_33bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_33bytes)
movq -33(%eax), %xmm0
movq %xmm0, -33(%edx)
-L(fwd_write_25bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_25bytes)
movq -25(%eax), %xmm0
movq %xmm0, -25(%edx)
-L(fwd_write_17bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_17bytes)
movq -17(%eax), %xmm0
movq %xmm0, -17(%edx)
-L(fwd_write_9bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_9bytes)
movq -9(%eax), %xmm0
movq %xmm0, -9(%edx)
-L(fwd_write_1bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_1bytes)
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
# ifndef USE_AS_BCOPY
@@ -2088,22 +2088,22 @@ L(fwd_write_1bytes):
RETURN
.p2align 4
-L(fwd_write_46bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_46bytes)
movq -46(%eax), %xmm0
movq %xmm0, -46(%edx)
-L(fwd_write_38bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_38bytes)
movq -38(%eax), %xmm0
movq %xmm0, -38(%edx)
-L(fwd_write_30bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_30bytes)
movq -30(%eax), %xmm0
movq %xmm0, -30(%edx)
-L(fwd_write_22bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_22bytes)
movq -22(%eax), %xmm0
movq %xmm0, -22(%edx)
-L(fwd_write_14bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_14bytes)
movq -14(%eax), %xmm0
movq %xmm0, -14(%edx)
-L(fwd_write_6bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_6bytes)
movl -6(%eax), %ecx
movl %ecx, -6(%edx)
movzwl -2(%eax), %ecx
@@ -2118,22 +2118,22 @@ L(fwd_write_6bytes):
RETURN
.p2align 4
-L(fwd_write_42bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_42bytes)
movq -42(%eax), %xmm0
movq %xmm0, -42(%edx)
-L(fwd_write_34bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_34bytes)
movq -34(%eax), %xmm0
movq %xmm0, -34(%edx)
-L(fwd_write_26bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_26bytes)
movq -26(%eax), %xmm0
movq %xmm0, -26(%edx)
-L(fwd_write_18bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_18bytes)
movq -18(%eax), %xmm0
movq %xmm0, -18(%edx)
-L(fwd_write_10bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_10bytes)
movq -10(%eax), %xmm0
movq %xmm0, -10(%edx)
-L(fwd_write_2bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_2bytes)
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
# ifndef USE_AS_BCOPY
@@ -2146,22 +2146,22 @@ L(fwd_write_2bytes):
RETURN
.p2align 4
-L(fwd_write_47bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_47bytes)
movq -47(%eax), %xmm0
movq %xmm0, -47(%edx)
-L(fwd_write_39bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_39bytes)
movq -39(%eax), %xmm0
movq %xmm0, -39(%edx)
-L(fwd_write_31bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_31bytes)
movq -31(%eax), %xmm0
movq %xmm0, -31(%edx)
-L(fwd_write_23bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_23bytes)
movq -23(%eax), %xmm0
movq %xmm0, -23(%edx)
-L(fwd_write_15bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_15bytes)
movq -15(%eax), %xmm0
movq %xmm0, -15(%edx)
-L(fwd_write_7bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_7bytes)
movl -7(%eax), %ecx
movl %ecx, -7(%edx)
movzwl -3(%eax), %ecx
@@ -2178,22 +2178,22 @@ L(fwd_write_7bytes):
RETURN
.p2align 4
-L(fwd_write_43bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_43bytes)
movq -43(%eax), %xmm0
movq %xmm0, -43(%edx)
-L(fwd_write_35bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_35bytes)
movq -35(%eax), %xmm0
movq %xmm0, -35(%edx)
-L(fwd_write_27bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_27bytes)
movq -27(%eax), %xmm0
movq %xmm0, -27(%edx)
-L(fwd_write_19bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_19bytes)
movq -19(%eax), %xmm0
movq %xmm0, -19(%edx)
-L(fwd_write_11bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_11bytes)
movq -11(%eax), %xmm0
movq %xmm0, -11(%edx)
-L(fwd_write_3bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_3bytes)
movzwl -3(%eax), %ecx
movzbl -1(%eax), %eax
movw %cx, -3(%edx)
@@ -2208,16 +2208,16 @@ L(fwd_write_3bytes):
RETURN
.p2align 4
-L(fwd_write_40bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_40bytes_align)
movdqa -40(%eax), %xmm0
movdqa %xmm0, -40(%edx)
-L(fwd_write_24bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_24bytes_align)
movdqa -24(%eax), %xmm0
movdqa %xmm0, -24(%edx)
-L(fwd_write_8bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_8bytes_align)
movq -8(%eax), %xmm0
movq %xmm0, -8(%edx)
-L(fwd_write_0bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_0bytes_align)
# ifndef USE_AS_BCOPY
# ifdef USE_AS_MEMPCPY
movl %edx, %eax
@@ -2228,10 +2228,10 @@ L(fwd_write_0bytes_align):
RETURN
.p2align 4
-L(fwd_write_32bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_32bytes_align)
movdqa -32(%eax), %xmm0
movdqa %xmm0, -32(%edx)
-L(fwd_write_16bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_16bytes_align)
movdqa -16(%eax), %xmm0
movdqa %xmm0, -16(%edx)
# ifndef USE_AS_BCOPY
@@ -2244,7 +2244,7 @@ L(fwd_write_16bytes_align):
RETURN
.p2align 4
-L(fwd_write_5bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_5bytes_align)
movl -5(%eax), %ecx
movl -4(%eax), %eax
movl %ecx, -5(%edx)
@@ -2259,13 +2259,13 @@ L(fwd_write_5bytes_align):
RETURN
.p2align 4
-L(fwd_write_45bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_45bytes_align)
movdqa -45(%eax), %xmm0
movdqa %xmm0, -45(%edx)
-L(fwd_write_29bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_29bytes_align)
movdqa -29(%eax), %xmm0
movdqa %xmm0, -29(%edx)
-L(fwd_write_13bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_13bytes_align)
movq -13(%eax), %xmm0
movq %xmm0, -13(%edx)
movl -5(%eax), %ecx
@@ -2282,10 +2282,10 @@ L(fwd_write_13bytes_align):
RETURN
.p2align 4
-L(fwd_write_37bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_37bytes_align)
movdqa -37(%eax), %xmm0
movdqa %xmm0, -37(%edx)
-L(fwd_write_21bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_21bytes_align)
movdqa -21(%eax), %xmm0
movdqa %xmm0, -21(%edx)
movl -5(%eax), %ecx
@@ -2302,16 +2302,16 @@ L(fwd_write_21bytes_align):
RETURN
.p2align 4
-L(fwd_write_41bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_41bytes_align)
movdqa -41(%eax), %xmm0
movdqa %xmm0, -41(%edx)
-L(fwd_write_25bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_25bytes_align)
movdqa -25(%eax), %xmm0
movdqa %xmm0, -25(%edx)
-L(fwd_write_9bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_9bytes_align)
movq -9(%eax), %xmm0
movq %xmm0, -9(%edx)
-L(fwd_write_1bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_1bytes_align)
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
# ifndef USE_AS_BCOPY
@@ -2324,10 +2324,10 @@ L(fwd_write_1bytes_align):
RETURN
.p2align 4
-L(fwd_write_33bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_33bytes_align)
movdqa -33(%eax), %xmm0
movdqa %xmm0, -33(%edx)
-L(fwd_write_17bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_17bytes_align)
movdqa -17(%eax), %xmm0
movdqa %xmm0, -17(%edx)
movzbl -1(%eax), %ecx
@@ -2342,16 +2342,16 @@ L(fwd_write_17bytes_align):
RETURN
.p2align 4
-L(fwd_write_46bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_46bytes_align)
movdqa -46(%eax), %xmm0
movdqa %xmm0, -46(%edx)
-L(fwd_write_30bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_30bytes_align)
movdqa -30(%eax), %xmm0
movdqa %xmm0, -30(%edx)
-L(fwd_write_14bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_14bytes_align)
movq -14(%eax), %xmm0
movq %xmm0, -14(%edx)
-L(fwd_write_6bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_6bytes_align)
movl -6(%eax), %ecx
movl %ecx, -6(%edx)
movzwl -2(%eax), %ecx
@@ -2366,10 +2366,10 @@ L(fwd_write_6bytes_align):
RETURN
.p2align 4
-L(fwd_write_38bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_38bytes_align)
movdqa -38(%eax), %xmm0
movdqa %xmm0, -38(%edx)
-L(fwd_write_22bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_22bytes_align)
movdqa -22(%eax), %xmm0
movdqa %xmm0, -22(%edx)
movl -6(%eax), %ecx
@@ -2386,16 +2386,16 @@ L(fwd_write_22bytes_align):
RETURN
.p2align 4
-L(fwd_write_42bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_42bytes_align)
movdqa -42(%eax), %xmm0
movdqa %xmm0, -42(%edx)
-L(fwd_write_26bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_26bytes_align)
movdqa -26(%eax), %xmm0
movdqa %xmm0, -26(%edx)
-L(fwd_write_10bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_10bytes_align)
movq -10(%eax), %xmm0
movq %xmm0, -10(%edx)
-L(fwd_write_2bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_2bytes_align)
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
# ifndef USE_AS_BCOPY
@@ -2408,10 +2408,10 @@ L(fwd_write_2bytes_align):
RETURN
.p2align 4
-L(fwd_write_34bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_34bytes_align)
movdqa -34(%eax), %xmm0
movdqa %xmm0, -34(%edx)
-L(fwd_write_18bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_18bytes_align)
movdqa -18(%eax), %xmm0
movdqa %xmm0, -18(%edx)
movzwl -2(%eax), %ecx
@@ -2426,16 +2426,16 @@ L(fwd_write_18bytes_align):
RETURN
.p2align 4
-L(fwd_write_47bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_47bytes_align)
movdqa -47(%eax), %xmm0
movdqa %xmm0, -47(%edx)
-L(fwd_write_31bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_31bytes_align)
movdqa -31(%eax), %xmm0
movdqa %xmm0, -31(%edx)
-L(fwd_write_15bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_15bytes_align)
movq -15(%eax), %xmm0
movq %xmm0, -15(%edx)
-L(fwd_write_7bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_7bytes_align)
movl -7(%eax), %ecx
movl %ecx, -7(%edx)
movzwl -3(%eax), %ecx
@@ -2452,10 +2452,10 @@ L(fwd_write_7bytes_align):
RETURN
.p2align 4
-L(fwd_write_39bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_39bytes_align)
movdqa -39(%eax), %xmm0
movdqa %xmm0, -39(%edx)
-L(fwd_write_23bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_23bytes_align)
movdqa -23(%eax), %xmm0
movdqa %xmm0, -23(%edx)
movl -7(%eax), %ecx
@@ -2474,16 +2474,16 @@ L(fwd_write_23bytes_align):
RETURN
.p2align 4
-L(fwd_write_43bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_43bytes_align)
movdqa -43(%eax), %xmm0
movdqa %xmm0, -43(%edx)
-L(fwd_write_27bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_27bytes_align)
movdqa -27(%eax), %xmm0
movdqa %xmm0, -27(%edx)
-L(fwd_write_11bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_11bytes_align)
movq -11(%eax), %xmm0
movq %xmm0, -11(%edx)
-L(fwd_write_3bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_3bytes_align)
movzwl -3(%eax), %ecx
movzbl -1(%eax), %eax
movw %cx, -3(%edx)
@@ -2498,10 +2498,10 @@ L(fwd_write_3bytes_align):
RETURN
.p2align 4
-L(fwd_write_35bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_35bytes_align)
movdqa -35(%eax), %xmm0
movdqa %xmm0, -35(%edx)
-L(fwd_write_19bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_19bytes_align)
movdqa -19(%eax), %xmm0
movdqa %xmm0, -19(%edx)
movzwl -3(%eax), %ecx
@@ -2518,16 +2518,16 @@ L(fwd_write_19bytes_align):
RETURN
.p2align 4
-L(fwd_write_44bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_44bytes_align)
movdqa -44(%eax), %xmm0
movdqa %xmm0, -44(%edx)
-L(fwd_write_28bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_28bytes_align)
movdqa -28(%eax), %xmm0
movdqa %xmm0, -28(%edx)
-L(fwd_write_12bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_12bytes_align)
movq -12(%eax), %xmm0
movq %xmm0, -12(%edx)
-L(fwd_write_4bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_4bytes_align)
movl -4(%eax), %ecx
movl %ecx, -4(%edx)
# ifndef USE_AS_BCOPY
@@ -2540,10 +2540,10 @@ L(fwd_write_4bytes_align):
RETURN
.p2align 4
-L(fwd_write_36bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_36bytes_align)
movdqa -36(%eax), %xmm0
movdqa %xmm0, -36(%edx)
-L(fwd_write_20bytes_align):
+INDIRECT_JUMP_ENTRY(fwd_write_20bytes_align)
movdqa -20(%eax), %xmm0
movdqa %xmm0, -20(%edx)
movl -4(%eax), %ecx
@@ -2628,25 +2628,25 @@ L(large_page_less_32bytes):
BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd), %ecx, 4)
.p2align 4
-L(bk_write_44bytes):
+INDIRECT_JUMP_ENTRY(bk_write_44bytes)
movq 36(%eax), %xmm0
movq %xmm0, 36(%edx)
-L(bk_write_36bytes):
+INDIRECT_JUMP_ENTRY(bk_write_36bytes)
movq 28(%eax), %xmm0
movq %xmm0, 28(%edx)
-L(bk_write_28bytes):
+INDIRECT_JUMP_ENTRY(bk_write_28bytes)
movq 20(%eax), %xmm0
movq %xmm0, 20(%edx)
-L(bk_write_20bytes):
+INDIRECT_JUMP_ENTRY(bk_write_20bytes)
movq 12(%eax), %xmm0
movq %xmm0, 12(%edx)
-L(bk_write_12bytes):
+INDIRECT_JUMP_ENTRY(bk_write_12bytes)
movq 4(%eax), %xmm0
movq %xmm0, 4(%edx)
-L(bk_write_4bytes):
+INDIRECT_JUMP_ENTRY(bk_write_4bytes)
movl (%eax), %ecx
movl %ecx, (%edx)
-L(bk_write_0bytes):
+INDIRECT_JUMP_ENTRY(bk_write_0bytes)
# ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
# ifdef USE_AS_MEMPCPY
@@ -2657,19 +2657,19 @@ L(bk_write_0bytes):
RETURN
.p2align 4
-L(bk_write_40bytes):
+INDIRECT_JUMP_ENTRY(bk_write_40bytes)
movq 32(%eax), %xmm0
movq %xmm0, 32(%edx)
-L(bk_write_32bytes):
+INDIRECT_JUMP_ENTRY(bk_write_32bytes)
movq 24(%eax), %xmm0
movq %xmm0, 24(%edx)
-L(bk_write_24bytes):
+INDIRECT_JUMP_ENTRY(bk_write_24bytes)
movq 16(%eax), %xmm0
movq %xmm0, 16(%edx)
-L(bk_write_16bytes):
+INDIRECT_JUMP_ENTRY(bk_write_16bytes)
movq 8(%eax), %xmm0
movq %xmm0, 8(%edx)
-L(bk_write_8bytes):
+INDIRECT_JUMP_ENTRY(bk_write_8bytes)
movq (%eax), %xmm0
movq %xmm0, (%edx)
# ifndef USE_AS_BCOPY
@@ -2682,25 +2682,25 @@ L(bk_write_8bytes):
RETURN
.p2align 4
-L(bk_write_45bytes):
+INDIRECT_JUMP_ENTRY(bk_write_45bytes)
movq 37(%eax), %xmm0
movq %xmm0, 37(%edx)
-L(bk_write_37bytes):
+INDIRECT_JUMP_ENTRY(bk_write_37bytes)
movq 29(%eax), %xmm0
movq %xmm0, 29(%edx)
-L(bk_write_29bytes):
+INDIRECT_JUMP_ENTRY(bk_write_29bytes)
movq 21(%eax), %xmm0
movq %xmm0, 21(%edx)
-L(bk_write_21bytes):
+INDIRECT_JUMP_ENTRY(bk_write_21bytes)
movq 13(%eax), %xmm0
movq %xmm0, 13(%edx)
-L(bk_write_13bytes):
+INDIRECT_JUMP_ENTRY(bk_write_13bytes)
movq 5(%eax), %xmm0
movq %xmm0, 5(%edx)
-L(bk_write_5bytes):
+INDIRECT_JUMP_ENTRY(bk_write_5bytes)
movl 1(%eax), %ecx
movl %ecx, 1(%edx)
-L(bk_write_1bytes):
+INDIRECT_JUMP_ENTRY(bk_write_1bytes)
movzbl (%eax), %ecx
movb %cl, (%edx)
# ifndef USE_AS_BCOPY
@@ -2713,19 +2713,19 @@ L(bk_write_1bytes):
RETURN
.p2align 4
-L(bk_write_41bytes):
+INDIRECT_JUMP_ENTRY(bk_write_41bytes)
movq 33(%eax), %xmm0
movq %xmm0, 33(%edx)
-L(bk_write_33bytes):
+INDIRECT_JUMP_ENTRY(bk_write_33bytes)
movq 25(%eax), %xmm0
movq %xmm0, 25(%edx)
-L(bk_write_25bytes):
+INDIRECT_JUMP_ENTRY(bk_write_25bytes)
movq 17(%eax), %xmm0
movq %xmm0, 17(%edx)
-L(bk_write_17bytes):
+INDIRECT_JUMP_ENTRY(bk_write_17bytes)
movq 9(%eax), %xmm0
movq %xmm0, 9(%edx)
-L(bk_write_9bytes):
+INDIRECT_JUMP_ENTRY(bk_write_9bytes)
movq 1(%eax), %xmm0
movq %xmm0, 1(%edx)
movzbl (%eax), %ecx
@@ -2740,22 +2740,22 @@ L(bk_write_9bytes):
RETURN
.p2align 4
-L(bk_write_46bytes):
+INDIRECT_JUMP_ENTRY(bk_write_46bytes)
movq 38(%eax), %xmm0
movq %xmm0, 38(%edx)
-L(bk_write_38bytes):
+INDIRECT_JUMP_ENTRY(bk_write_38bytes)
movq 30(%eax), %xmm0
movq %xmm0, 30(%edx)
-L(bk_write_30bytes):
+INDIRECT_JUMP_ENTRY(bk_write_30bytes)
movq 22(%eax), %xmm0
movq %xmm0, 22(%edx)
-L(bk_write_22bytes):
+INDIRECT_JUMP_ENTRY(bk_write_22bytes)
movq 14(%eax), %xmm0
movq %xmm0, 14(%edx)
-L(bk_write_14bytes):
+INDIRECT_JUMP_ENTRY(bk_write_14bytes)
movq 6(%eax), %xmm0
movq %xmm0, 6(%edx)
-L(bk_write_6bytes):
+INDIRECT_JUMP_ENTRY(bk_write_6bytes)
movl 2(%eax), %ecx
movl %ecx, 2(%edx)
movzwl (%eax), %ecx
@@ -2770,22 +2770,22 @@ L(bk_write_6bytes):
RETURN
.p2align 4
-L(bk_write_42bytes):
+INDIRECT_JUMP_ENTRY(bk_write_42bytes)
movq 34(%eax), %xmm0
movq %xmm0, 34(%edx)
-L(bk_write_34bytes):
+INDIRECT_JUMP_ENTRY(bk_write_34bytes)
movq 26(%eax), %xmm0
movq %xmm0, 26(%edx)
-L(bk_write_26bytes):
+INDIRECT_JUMP_ENTRY(bk_write_26bytes)
movq 18(%eax), %xmm0
movq %xmm0, 18(%edx)
-L(bk_write_18bytes):
+INDIRECT_JUMP_ENTRY(bk_write_18bytes)
movq 10(%eax), %xmm0
movq %xmm0, 10(%edx)
-L(bk_write_10bytes):
+INDIRECT_JUMP_ENTRY(bk_write_10bytes)
movq 2(%eax), %xmm0
movq %xmm0, 2(%edx)
-L(bk_write_2bytes):
+INDIRECT_JUMP_ENTRY(bk_write_2bytes)
movzwl (%eax), %ecx
movw %cx, (%edx)
# ifndef USE_AS_BCOPY
@@ -2798,22 +2798,22 @@ L(bk_write_2bytes):
RETURN
.p2align 4
-L(bk_write_47bytes):
+INDIRECT_JUMP_ENTRY(bk_write_47bytes)
movq 39(%eax), %xmm0
movq %xmm0, 39(%edx)
-L(bk_write_39bytes):
+INDIRECT_JUMP_ENTRY(bk_write_39bytes)
movq 31(%eax), %xmm0
movq %xmm0, 31(%edx)
-L(bk_write_31bytes):
+INDIRECT_JUMP_ENTRY(bk_write_31bytes)
movq 23(%eax), %xmm0
movq %xmm0, 23(%edx)
-L(bk_write_23bytes):
+INDIRECT_JUMP_ENTRY(bk_write_23bytes)
movq 15(%eax), %xmm0
movq %xmm0, 15(%edx)
-L(bk_write_15bytes):
+INDIRECT_JUMP_ENTRY(bk_write_15bytes)
movq 7(%eax), %xmm0
movq %xmm0, 7(%edx)
-L(bk_write_7bytes):
+INDIRECT_JUMP_ENTRY(bk_write_7bytes)
movl 3(%eax), %ecx
movl %ecx, 3(%edx)
movzwl 1(%eax), %ecx
@@ -2830,22 +2830,22 @@ L(bk_write_7bytes):
RETURN
.p2align 4
-L(bk_write_43bytes):
+INDIRECT_JUMP_ENTRY(bk_write_43bytes)
movq 35(%eax), %xmm0
movq %xmm0, 35(%edx)
-L(bk_write_35bytes):
+INDIRECT_JUMP_ENTRY(bk_write_35bytes)
movq 27(%eax), %xmm0
movq %xmm0, 27(%edx)
-L(bk_write_27bytes):
+INDIRECT_JUMP_ENTRY(bk_write_27bytes)
movq 19(%eax), %xmm0
movq %xmm0, 19(%edx)
-L(bk_write_19bytes):
+INDIRECT_JUMP_ENTRY(bk_write_19bytes)
movq 11(%eax), %xmm0
movq %xmm0, 11(%edx)
-L(bk_write_11bytes):
+INDIRECT_JUMP_ENTRY(bk_write_11bytes)
movq 3(%eax), %xmm0
movq %xmm0, 3(%edx)
-L(bk_write_3bytes):
+INDIRECT_JUMP_ENTRY(bk_write_3bytes)
movzwl 1(%eax), %ecx
movw %cx, 1(%edx)
movzbl (%eax), %eax
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18469179d36897e1d0b55e70bdbbb626d158f581
commit 18469179d36897e1d0b55e70bdbbb626d158f581
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 16:04:36 2018 -0800
i386: Use INDIRECT_JUMP_ENTRY in memcpy-ssse3-rep.S
* sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
(BRANCH_TO_JMPTBL_ENTRY_VALUE): Add 4 bytes for 4-byte endbr32.
Use INDIRECT_JUMP_ENTRY with indirect jump targets to add
_CET_ENDBR.
diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
index 287f1df..83499de 100644
--- a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
+++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
@@ -73,8 +73,14 @@
/* We loaded the jump table. Go. */ \
jmp *%ebx
-# define BRANCH_TO_JMPTBL_ENTRY_VALUE(TABLE) \
+# ifdef __IBT__
+/* Add 4 bytes for 4-byte endbr32. */
+# define BRANCH_TO_JMPTBL_ENTRY_VALUE(TABLE) \
+ addl $(TABLE + 4 - .), %ebx
+# else
+# define BRANCH_TO_JMPTBL_ENTRY_VALUE(TABLE) \
addl $(TABLE - .), %ebx
+# endif
# define BRANCH_TO_JMPTBL_ENTRY_TAIL(TABLE, INDEX, SCALE) \
addl (%ebx,INDEX,SCALE), %ebx; \
@@ -177,7 +183,7 @@ L(48bytesormore):
BRANCH_TO_JMPTBL_ENTRY (L(shl_table), %edi, 4)
ALIGN (4)
-L(shl_0):
+INDIRECT_JUMP_ENTRY(shl_0)
movdqu %xmm0, (%esi)
xor %edi, %edi
cmp $127, %ecx
@@ -390,7 +396,7 @@ L(shl_0_mem_less_16bytes):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_1):
+INDIRECT_JUMP_ENTRY(shl_1)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $1, %eax
movaps (%eax), %xmm1
@@ -435,7 +441,7 @@ L(shl_1_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_2):
+INDIRECT_JUMP_ENTRY(shl_2)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $2, %eax
movaps (%eax), %xmm1
@@ -480,7 +486,7 @@ L(shl_2_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_3):
+INDIRECT_JUMP_ENTRY(shl_3)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $3, %eax
movaps (%eax), %xmm1
@@ -525,7 +531,7 @@ L(shl_3_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_4):
+INDIRECT_JUMP_ENTRY(shl_4)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $4, %eax
movaps (%eax), %xmm1
@@ -570,7 +576,7 @@ L(shl_4_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_5):
+INDIRECT_JUMP_ENTRY(shl_5)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $5, %eax
movaps (%eax), %xmm1
@@ -615,7 +621,7 @@ L(shl_5_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_6):
+INDIRECT_JUMP_ENTRY(shl_6)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $6, %eax
movaps (%eax), %xmm1
@@ -660,7 +666,7 @@ L(shl_6_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_7):
+INDIRECT_JUMP_ENTRY(shl_7)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $7, %eax
movaps (%eax), %xmm1
@@ -705,7 +711,7 @@ L(shl_7_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_8):
+INDIRECT_JUMP_ENTRY(shl_8)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $8, %eax
movaps (%eax), %xmm1
@@ -750,7 +756,7 @@ L(shl_8_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_9):
+INDIRECT_JUMP_ENTRY(shl_9)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $9, %eax
movaps (%eax), %xmm1
@@ -795,7 +801,7 @@ L(shl_9_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_10):
+INDIRECT_JUMP_ENTRY(shl_10)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $10, %eax
movaps (%eax), %xmm1
@@ -840,7 +846,7 @@ L(shl_10_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_11):
+INDIRECT_JUMP_ENTRY(shl_11)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $11, %eax
movaps (%eax), %xmm1
@@ -885,7 +891,7 @@ L(shl_11_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_12):
+INDIRECT_JUMP_ENTRY(shl_12)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $12, %eax
movaps (%eax), %xmm1
@@ -930,7 +936,7 @@ L(shl_12_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_13):
+INDIRECT_JUMP_ENTRY(shl_13)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $13, %eax
movaps (%eax), %xmm1
@@ -975,7 +981,7 @@ L(shl_13_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_14):
+INDIRECT_JUMP_ENTRY(shl_14)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $14, %eax
movaps (%eax), %xmm1
@@ -1020,7 +1026,7 @@ L(shl_14_end):
cfi_restore_state
cfi_remember_state
ALIGN (4)
-L(shl_15):
+INDIRECT_JUMP_ENTRY(shl_15)
BRANCH_TO_JMPTBL_ENTRY_VALUE(L(table_48bytes_fwd))
sub $15, %eax
movaps (%eax), %xmm1
@@ -1064,40 +1070,40 @@ L(shl_15_end):
ALIGN (4)
-L(fwd_write_44bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_44bytes)
movl -44(%eax), %ecx
movl %ecx, -44(%edx)
-L(fwd_write_40bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_40bytes)
movl -40(%eax), %ecx
movl %ecx, -40(%edx)
-L(fwd_write_36bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_36bytes)
movl -36(%eax), %ecx
movl %ecx, -36(%edx)
-L(fwd_write_32bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_32bytes)
movl -32(%eax), %ecx
movl %ecx, -32(%edx)
-L(fwd_write_28bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_28bytes)
movl -28(%eax), %ecx
movl %ecx, -28(%edx)
-L(fwd_write_24bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_24bytes)
movl -24(%eax), %ecx
movl %ecx, -24(%edx)
-L(fwd_write_20bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_20bytes)
movl -20(%eax), %ecx
movl %ecx, -20(%edx)
-L(fwd_write_16bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_16bytes)
movl -16(%eax), %ecx
movl %ecx, -16(%edx)
-L(fwd_write_12bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_12bytes)
movl -12(%eax), %ecx
movl %ecx, -12(%edx)
-L(fwd_write_8bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_8bytes)
movl -8(%eax), %ecx
movl %ecx, -8(%edx)
-L(fwd_write_4bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_4bytes)
movl -4(%eax), %ecx
movl %ecx, -4(%edx)
-L(fwd_write_0bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_0bytes)
#ifndef USE_AS_BCOPY
# ifdef USE_AS_MEMPCPY
movl %edx, %eax
@@ -1108,7 +1114,7 @@ L(fwd_write_0bytes):
RETURN
ALIGN (4)
-L(fwd_write_5bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_5bytes)
movl -5(%eax), %ecx
movl -4(%eax), %eax
movl %ecx, -5(%edx)
@@ -1123,39 +1129,39 @@ L(fwd_write_5bytes):
RETURN
ALIGN (4)
-L(fwd_write_45bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_45bytes)
movl -45(%eax), %ecx
movl %ecx, -45(%edx)
-L(fwd_write_41bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_41bytes)
movl -41(%eax), %ecx
movl %ecx, -41(%edx)
-L(fwd_write_37bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_37bytes)
movl -37(%eax), %ecx
movl %ecx, -37(%edx)
-L(fwd_write_33bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_33bytes)
movl -33(%eax), %ecx
movl %ecx, -33(%edx)
-L(fwd_write_29bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_29bytes)
movl -29(%eax), %ecx
movl %ecx, -29(%edx)
-L(fwd_write_25bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_25bytes)
movl -25(%eax), %ecx
movl %ecx, -25(%edx)
-L(fwd_write_21bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_21bytes)
movl -21(%eax), %ecx
movl %ecx, -21(%edx)
-L(fwd_write_17bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_17bytes)
movl -17(%eax), %ecx
movl %ecx, -17(%edx)
-L(fwd_write_13bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_13bytes)
movl -13(%eax), %ecx
movl %ecx, -13(%edx)
-L(fwd_write_9bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_9bytes)
movl -9(%eax), %ecx
movl %ecx, -9(%edx)
movl -5(%eax), %ecx
movl %ecx, -5(%edx)
-L(fwd_write_1bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_1bytes)
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
#ifndef USE_AS_BCOPY
@@ -1168,40 +1174,40 @@ L(fwd_write_1bytes):
RETURN
ALIGN (4)
-L(fwd_write_46bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_46bytes)
movl -46(%eax), %ecx
movl %ecx, -46(%edx)
-L(fwd_write_42bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_42bytes)
movl -42(%eax), %ecx
movl %ecx, -42(%edx)
-L(fwd_write_38bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_38bytes)
movl -38(%eax), %ecx
movl %ecx, -38(%edx)
-L(fwd_write_34bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_34bytes)
movl -34(%eax), %ecx
movl %ecx, -34(%edx)
-L(fwd_write_30bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_30bytes)
movl -30(%eax), %ecx
movl %ecx, -30(%edx)
-L(fwd_write_26bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_26bytes)
movl -26(%eax), %ecx
movl %ecx, -26(%edx)
-L(fwd_write_22bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_22bytes)
movl -22(%eax), %ecx
movl %ecx, -22(%edx)
-L(fwd_write_18bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_18bytes)
movl -18(%eax), %ecx
movl %ecx, -18(%edx)
-L(fwd_write_14bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_14bytes)
movl -14(%eax), %ecx
movl %ecx, -14(%edx)
-L(fwd_write_10bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_10bytes)
movl -10(%eax), %ecx
movl %ecx, -10(%edx)
-L(fwd_write_6bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_6bytes)
movl -6(%eax), %ecx
movl %ecx, -6(%edx)
-L(fwd_write_2bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_2bytes)
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
#ifndef USE_AS_BCOPY
@@ -1214,40 +1220,40 @@ L(fwd_write_2bytes):
RETURN
ALIGN (4)
-L(fwd_write_47bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_47bytes)
movl -47(%eax), %ecx
movl %ecx, -47(%edx)
-L(fwd_write_43bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_43bytes)
movl -43(%eax), %ecx
movl %ecx, -43(%edx)
-L(fwd_write_39bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_39bytes)
movl -39(%eax), %ecx
movl %ecx, -39(%edx)
-L(fwd_write_35bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_35bytes)
movl -35(%eax), %ecx
movl %ecx, -35(%edx)
-L(fwd_write_31bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_31bytes)
movl -31(%eax), %ecx
movl %ecx, -31(%edx)
-L(fwd_write_27bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_27bytes)
movl -27(%eax), %ecx
movl %ecx, -27(%edx)
-L(fwd_write_23bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_23bytes)
movl -23(%eax), %ecx
movl %ecx, -23(%edx)
-L(fwd_write_19bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_19bytes)
movl -19(%eax), %ecx
movl %ecx, -19(%edx)
-L(fwd_write_15bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_15bytes)
movl -15(%eax), %ecx
movl %ecx, -15(%edx)
-L(fwd_write_11bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_11bytes)
movl -11(%eax), %ecx
movl %ecx, -11(%edx)
-L(fwd_write_7bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_7bytes)
movl -7(%eax), %ecx
movl %ecx, -7(%edx)
-L(fwd_write_3bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_3bytes)
movzwl -3(%eax), %ecx
movzbl -1(%eax), %eax
movw %cx, -3(%edx)
@@ -1368,40 +1374,40 @@ L(copy_page_by_rep_exit):
RETURN
ALIGN (4)
-L(bk_write_44bytes):
+INDIRECT_JUMP_ENTRY(bk_write_44bytes)
movl 40(%eax), %ecx
movl %ecx, 40(%edx)
-L(bk_write_40bytes):
+INDIRECT_JUMP_ENTRY(bk_write_40bytes)
movl 36(%eax), %ecx
movl %ecx, 36(%edx)
-L(bk_write_36bytes):
+INDIRECT_JUMP_ENTRY(bk_write_36bytes)
movl 32(%eax), %ecx
movl %ecx, 32(%edx)
-L(bk_write_32bytes):
+INDIRECT_JUMP_ENTRY(bk_write_32bytes)
movl 28(%eax), %ecx
movl %ecx, 28(%edx)
-L(bk_write_28bytes):
+INDIRECT_JUMP_ENTRY(bk_write_28bytes)
movl 24(%eax), %ecx
movl %ecx, 24(%edx)
-L(bk_write_24bytes):
+INDIRECT_JUMP_ENTRY(bk_write_24bytes)
movl 20(%eax), %ecx
movl %ecx, 20(%edx)
-L(bk_write_20bytes):
+INDIRECT_JUMP_ENTRY(bk_write_20bytes)
movl 16(%eax), %ecx
movl %ecx, 16(%edx)
-L(bk_write_16bytes):
+INDIRECT_JUMP_ENTRY(bk_write_16bytes)
movl 12(%eax), %ecx
movl %ecx, 12(%edx)
-L(bk_write_12bytes):
+INDIRECT_JUMP_ENTRY(bk_write_12bytes)
movl 8(%eax), %ecx
movl %ecx, 8(%edx)
-L(bk_write_8bytes):
+INDIRECT_JUMP_ENTRY(bk_write_8bytes)
movl 4(%eax), %ecx
movl %ecx, 4(%edx)
-L(bk_write_4bytes):
+INDIRECT_JUMP_ENTRY(bk_write_4bytes)
movl (%eax), %ecx
movl %ecx, (%edx)
-L(bk_write_0bytes):
+INDIRECT_JUMP_ENTRY(bk_write_0bytes)
#ifndef USE_AS_BCOPY
movl DEST(%esp), %eax
# ifdef USE_AS_MEMPCPY
@@ -1412,40 +1418,40 @@ L(bk_write_0bytes):
RETURN
ALIGN (4)
-L(bk_write_45bytes):
+INDIRECT_JUMP_ENTRY(bk_write_45bytes)
movl 41(%eax), %ecx
movl %ecx, 41(%edx)
-L(bk_write_41bytes):
+INDIRECT_JUMP_ENTRY(bk_write_41bytes)
movl 37(%eax), %ecx
movl %ecx, 37(%edx)
-L(bk_write_37bytes):
+INDIRECT_JUMP_ENTRY(bk_write_37bytes)
movl 33(%eax), %ecx
movl %ecx, 33(%edx)
-L(bk_write_33bytes):
+INDIRECT_JUMP_ENTRY(bk_write_33bytes)
movl 29(%eax), %ecx
movl %ecx, 29(%edx)
-L(bk_write_29bytes):
+INDIRECT_JUMP_ENTRY(bk_write_29bytes)
movl 25(%eax), %ecx
movl %ecx, 25(%edx)
-L(bk_write_25bytes):
+INDIRECT_JUMP_ENTRY(bk_write_25bytes)
movl 21(%eax), %ecx
movl %ecx, 21(%edx)
-L(bk_write_21bytes):
+INDIRECT_JUMP_ENTRY(bk_write_21bytes)
movl 17(%eax), %ecx
movl %ecx, 17(%edx)
-L(bk_write_17bytes):
+INDIRECT_JUMP_ENTRY(bk_write_17bytes)
movl 13(%eax), %ecx
movl %ecx, 13(%edx)
-L(bk_write_13bytes):
+INDIRECT_JUMP_ENTRY(bk_write_13bytes)
movl 9(%eax), %ecx
movl %ecx, 9(%edx)
-L(bk_write_9bytes):
+INDIRECT_JUMP_ENTRY(bk_write_9bytes)
movl 5(%eax), %ecx
movl %ecx, 5(%edx)
-L(bk_write_5bytes):
+INDIRECT_JUMP_ENTRY(bk_write_5bytes)
movl 1(%eax), %ecx
movl %ecx, 1(%edx)
-L(bk_write_1bytes):
+INDIRECT_JUMP_ENTRY(bk_write_1bytes)
movzbl (%eax), %ecx
movb %cl, (%edx)
#ifndef USE_AS_BCOPY
@@ -1458,40 +1464,40 @@ L(bk_write_1bytes):
RETURN
ALIGN (4)
-L(bk_write_46bytes):
+INDIRECT_JUMP_ENTRY(bk_write_46bytes)
movl 42(%eax), %ecx
movl %ecx, 42(%edx)
-L(bk_write_42bytes):
+INDIRECT_JUMP_ENTRY(bk_write_42bytes)
movl 38(%eax), %ecx
movl %ecx, 38(%edx)
-L(bk_write_38bytes):
+INDIRECT_JUMP_ENTRY(bk_write_38bytes)
movl 34(%eax), %ecx
movl %ecx, 34(%edx)
-L(bk_write_34bytes):
+INDIRECT_JUMP_ENTRY(bk_write_34bytes)
movl 30(%eax), %ecx
movl %ecx, 30(%edx)
-L(bk_write_30bytes):
+INDIRECT_JUMP_ENTRY(bk_write_30bytes)
movl 26(%eax), %ecx
movl %ecx, 26(%edx)
-L(bk_write_26bytes):
+INDIRECT_JUMP_ENTRY(bk_write_26bytes)
movl 22(%eax), %ecx
movl %ecx, 22(%edx)
-L(bk_write_22bytes):
+INDIRECT_JUMP_ENTRY(bk_write_22bytes)
movl 18(%eax), %ecx
movl %ecx, 18(%edx)
-L(bk_write_18bytes):
+INDIRECT_JUMP_ENTRY(bk_write_18bytes)
movl 14(%eax), %ecx
movl %ecx, 14(%edx)
-L(bk_write_14bytes):
+INDIRECT_JUMP_ENTRY(bk_write_14bytes)
movl 10(%eax), %ecx
movl %ecx, 10(%edx)
-L(bk_write_10bytes):
+INDIRECT_JUMP_ENTRY(bk_write_10bytes)
movl 6(%eax), %ecx
movl %ecx, 6(%edx)
-L(bk_write_6bytes):
+INDIRECT_JUMP_ENTRY(bk_write_6bytes)
movl 2(%eax), %ecx
movl %ecx, 2(%edx)
-L(bk_write_2bytes):
+INDIRECT_JUMP_ENTRY(bk_write_2bytes)
movzwl (%eax), %ecx
movw %cx, (%edx)
#ifndef USE_AS_BCOPY
@@ -1504,40 +1510,40 @@ L(bk_write_2bytes):
RETURN
ALIGN (4)
-L(bk_write_47bytes):
+INDIRECT_JUMP_ENTRY(bk_write_47bytes)
movl 43(%eax), %ecx
movl %ecx, 43(%edx)
-L(bk_write_43bytes):
+INDIRECT_JUMP_ENTRY(bk_write_43bytes)
movl 39(%eax), %ecx
movl %ecx, 39(%edx)
-L(bk_write_39bytes):
+INDIRECT_JUMP_ENTRY(bk_write_39bytes)
movl 35(%eax), %ecx
movl %ecx, 35(%edx)
-L(bk_write_35bytes):
+INDIRECT_JUMP_ENTRY(bk_write_35bytes)
movl 31(%eax), %ecx
movl %ecx, 31(%edx)
-L(bk_write_31bytes):
+INDIRECT_JUMP_ENTRY(bk_write_31bytes)
movl 27(%eax), %ecx
movl %ecx, 27(%edx)
-L(bk_write_27bytes):
+INDIRECT_JUMP_ENTRY(bk_write_27bytes)
movl 23(%eax), %ecx
movl %ecx, 23(%edx)
-L(bk_write_23bytes):
+INDIRECT_JUMP_ENTRY(bk_write_23bytes)
movl 19(%eax), %ecx
movl %ecx, 19(%edx)
-L(bk_write_19bytes):
+INDIRECT_JUMP_ENTRY(bk_write_19bytes)
movl 15(%eax), %ecx
movl %ecx, 15(%edx)
-L(bk_write_15bytes):
+INDIRECT_JUMP_ENTRY(bk_write_15bytes)
movl 11(%eax), %ecx
movl %ecx, 11(%edx)
-L(bk_write_11bytes):
+INDIRECT_JUMP_ENTRY(bk_write_11bytes)
movl 7(%eax), %ecx
movl %ecx, 7(%edx)
-L(bk_write_7bytes):
+INDIRECT_JUMP_ENTRY(bk_write_7bytes)
movl 3(%eax), %ecx
movl %ecx, 3(%edx)
-L(bk_write_3bytes):
+INDIRECT_JUMP_ENTRY(bk_write_3bytes)
movzwl 1(%eax), %ecx
movw %cx, 1(%edx)
movzbl (%eax), %eax
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1be897c10731565d7eb2a08409b9713917fe735f
commit 1be897c10731565d7eb2a08409b9713917fe735f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 15:57:36 2018 -0800
i386: Use INDIRECT_JUMP_ENTRY in memcmp-sse4.S
* sysdeps/i386/i686/multiarch/memcmp-sse4.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/i386/i686/multiarch/memcmp-sse4.S b/sysdeps/i386/i686/multiarch/memcmp-sse4.S
index be37108..ba8103b 100644
--- a/sysdeps/i386/i686/multiarch/memcmp-sse4.S
+++ b/sysdeps/i386/i686/multiarch/memcmp-sse4.S
@@ -165,7 +165,7 @@ L(above):
# endif
.p2align 4
-L(0bytes):
+INDIRECT_JUMP_ENTRY(0bytes)
POP (%ebx)
xor %eax, %eax
ret
@@ -250,7 +250,7 @@ L(64bytesormore_loop):
# ifdef USE_AS_WMEMCMP
/* Label needs only for table_64bytes filling */
-L(unreal_case):
+INDIRECT_JUMP_ENTRY(unreal_case)
/* no code here */
# endif
@@ -267,22 +267,22 @@ L(find_64diff):
# ifndef USE_AS_WMEMCMP
.p2align 4
-L(16bytes):
+INDIRECT_JUMP_ENTRY(16bytes)
mov -16(%eax), %ecx
mov -16(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(12bytes):
+INDIRECT_JUMP_ENTRY(12bytes)
mov -12(%eax), %ecx
mov -12(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(8bytes):
+INDIRECT_JUMP_ENTRY(8bytes)
mov -8(%eax), %ecx
mov -8(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(4bytes):
+INDIRECT_JUMP_ENTRY(4bytes)
mov -4(%eax), %ecx
mov -4(%edx), %ebx
cmp %ebx, %ecx
@@ -291,19 +291,19 @@ L(4bytes):
RETURN
# else
.p2align 4
-L(16bytes):
+INDIRECT_JUMP_ENTRY(16bytes)
mov -16(%eax), %ecx
cmp -16(%edx), %ecx
jne L(find_diff)
-L(12bytes):
+INDIRECT_JUMP_ENTRY(12bytes)
mov -12(%eax), %ecx
cmp -12(%edx), %ecx
jne L(find_diff)
-L(8bytes):
+INDIRECT_JUMP_ENTRY(8bytes)
mov -8(%eax), %ecx
cmp -8(%edx), %ecx
jne L(find_diff)
-L(4bytes):
+INDIRECT_JUMP_ENTRY(4bytes)
mov -4(%eax), %ecx
cmp -4(%edx), %ecx
mov $0, %eax
@@ -313,36 +313,36 @@ L(4bytes):
# ifndef USE_AS_WMEMCMP
.p2align 4
-L(49bytes):
+INDIRECT_JUMP_ENTRY(49bytes)
movdqu -49(%eax), %xmm1
movdqu -49(%edx), %xmm2
mov $-49, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(33bytes):
+INDIRECT_JUMP_ENTRY(33bytes)
movdqu -33(%eax), %xmm1
movdqu -33(%edx), %xmm2
mov $-33, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(17bytes):
+INDIRECT_JUMP_ENTRY(17bytes)
mov -17(%eax), %ecx
mov -17(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(13bytes):
+INDIRECT_JUMP_ENTRY(13bytes)
mov -13(%eax), %ecx
mov -13(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(9bytes):
+INDIRECT_JUMP_ENTRY(9bytes)
mov -9(%eax), %ecx
mov -9(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(5bytes):
+INDIRECT_JUMP_ENTRY(5bytes)
mov -5(%eax), %ecx
mov -5(%edx), %ebx
cmp %ebx, %ecx
@@ -354,41 +354,41 @@ L(5bytes):
RETURN
.p2align 4
-L(50bytes):
+INDIRECT_JUMP_ENTRY(50bytes)
mov $-50, %ebx
movdqu -50(%eax), %xmm1
movdqu -50(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(34bytes):
+INDIRECT_JUMP_ENTRY(34bytes)
mov $-34, %ebx
movdqu -34(%eax), %xmm1
movdqu -34(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(18bytes):
+INDIRECT_JUMP_ENTRY(18bytes)
mov -18(%eax), %ecx
mov -18(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(14bytes):
+INDIRECT_JUMP_ENTRY(14bytes)
mov -14(%eax), %ecx
mov -14(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(10bytes):
+INDIRECT_JUMP_ENTRY(10bytes)
mov -10(%eax), %ecx
mov -10(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(6bytes):
+INDIRECT_JUMP_ENTRY(6bytes)
mov -6(%eax), %ecx
mov -6(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(2bytes):
+INDIRECT_JUMP_ENTRY(2bytes)
movzwl -2(%eax), %ecx
movzwl -2(%edx), %ebx
cmp %bl, %cl
@@ -399,48 +399,48 @@ L(2bytes):
RETURN
.p2align 4
-L(51bytes):
+INDIRECT_JUMP_ENTRY(51bytes)
mov $-51, %ebx
movdqu -51(%eax), %xmm1
movdqu -51(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(35bytes):
+INDIRECT_JUMP_ENTRY(35bytes)
mov $-35, %ebx
movdqu -35(%eax), %xmm1
movdqu -35(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(19bytes):
+INDIRECT_JUMP_ENTRY(19bytes)
movl -19(%eax), %ecx
movl -19(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(15bytes):
+INDIRECT_JUMP_ENTRY(15bytes)
movl -15(%eax), %ecx
movl -15(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(11bytes):
+INDIRECT_JUMP_ENTRY(11bytes)
movl -11(%eax), %ecx
movl -11(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(7bytes):
+INDIRECT_JUMP_ENTRY(7bytes)
movl -7(%eax), %ecx
movl -7(%edx), %ebx
cmp %ebx, %ecx
jne L(find_diff)
-L(3bytes):
+INDIRECT_JUMP_ENTRY(3bytes)
movzwl -3(%eax), %ecx
movzwl -3(%edx), %ebx
cmpb %bl, %cl
jne L(end)
cmp %bx, %cx
jne L(end)
-L(1bytes):
+INDIRECT_JUMP_ENTRY(1bytes)
movzbl -1(%eax), %eax
cmpb -1(%edx), %al
mov $0, %eax
@@ -448,21 +448,21 @@ L(1bytes):
RETURN
# endif
.p2align 4
-L(52bytes):
+INDIRECT_JUMP_ENTRY(52bytes)
movdqu -52(%eax), %xmm1
movdqu -52(%edx), %xmm2
mov $-52, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(36bytes):
+INDIRECT_JUMP_ENTRY(36bytes)
movdqu -36(%eax), %xmm1
movdqu -36(%edx), %xmm2
mov $-36, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(20bytes):
+INDIRECT_JUMP_ENTRY(20bytes)
movdqu -20(%eax), %xmm1
movdqu -20(%edx), %xmm2
mov $-20, %ebx
@@ -482,21 +482,21 @@ L(20bytes):
# ifndef USE_AS_WMEMCMP
.p2align 4
-L(53bytes):
+INDIRECT_JUMP_ENTRY(53bytes)
movdqu -53(%eax), %xmm1
movdqu -53(%edx), %xmm2
mov $-53, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(37bytes):
+INDIRECT_JUMP_ENTRY(37bytes)
mov $-37, %ebx
movdqu -37(%eax), %xmm1
movdqu -37(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(21bytes):
+INDIRECT_JUMP_ENTRY(21bytes)
mov $-21, %ebx
movdqu -21(%eax), %xmm1
movdqu -21(%edx), %xmm2
@@ -514,21 +514,21 @@ L(21bytes):
RETURN
.p2align 4
-L(54bytes):
+INDIRECT_JUMP_ENTRY(54bytes)
movdqu -54(%eax), %xmm1
movdqu -54(%edx), %xmm2
mov $-54, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(38bytes):
+INDIRECT_JUMP_ENTRY(38bytes)
mov $-38, %ebx
movdqu -38(%eax), %xmm1
movdqu -38(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(22bytes):
+INDIRECT_JUMP_ENTRY(22bytes)
mov $-22, %ebx
movdqu -22(%eax), %xmm1
movdqu -22(%edx), %xmm2
@@ -550,21 +550,21 @@ L(22bytes):
RETURN
.p2align 4
-L(55bytes):
+INDIRECT_JUMP_ENTRY(55bytes)
movdqu -55(%eax), %xmm1
movdqu -55(%edx), %xmm2
mov $-55, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(39bytes):
+INDIRECT_JUMP_ENTRY(39bytes)
mov $-39, %ebx
movdqu -39(%eax), %xmm1
movdqu -39(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(23bytes):
+INDIRECT_JUMP_ENTRY(23bytes)
mov $-23, %ebx
movdqu -23(%eax), %xmm1
movdqu -23(%edx), %xmm2
@@ -588,21 +588,21 @@ L(23bytes):
RETURN
# endif
.p2align 4
-L(56bytes):
+INDIRECT_JUMP_ENTRY(56bytes)
movdqu -56(%eax), %xmm1
movdqu -56(%edx), %xmm2
mov $-56, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(40bytes):
+INDIRECT_JUMP_ENTRY(40bytes)
mov $-40, %ebx
movdqu -40(%eax), %xmm1
movdqu -40(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(24bytes):
+INDIRECT_JUMP_ENTRY(24bytes)
mov $-24, %ebx
movdqu -24(%eax), %xmm1
movdqu -24(%edx), %xmm2
@@ -632,21 +632,21 @@ L(24bytes):
# ifndef USE_AS_WMEMCMP
.p2align 4
-L(57bytes):
+INDIRECT_JUMP_ENTRY(57bytes)
movdqu -57(%eax), %xmm1
movdqu -57(%edx), %xmm2
mov $-57, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(41bytes):
+INDIRECT_JUMP_ENTRY(41bytes)
mov $-41, %ebx
movdqu -41(%eax), %xmm1
movdqu -41(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(25bytes):
+INDIRECT_JUMP_ENTRY(25bytes)
mov $-25, %ebx
movdqu -25(%eax), %xmm1
movdqu -25(%edx), %xmm2
@@ -668,21 +668,21 @@ L(25bytes):
RETURN
.p2align 4
-L(58bytes):
+INDIRECT_JUMP_ENTRY(58bytes)
movdqu -58(%eax), %xmm1
movdqu -58(%edx), %xmm2
mov $-58, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(42bytes):
+INDIRECT_JUMP_ENTRY(42bytes)
mov $-42, %ebx
movdqu -42(%eax), %xmm1
movdqu -42(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(26bytes):
+INDIRECT_JUMP_ENTRY(26bytes)
mov $-26, %ebx
movdqu -26(%eax), %xmm1
movdqu -26(%edx), %xmm2
@@ -710,21 +710,21 @@ L(26bytes):
RETURN
.p2align 4
-L(59bytes):
+INDIRECT_JUMP_ENTRY(59bytes)
movdqu -59(%eax), %xmm1
movdqu -59(%edx), %xmm2
mov $-59, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(43bytes):
+INDIRECT_JUMP_ENTRY(43bytes)
mov $-43, %ebx
movdqu -43(%eax), %xmm1
movdqu -43(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(27bytes):
+INDIRECT_JUMP_ENTRY(27bytes)
mov $-27, %ebx
movdqu -27(%eax), %xmm1
movdqu -27(%edx), %xmm2
@@ -752,21 +752,21 @@ L(27bytes):
RETURN
# endif
.p2align 4
-L(60bytes):
+INDIRECT_JUMP_ENTRY(60bytes)
movdqu -60(%eax), %xmm1
movdqu -60(%edx), %xmm2
mov $-60, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(44bytes):
+INDIRECT_JUMP_ENTRY(44bytes)
mov $-44, %ebx
movdqu -44(%eax), %xmm1
movdqu -44(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(28bytes):
+INDIRECT_JUMP_ENTRY(28bytes)
mov $-28, %ebx
movdqu -28(%eax), %xmm1
movdqu -28(%edx), %xmm2
@@ -805,21 +805,21 @@ L(28bytes):
# ifndef USE_AS_WMEMCMP
.p2align 4
-L(61bytes):
+INDIRECT_JUMP_ENTRY(61bytes)
movdqu -61(%eax), %xmm1
movdqu -61(%edx), %xmm2
mov $-61, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(45bytes):
+INDIRECT_JUMP_ENTRY(45bytes)
mov $-45, %ebx
movdqu -45(%eax), %xmm1
movdqu -45(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(29bytes):
+INDIRECT_JUMP_ENTRY(29bytes)
mov $-29, %ebx
movdqu -29(%eax), %xmm1
movdqu -29(%edx), %xmm2
@@ -848,21 +848,21 @@ L(29bytes):
RETURN
.p2align 4
-L(62bytes):
+INDIRECT_JUMP_ENTRY(62bytes)
movdqu -62(%eax), %xmm1
movdqu -62(%edx), %xmm2
mov $-62, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(46bytes):
+INDIRECT_JUMP_ENTRY(46bytes)
mov $-46, %ebx
movdqu -46(%eax), %xmm1
movdqu -46(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(30bytes):
+INDIRECT_JUMP_ENTRY(30bytes)
mov $-30, %ebx
movdqu -30(%eax), %xmm1
movdqu -30(%edx), %xmm2
@@ -891,21 +891,21 @@ L(30bytes):
RETURN
.p2align 4
-L(63bytes):
+INDIRECT_JUMP_ENTRY(63bytes)
movdqu -63(%eax), %xmm1
movdqu -63(%edx), %xmm2
mov $-63, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(47bytes):
+INDIRECT_JUMP_ENTRY(47bytes)
mov $-47, %ebx
movdqu -47(%eax), %xmm1
movdqu -47(%edx), %xmm2
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(31bytes):
+INDIRECT_JUMP_ENTRY(31bytes)
mov $-31, %ebx
movdqu -31(%eax), %xmm1
movdqu -31(%edx), %xmm2
@@ -939,21 +939,21 @@ L(31bytes):
# endif
.p2align 4
-L(64bytes):
+INDIRECT_JUMP_ENTRY(64bytes)
movdqu -64(%eax), %xmm1
movdqu -64(%edx), %xmm2
mov $-64, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(48bytes):
+INDIRECT_JUMP_ENTRY(48bytes)
movdqu -48(%eax), %xmm1
movdqu -48(%edx), %xmm2
mov $-48, %ebx
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(32bytes):
+INDIRECT_JUMP_ENTRY(32bytes)
movdqu -32(%eax), %xmm1
movdqu -32(%edx), %xmm2
mov $-32, %ebx
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=019692af7295445904b6674d105a90086488b312
commit 019692af7295445904b6674d105a90086488b312
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 15:56:38 2018 -0800
i386: Use INDIRECT_JUMP_ENTRY in memset-sse2.S
* sysdeps/i386/i686/multiarch/memset-sse2.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/i386/i686/multiarch/memset-sse2.S b/sysdeps/i386/i686/multiarch/memset-sse2.S
index 8869c80..1d70737 100644
--- a/sysdeps/i386/i686/multiarch/memset-sse2.S
+++ b/sysdeps/i386/i686/multiarch/memset-sse2.S
@@ -146,80 +146,80 @@ L(table_less_32bytes):
.popsection
ALIGN (4)
-L(write_28bytes):
+INDIRECT_JUMP_ENTRY(write_28bytes)
movl %eax, -28(%edx)
-L(write_24bytes):
+INDIRECT_JUMP_ENTRY(write_24bytes)
movl %eax, -24(%edx)
-L(write_20bytes):
+INDIRECT_JUMP_ENTRY(write_20bytes)
movl %eax, -20(%edx)
-L(write_16bytes):
+INDIRECT_JUMP_ENTRY(write_16bytes)
movl %eax, -16(%edx)
-L(write_12bytes):
+INDIRECT_JUMP_ENTRY(write_12bytes)
movl %eax, -12(%edx)
-L(write_8bytes):
+INDIRECT_JUMP_ENTRY(write_8bytes)
movl %eax, -8(%edx)
-L(write_4bytes):
+INDIRECT_JUMP_ENTRY(write_4bytes)
movl %eax, -4(%edx)
-L(write_0bytes):
+INDIRECT_JUMP_ENTRY(write_0bytes)
SETRTNVAL
RETURN
ALIGN (4)
-L(write_29bytes):
+INDIRECT_JUMP_ENTRY(write_29bytes)
movl %eax, -29(%edx)
-L(write_25bytes):
+INDIRECT_JUMP_ENTRY(write_25bytes)
movl %eax, -25(%edx)
-L(write_21bytes):
+INDIRECT_JUMP_ENTRY(write_21bytes)
movl %eax, -21(%edx)
-L(write_17bytes):
+INDIRECT_JUMP_ENTRY(write_17bytes)
movl %eax, -17(%edx)
-L(write_13bytes):
+INDIRECT_JUMP_ENTRY(write_13bytes)
movl %eax, -13(%edx)
-L(write_9bytes):
+INDIRECT_JUMP_ENTRY(write_9bytes)
movl %eax, -9(%edx)
-L(write_5bytes):
+INDIRECT_JUMP_ENTRY(write_5bytes)
movl %eax, -5(%edx)
-L(write_1bytes):
+INDIRECT_JUMP_ENTRY(write_1bytes)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(write_30bytes):
+INDIRECT_JUMP_ENTRY(write_30bytes)
movl %eax, -30(%edx)
-L(write_26bytes):
+INDIRECT_JUMP_ENTRY(write_26bytes)
movl %eax, -26(%edx)
-L(write_22bytes):
+INDIRECT_JUMP_ENTRY(write_22bytes)
movl %eax, -22(%edx)
-L(write_18bytes):
+INDIRECT_JUMP_ENTRY(write_18bytes)
movl %eax, -18(%edx)
-L(write_14bytes):
+INDIRECT_JUMP_ENTRY(write_14bytes)
movl %eax, -14(%edx)
-L(write_10bytes):
+INDIRECT_JUMP_ENTRY(write_10bytes)
movl %eax, -10(%edx)
-L(write_6bytes):
+INDIRECT_JUMP_ENTRY(write_6bytes)
movl %eax, -6(%edx)
-L(write_2bytes):
+INDIRECT_JUMP_ENTRY(write_2bytes)
movw %ax, -2(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(write_31bytes):
+INDIRECT_JUMP_ENTRY(write_31bytes)
movl %eax, -31(%edx)
-L(write_27bytes):
+INDIRECT_JUMP_ENTRY(write_27bytes)
movl %eax, -27(%edx)
-L(write_23bytes):
+INDIRECT_JUMP_ENTRY(write_23bytes)
movl %eax, -23(%edx)
-L(write_19bytes):
+INDIRECT_JUMP_ENTRY(write_19bytes)
movl %eax, -19(%edx)
-L(write_15bytes):
+INDIRECT_JUMP_ENTRY(write_15bytes)
movl %eax, -15(%edx)
-L(write_11bytes):
+INDIRECT_JUMP_ENTRY(write_11bytes)
movl %eax, -11(%edx)
-L(write_7bytes):
+INDIRECT_JUMP_ENTRY(write_7bytes)
movl %eax, -7(%edx)
-L(write_3bytes):
+INDIRECT_JUMP_ENTRY(write_3bytes)
movw %ax, -3(%edx)
movb %al, -1(%edx)
SETRTNVAL
@@ -520,163 +520,163 @@ L(table_16_128bytes):
.popsection
ALIGN (4)
-L(aligned_16_112bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_112bytes)
movdqa %xmm0, -112(%edx)
-L(aligned_16_96bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_96bytes)
movdqa %xmm0, -96(%edx)
-L(aligned_16_80bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_80bytes)
movdqa %xmm0, -80(%edx)
-L(aligned_16_64bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_64bytes)
movdqa %xmm0, -64(%edx)
-L(aligned_16_48bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_48bytes)
movdqa %xmm0, -48(%edx)
-L(aligned_16_32bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_32bytes)
movdqa %xmm0, -32(%edx)
-L(aligned_16_16bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_16bytes)
movdqa %xmm0, -16(%edx)
-L(aligned_16_0bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_0bytes)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_113bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_113bytes)
movdqa %xmm0, -113(%edx)
-L(aligned_16_97bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_97bytes)
movdqa %xmm0, -97(%edx)
-L(aligned_16_81bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_81bytes)
movdqa %xmm0, -81(%edx)
-L(aligned_16_65bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_65bytes)
movdqa %xmm0, -65(%edx)
-L(aligned_16_49bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_49bytes)
movdqa %xmm0, -49(%edx)
-L(aligned_16_33bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_33bytes)
movdqa %xmm0, -33(%edx)
-L(aligned_16_17bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_17bytes)
movdqa %xmm0, -17(%edx)
-L(aligned_16_1bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_1bytes)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_114bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_114bytes)
movdqa %xmm0, -114(%edx)
-L(aligned_16_98bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_98bytes)
movdqa %xmm0, -98(%edx)
-L(aligned_16_82bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_82bytes)
movdqa %xmm0, -82(%edx)
-L(aligned_16_66bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_66bytes)
movdqa %xmm0, -66(%edx)
-L(aligned_16_50bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_50bytes)
movdqa %xmm0, -50(%edx)
-L(aligned_16_34bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_34bytes)
movdqa %xmm0, -34(%edx)
-L(aligned_16_18bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_18bytes)
movdqa %xmm0, -18(%edx)
-L(aligned_16_2bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_2bytes)
movw %ax, -2(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_115bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_115bytes)
movdqa %xmm0, -115(%edx)
-L(aligned_16_99bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_99bytes)
movdqa %xmm0, -99(%edx)
-L(aligned_16_83bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_83bytes)
movdqa %xmm0, -83(%edx)
-L(aligned_16_67bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_67bytes)
movdqa %xmm0, -67(%edx)
-L(aligned_16_51bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_51bytes)
movdqa %xmm0, -51(%edx)
-L(aligned_16_35bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_35bytes)
movdqa %xmm0, -35(%edx)
-L(aligned_16_19bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_19bytes)
movdqa %xmm0, -19(%edx)
-L(aligned_16_3bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_3bytes)
movw %ax, -3(%edx)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_116bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_116bytes)
movdqa %xmm0, -116(%edx)
-L(aligned_16_100bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_100bytes)
movdqa %xmm0, -100(%edx)
-L(aligned_16_84bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_84bytes)
movdqa %xmm0, -84(%edx)
-L(aligned_16_68bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_68bytes)
movdqa %xmm0, -68(%edx)
-L(aligned_16_52bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_52bytes)
movdqa %xmm0, -52(%edx)
-L(aligned_16_36bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_36bytes)
movdqa %xmm0, -36(%edx)
-L(aligned_16_20bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_20bytes)
movdqa %xmm0, -20(%edx)
-L(aligned_16_4bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_4bytes)
movl %eax, -4(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_117bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_117bytes)
movdqa %xmm0, -117(%edx)
-L(aligned_16_101bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_101bytes)
movdqa %xmm0, -101(%edx)
-L(aligned_16_85bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_85bytes)
movdqa %xmm0, -85(%edx)
-L(aligned_16_69bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_69bytes)
movdqa %xmm0, -69(%edx)
-L(aligned_16_53bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_53bytes)
movdqa %xmm0, -53(%edx)
-L(aligned_16_37bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_37bytes)
movdqa %xmm0, -37(%edx)
-L(aligned_16_21bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_21bytes)
movdqa %xmm0, -21(%edx)
-L(aligned_16_5bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_5bytes)
movl %eax, -5(%edx)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_118bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_118bytes)
movdqa %xmm0, -118(%edx)
-L(aligned_16_102bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_102bytes)
movdqa %xmm0, -102(%edx)
-L(aligned_16_86bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_86bytes)
movdqa %xmm0, -86(%edx)
-L(aligned_16_70bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_70bytes)
movdqa %xmm0, -70(%edx)
-L(aligned_16_54bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_54bytes)
movdqa %xmm0, -54(%edx)
-L(aligned_16_38bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_38bytes)
movdqa %xmm0, -38(%edx)
-L(aligned_16_22bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_22bytes)
movdqa %xmm0, -22(%edx)
-L(aligned_16_6bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_6bytes)
movl %eax, -6(%edx)
movw %ax, -2(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_119bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_119bytes)
movdqa %xmm0, -119(%edx)
-L(aligned_16_103bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_103bytes)
movdqa %xmm0, -103(%edx)
-L(aligned_16_87bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_87bytes)
movdqa %xmm0, -87(%edx)
-L(aligned_16_71bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_71bytes)
movdqa %xmm0, -71(%edx)
-L(aligned_16_55bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_55bytes)
movdqa %xmm0, -55(%edx)
-L(aligned_16_39bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_39bytes)
movdqa %xmm0, -39(%edx)
-L(aligned_16_23bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_23bytes)
movdqa %xmm0, -23(%edx)
-L(aligned_16_7bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_7bytes)
movl %eax, -7(%edx)
movw %ax, -3(%edx)
movb %al, -1(%edx)
@@ -684,83 +684,83 @@ L(aligned_16_7bytes):
RETURN
ALIGN (4)
-L(aligned_16_120bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_120bytes)
movdqa %xmm0, -120(%edx)
-L(aligned_16_104bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_104bytes)
movdqa %xmm0, -104(%edx)
-L(aligned_16_88bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_88bytes)
movdqa %xmm0, -88(%edx)
-L(aligned_16_72bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_72bytes)
movdqa %xmm0, -72(%edx)
-L(aligned_16_56bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_56bytes)
movdqa %xmm0, -56(%edx)
-L(aligned_16_40bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_40bytes)
movdqa %xmm0, -40(%edx)
-L(aligned_16_24bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_24bytes)
movdqa %xmm0, -24(%edx)
-L(aligned_16_8bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_8bytes)
movq %xmm0, -8(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_121bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_121bytes)
movdqa %xmm0, -121(%edx)
-L(aligned_16_105bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_105bytes)
movdqa %xmm0, -105(%edx)
-L(aligned_16_89bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_89bytes)
movdqa %xmm0, -89(%edx)
-L(aligned_16_73bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_73bytes)
movdqa %xmm0, -73(%edx)
-L(aligned_16_57bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_57bytes)
movdqa %xmm0, -57(%edx)
-L(aligned_16_41bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_41bytes)
movdqa %xmm0, -41(%edx)
-L(aligned_16_25bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_25bytes)
movdqa %xmm0, -25(%edx)
-L(aligned_16_9bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_9bytes)
movq %xmm0, -9(%edx)
movb %al, -1(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_122bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_122bytes)
movdqa %xmm0, -122(%edx)
-L(aligned_16_106bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_106bytes)
movdqa %xmm0, -106(%edx)
-L(aligned_16_90bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_90bytes)
movdqa %xmm0, -90(%edx)
-L(aligned_16_74bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_74bytes)
movdqa %xmm0, -74(%edx)
-L(aligned_16_58bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_58bytes)
movdqa %xmm0, -58(%edx)
-L(aligned_16_42bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_42bytes)
movdqa %xmm0, -42(%edx)
-L(aligned_16_26bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_26bytes)
movdqa %xmm0, -26(%edx)
-L(aligned_16_10bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_10bytes)
movq %xmm0, -10(%edx)
movw %ax, -2(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_123bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_123bytes)
movdqa %xmm0, -123(%edx)
-L(aligned_16_107bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_107bytes)
movdqa %xmm0, -107(%edx)
-L(aligned_16_91bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_91bytes)
movdqa %xmm0, -91(%edx)
-L(aligned_16_75bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_75bytes)
movdqa %xmm0, -75(%edx)
-L(aligned_16_59bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_59bytes)
movdqa %xmm0, -59(%edx)
-L(aligned_16_43bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_43bytes)
movdqa %xmm0, -43(%edx)
-L(aligned_16_27bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_27bytes)
movdqa %xmm0, -27(%edx)
-L(aligned_16_11bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_11bytes)
movq %xmm0, -11(%edx)
movw %ax, -3(%edx)
movb %al, -1(%edx)
@@ -768,42 +768,42 @@ L(aligned_16_11bytes):
RETURN
ALIGN (4)
-L(aligned_16_124bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_124bytes)
movdqa %xmm0, -124(%edx)
-L(aligned_16_108bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_108bytes)
movdqa %xmm0, -108(%edx)
-L(aligned_16_92bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_92bytes)
movdqa %xmm0, -92(%edx)
-L(aligned_16_76bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_76bytes)
movdqa %xmm0, -76(%edx)
-L(aligned_16_60bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_60bytes)
movdqa %xmm0, -60(%edx)
-L(aligned_16_44bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_44bytes)
movdqa %xmm0, -44(%edx)
-L(aligned_16_28bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_28bytes)
movdqa %xmm0, -28(%edx)
-L(aligned_16_12bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_12bytes)
movq %xmm0, -12(%edx)
movl %eax, -4(%edx)
SETRTNVAL
RETURN
ALIGN (4)
-L(aligned_16_125bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_125bytes)
movdqa %xmm0, -125(%edx)
-L(aligned_16_109bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_109bytes)
movdqa %xmm0, -109(%edx)
-L(aligned_16_93bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_93bytes)
movdqa %xmm0, -93(%edx)
-L(aligned_16_77bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_77bytes)
movdqa %xmm0, -77(%edx)
-L(aligned_16_61bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_61bytes)
movdqa %xmm0, -61(%edx)
-L(aligned_16_45bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_45bytes)
movdqa %xmm0, -45(%edx)
-L(aligned_16_29bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_29bytes)
movdqa %xmm0, -29(%edx)
-L(aligned_16_13bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_13bytes)
movq %xmm0, -13(%edx)
movl %eax, -5(%edx)
movb %al, -1(%edx)
@@ -811,21 +811,21 @@ L(aligned_16_13bytes):
RETURN
ALIGN (4)
-L(aligned_16_126bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_126bytes)
movdqa %xmm0, -126(%edx)
-L(aligned_16_110bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_110bytes)
movdqa %xmm0, -110(%edx)
-L(aligned_16_94bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_94bytes)
movdqa %xmm0, -94(%edx)
-L(aligned_16_78bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_78bytes)
movdqa %xmm0, -78(%edx)
-L(aligned_16_62bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_62bytes)
movdqa %xmm0, -62(%edx)
-L(aligned_16_46bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_46bytes)
movdqa %xmm0, -46(%edx)
-L(aligned_16_30bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_30bytes)
movdqa %xmm0, -30(%edx)
-L(aligned_16_14bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_14bytes)
movq %xmm0, -14(%edx)
movl %eax, -6(%edx)
movw %ax, -2(%edx)
@@ -833,21 +833,21 @@ L(aligned_16_14bytes):
RETURN
ALIGN (4)
-L(aligned_16_127bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_127bytes)
movdqa %xmm0, -127(%edx)
-L(aligned_16_111bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_111bytes)
movdqa %xmm0, -111(%edx)
-L(aligned_16_95bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_95bytes)
movdqa %xmm0, -95(%edx)
-L(aligned_16_79bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_79bytes)
movdqa %xmm0, -79(%edx)
-L(aligned_16_63bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_63bytes)
movdqa %xmm0, -63(%edx)
-L(aligned_16_47bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_47bytes)
movdqa %xmm0, -47(%edx)
-L(aligned_16_31bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_31bytes)
movdqa %xmm0, -31(%edx)
-L(aligned_16_15bytes):
+INDIRECT_JUMP_ENTRY(aligned_16_15bytes)
movq %xmm0, -15(%edx)
movl %eax, -7(%edx)
movw %ax, -3(%edx)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cfa013a81a25a5d4efbad0288cb078a4cb43a987
commit cfa013a81a25a5d4efbad0288cb078a4cb43a987
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 15:54:52 2018 -0800
i386: Use INDIRECT_JUMP_ENTRY in i686/memcmp.S
* sysdeps/i386/i686/memcmp.S: Use INDIRECT_JUMP_ENTRY with
indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/i386/i686/memcmp.S b/sysdeps/i386/i686/memcmp.S
index a0bc9ec..2415ca4 100644
--- a/sysdeps/i386/i686/memcmp.S
+++ b/sysdeps/i386/i686/memcmp.S
@@ -83,42 +83,42 @@ L(not_1):
jmp *%ebx
ALIGN (4)
-L(28bytes):
+INDIRECT_JUMP_ENTRY(28bytes)
movl -28(%esi), %eax
movl -28(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(24bytes):
+INDIRECT_JUMP_ENTRY(24bytes)
movl -24(%esi), %eax
movl -24(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(20bytes):
+INDIRECT_JUMP_ENTRY(20bytes)
movl -20(%esi), %eax
movl -20(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(16bytes):
+INDIRECT_JUMP_ENTRY(16bytes)
movl -16(%esi), %eax
movl -16(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(12bytes):
+INDIRECT_JUMP_ENTRY(12bytes)
movl -12(%esi), %eax
movl -12(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(8bytes):
+INDIRECT_JUMP_ENTRY(8bytes)
movl -8(%esi), %eax
movl -8(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(4bytes):
+INDIRECT_JUMP_ENTRY(4bytes)
movl -4(%esi), %eax
movl -4(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(0bytes):
+INDIRECT_JUMP_ENTRY(0bytes)
popl %esi
cfi_adjust_cfa_offset (-4)
cfi_restore (esi)
@@ -128,42 +128,42 @@ L(0bytes):
cfi_adjust_cfa_offset (8)
cfi_rel_offset (esi, 0)
cfi_rel_offset (ebx, 4)
-L(29bytes):
+INDIRECT_JUMP_ENTRY(29bytes)
movl -29(%esi), %eax
movl -29(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(25bytes):
+INDIRECT_JUMP_ENTRY(25bytes)
movl -25(%esi), %eax
movl -25(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(21bytes):
+INDIRECT_JUMP_ENTRY(21bytes)
movl -21(%esi), %eax
movl -21(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(17bytes):
+INDIRECT_JUMP_ENTRY(17bytes)
movl -17(%esi), %eax
movl -17(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(13bytes):
+INDIRECT_JUMP_ENTRY(13bytes)
movl -13(%esi), %eax
movl -13(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(9bytes):
+INDIRECT_JUMP_ENTRY(9bytes)
movl -9(%esi), %eax
movl -9(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(5bytes):
+INDIRECT_JUMP_ENTRY(5bytes)
movl -5(%esi), %eax
movl -5(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(1bytes):
+INDIRECT_JUMP_ENTRY(1bytes)
movzbl -1(%esi), %eax
cmpb -1(%edx), %al
jne L(set)
@@ -176,42 +176,42 @@ L(1bytes):
cfi_adjust_cfa_offset (8)
cfi_rel_offset (esi, 0)
cfi_rel_offset (ebx, 4)
-L(30bytes):
+INDIRECT_JUMP_ENTRY(30bytes)
movl -30(%esi), %eax
movl -30(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(26bytes):
+INDIRECT_JUMP_ENTRY(26bytes)
movl -26(%esi), %eax
movl -26(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(22bytes):
+INDIRECT_JUMP_ENTRY(22bytes)
movl -22(%esi), %eax
movl -22(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(18bytes):
+INDIRECT_JUMP_ENTRY(18bytes)
movl -18(%esi), %eax
movl -18(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(14bytes):
+INDIRECT_JUMP_ENTRY(14bytes)
movl -14(%esi), %eax
movl -14(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(10bytes):
+INDIRECT_JUMP_ENTRY(10bytes)
movl -10(%esi), %eax
movl -10(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(6bytes):
+INDIRECT_JUMP_ENTRY(6bytes)
movl -6(%esi), %eax
movl -6(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(2bytes):
+INDIRECT_JUMP_ENTRY(2bytes)
movzwl -2(%esi), %eax
movzwl -2(%edx), %ecx
cmpb %cl, %al
@@ -227,42 +227,42 @@ L(2bytes):
cfi_adjust_cfa_offset (8)
cfi_rel_offset (esi, 0)
cfi_rel_offset (ebx, 4)
-L(31bytes):
+INDIRECT_JUMP_ENTRY(31bytes)
movl -31(%esi), %eax
movl -31(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(27bytes):
+INDIRECT_JUMP_ENTRY(27bytes)
movl -27(%esi), %eax
movl -27(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(23bytes):
+INDIRECT_JUMP_ENTRY(23bytes)
movl -23(%esi), %eax
movl -23(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(19bytes):
+INDIRECT_JUMP_ENTRY(19bytes)
movl -19(%esi), %eax
movl -19(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(15bytes):
+INDIRECT_JUMP_ENTRY(15bytes)
movl -15(%esi), %eax
movl -15(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(11bytes):
+INDIRECT_JUMP_ENTRY(11bytes)
movl -11(%esi), %eax
movl -11(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(7bytes):
+INDIRECT_JUMP_ENTRY(7bytes)
movl -7(%esi), %eax
movl -7(%edx), %ecx
cmpl %ecx, %eax
jne L(find_diff)
-L(3bytes):
+INDIRECT_JUMP_ENTRY(3bytes)
movzwl -3(%esi), %eax
movzwl -3(%edx), %ecx
cmpb %cl, %al
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aab35263895864febff7c5df98654149481204d8
commit aab35263895864febff7c5df98654149481204d8
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 15:50:11 2018 -0800
i386: Add _CET_ENDBR to indirect jump targets in add_n.S/sub_n.S
i386 add_n.S and sub_n.S use a trick to implment jump tables with LEA.
We can't use conditional branches nor normal jump tables since jump
table entries use EFLAGS set by jump table index. This patch adds
_CET_ENDBR to indirect jump targets and adjust destination for
_CET_ENDBR.
* sysdeps/i386/add_n.S: Include <sysdep.h>, instead of
"sysdep.h".
(__mpn_add_n): Save and restore %ebx if __IBT__ is defined.
Add _CET_ENDBR to indirect jump targets and adjust jump
destination for _CET_ENDBR.
* sysdeps/i386/i686/add_n.S: Include <sysdep.h>, instead of
"sysdep.h".
(__mpn_add_n): Save and restore %ebx if __IBT__ is defined.
Add _CET_ENDBR to indirect jump targets and adjust jump
destination for _CET_ENDBR.
* sysdeps/i386/sub_n.S: Include <sysdep.h>, instead of
"sysdep.h".
(__mpn_sub_n): Save and restore %ebx if __IBT__ is defined.
Add _CET_ENDBR to indirect jump targets and adjust jump
destination for _CET_ENDBR.
diff --git a/sysdeps/i386/add_n.S b/sysdeps/i386/add_n.S
index d6a3523..a910652 100644
--- a/sysdeps/i386/add_n.S
+++ b/sysdeps/i386/add_n.S
@@ -17,7 +17,7 @@
along with the GNU MP Library; see the file COPYING.LIB. If not,
see <http://www.gnu.org/licenses/>. */
-#include "sysdep.h"
+#include <sysdep.h>
#include "asm-syntax.h"
#define PARMS 4+8 /* space for 2 saved regs */
@@ -40,6 +40,13 @@ ENTRY (__mpn_add_n)
cfi_rel_offset (esi, 0)
movl S2(%esp),%edx
movl SIZE(%esp),%ecx
+
+#ifdef __IBT__
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+#endif
+
movl %ecx,%eax
shrl $3,%ecx /* compute count for unrolled loop */
negl %eax
@@ -51,6 +58,9 @@ ENTRY (__mpn_add_n)
subl %eax,%esi /* ... by a constant when we ... */
subl %eax,%edx /* ... enter the loop */
shrl $2,%eax /* restore previous value */
+#ifdef __IBT__
+ leal -4(,%eax,4),%ebx /* Count for 4-byte endbr32 */
+#endif
#ifdef PIC
/* Calculate start address in loop for PIC. Due to limitations in some
assemblers, Loop-L0-3 cannot be put into the leal */
@@ -65,29 +75,39 @@ L(0): leal (%eax,%eax,8),%eax
/* Calculate start address in loop for non-PIC. */
leal (L(oop) - 3)(%eax,%eax,8),%eax
#endif
+#ifdef __IBT__
+ addl %ebx,%eax /* Adjust for endbr32 */
+#endif
jmp *%eax /* jump into loop */
ALIGN (3)
L(oop): movl (%esi),%eax
adcl (%edx),%eax
movl %eax,(%edi)
+ _CET_ENDBR
movl 4(%esi),%eax
adcl 4(%edx),%eax
movl %eax,4(%edi)
+ _CET_ENDBR
movl 8(%esi),%eax
adcl 8(%edx),%eax
movl %eax,8(%edi)
+ _CET_ENDBR
movl 12(%esi),%eax
adcl 12(%edx),%eax
movl %eax,12(%edi)
+ _CET_ENDBR
movl 16(%esi),%eax
adcl 16(%edx),%eax
movl %eax,16(%edi)
+ _CET_ENDBR
movl 20(%esi),%eax
adcl 20(%edx),%eax
movl %eax,20(%edi)
+ _CET_ENDBR
movl 24(%esi),%eax
adcl 24(%edx),%eax
movl %eax,24(%edi)
+ _CET_ENDBR
movl 28(%esi),%eax
adcl 28(%edx),%eax
movl %eax,28(%edi)
@@ -100,6 +120,11 @@ L(oop): movl (%esi),%eax
sbbl %eax,%eax
negl %eax
+#ifdef __IBT__
+ popl %ebx
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (ebx)
+#endif
popl %esi
cfi_adjust_cfa_offset (-4)
cfi_restore (esi)
diff --git a/sysdeps/i386/i686/add_n.S b/sysdeps/i386/i686/add_n.S
index 5c6c144..85b5c24 100644
--- a/sysdeps/i386/i686/add_n.S
+++ b/sysdeps/i386/i686/add_n.S
@@ -17,7 +17,7 @@
along with the GNU MP Library; see the file COPYING.LIB. If not,
see <http://www.gnu.org/licenses/>. */
-#include "sysdep.h"
+#include <sysdep.h>
#include "asm-syntax.h"
#define PARMS 4+8 /* space for 2 saved regs */
@@ -44,6 +44,13 @@ ENTRY (__mpn_add_n)
cfi_rel_offset (esi, 0)
movl S2(%esp),%edx
movl SIZE(%esp),%ecx
+
+#ifdef __IBT__
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+#endif
+
movl %ecx,%eax
shrl $3,%ecx /* compute count for unrolled loop */
negl %eax
@@ -55,6 +62,9 @@ ENTRY (__mpn_add_n)
subl %eax,%esi /* ... by a constant when we ... */
subl %eax,%edx /* ... enter the loop */
shrl $2,%eax /* restore previous value */
+#ifdef __IBT__
+ leal -4(,%eax,4),%ebx /* Count for 4-byte endbr32 */
+#endif
#ifdef PIC
/* Calculate start address in loop for PIC. */
leal (L(oop)-L(0)-3)(%eax,%eax,8),%eax
@@ -64,29 +74,39 @@ L(0):
/* Calculate start address in loop for non-PIC. */
leal (L(oop) - 3)(%eax,%eax,8),%eax
#endif
+#ifdef __IBT__
+ addl %ebx,%eax /* Adjust for endbr32 */
+#endif
jmp *%eax /* jump into loop */
ALIGN (3)
L(oop): movl (%esi),%eax
adcl (%edx),%eax
movl %eax,(%edi)
+ _CET_ENDBR
movl 4(%esi),%eax
adcl 4(%edx),%eax
movl %eax,4(%edi)
+ _CET_ENDBR
movl 8(%esi),%eax
adcl 8(%edx),%eax
movl %eax,8(%edi)
+ _CET_ENDBR
movl 12(%esi),%eax
adcl 12(%edx),%eax
movl %eax,12(%edi)
+ _CET_ENDBR
movl 16(%esi),%eax
adcl 16(%edx),%eax
movl %eax,16(%edi)
+ _CET_ENDBR
movl 20(%esi),%eax
adcl 20(%edx),%eax
movl %eax,20(%edi)
+ _CET_ENDBR
movl 24(%esi),%eax
adcl 24(%edx),%eax
movl %eax,24(%edi)
+ _CET_ENDBR
movl 28(%esi),%eax
adcl 28(%edx),%eax
movl %eax,28(%edi)
@@ -99,6 +119,11 @@ L(oop): movl (%esi),%eax
sbbl %eax,%eax
negl %eax
+#ifdef __IBT__
+ popl %ebx
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (ebx)
+#endif
popl %esi
cfi_adjust_cfa_offset (-4)
cfi_restore (esi)
diff --git a/sysdeps/i386/sub_n.S b/sysdeps/i386/sub_n.S
index 7c6f48c..a823832 100644
--- a/sysdeps/i386/sub_n.S
+++ b/sysdeps/i386/sub_n.S
@@ -17,7 +17,7 @@
along with the GNU MP Library; see the file COPYING.LIB. If not,
see <http://www.gnu.org/licenses/>. */
-#include "sysdep.h"
+#include <sysdep.h>
#include "asm-syntax.h"
#define PARMS 4+8 /* space for 2 saved regs */
@@ -40,6 +40,13 @@ ENTRY (__mpn_sub_n)
cfi_rel_offset (esi, 0)
movl S2(%esp),%edx
movl SIZE(%esp),%ecx
+
+#ifdef __IBT__
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+#endif
+
movl %ecx,%eax
shrl $3,%ecx /* compute count for unrolled loop */
negl %eax
@@ -51,6 +58,9 @@ ENTRY (__mpn_sub_n)
subl %eax,%esi /* ... by a constant when we ... */
subl %eax,%edx /* ... enter the loop */
shrl $2,%eax /* restore previous value */
+#ifdef __IBT__
+ leal -4(,%eax,4),%ebx /* Count for 4-byte endbr32 */
+#endif
#ifdef PIC
/* Calculate start address in loop for PIC. Due to limitations in some
assemblers, Loop-L0-3 cannot be put into the leal */
@@ -65,29 +75,38 @@ L(0): leal (%eax,%eax,8),%eax
/* Calculate start address in loop for non-PIC. */
leal (L(oop) - 3)(%eax,%eax,8),%eax
#endif
+#ifdef __IBT__
+ addl %ebx,%eax /* Adjust for endbr32 */
+#endif
jmp *%eax /* jump into loop */
ALIGN (3)
L(oop): movl (%esi),%eax
sbbl (%edx),%eax
movl %eax,(%edi)
+ _CET_ENDBR
movl 4(%esi),%eax
sbbl 4(%edx),%eax
movl %eax,4(%edi)
+ _CET_ENDBR
movl 8(%esi),%eax
sbbl 8(%edx),%eax
movl %eax,8(%edi)
movl 12(%esi),%eax
sbbl 12(%edx),%eax
movl %eax,12(%edi)
+ _CET_ENDBR
movl 16(%esi),%eax
sbbl 16(%edx),%eax
movl %eax,16(%edi)
+ _CET_ENDBR
movl 20(%esi),%eax
sbbl 20(%edx),%eax
movl %eax,20(%edi)
+ _CET_ENDBR
movl 24(%esi),%eax
sbbl 24(%edx),%eax
movl %eax,24(%edi)
+ _CET_ENDBR
movl 28(%esi),%eax
sbbl 28(%edx),%eax
movl %eax,28(%edi)
@@ -100,6 +119,11 @@ L(oop): movl (%esi),%eax
sbbl %eax,%eax
negl %eax
+#ifdef __IBT__
+ popl %ebx
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (ebx)
+#endif
popl %esi
cfi_adjust_cfa_offset (-4)
cfi_restore (esi)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7bbca7b3e54347c0f38493357f975e6b3409aadd
commit 7bbca7b3e54347c0f38493357f975e6b3409aadd
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 11:02:21 2018 -0800
x86-64: Use INDIRECT_JUMP_ENTRY in memcpy-ssse3.S
* sysdeps/x86_64/multiarch/memcpy-ssse3.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3.S b/sysdeps/x86_64/multiarch/memcpy-ssse3.S
index 5dd2090..5679770 100644
--- a/sysdeps/x86_64/multiarch/memcpy-ssse3.S
+++ b/sysdeps/x86_64/multiarch/memcpy-ssse3.S
@@ -154,7 +154,7 @@ L(copy_backward):
BRANCH_TO_JMPTBL_ENTRY (L(shl_table_bwd), %r9, 4)
.p2align 4
-L(shl_0):
+INDIRECT_JUMP_ENTRY(shl_0)
sub $16, %rdx
movdqa (%rsi), %xmm1
add $16, %rsi
@@ -297,7 +297,7 @@ L(shl_0_mem_less_32bytes):
BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_0_bwd):
+INDIRECT_JUMP_ENTRY(shl_0_bwd)
sub $16, %rdx
movdqa -0x10(%rsi), %xmm1
sub $16, %rsi
@@ -433,7 +433,7 @@ L(shl_0_mem_bwd_less_32bytes):
BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_1):
+INDIRECT_JUMP_ENTRY(shl_1)
lea (L(shl_1_loop_L1)-L(shl_1))(%r9), %r9
cmp %rcx, %rdx
movaps -0x01(%rsi), %xmm1
@@ -476,7 +476,7 @@ L(shl_1_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_1_bwd):
+INDIRECT_JUMP_ENTRY(shl_1_bwd)
lea (L(shl_1_bwd_loop_L1)-L(shl_1_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x01(%rsi), %xmm1
@@ -518,7 +518,7 @@ L(shl_1_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_2):
+INDIRECT_JUMP_ENTRY(shl_2)
lea (L(shl_2_loop_L1)-L(shl_2))(%r9), %r9
cmp %rcx, %rdx
movaps -0x02(%rsi), %xmm1
@@ -561,7 +561,7 @@ L(shl_2_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_2_bwd):
+INDIRECT_JUMP_ENTRY(shl_2_bwd)
lea (L(shl_2_bwd_loop_L1)-L(shl_2_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x02(%rsi), %xmm1
@@ -603,7 +603,7 @@ L(shl_2_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_3):
+INDIRECT_JUMP_ENTRY(shl_3)
lea (L(shl_3_loop_L1)-L(shl_3))(%r9), %r9
cmp %rcx, %rdx
movaps -0x03(%rsi), %xmm1
@@ -646,7 +646,7 @@ L(shl_3_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_3_bwd):
+INDIRECT_JUMP_ENTRY(shl_3_bwd)
lea (L(shl_3_bwd_loop_L1)-L(shl_3_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x03(%rsi), %xmm1
@@ -688,7 +688,7 @@ L(shl_3_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_4):
+INDIRECT_JUMP_ENTRY(shl_4)
lea (L(shl_4_loop_L1)-L(shl_4))(%r9), %r9
cmp %rcx, %rdx
movaps -0x04(%rsi), %xmm1
@@ -731,7 +731,7 @@ L(shl_4_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_4_bwd):
+INDIRECT_JUMP_ENTRY(shl_4_bwd)
lea (L(shl_4_bwd_loop_L1)-L(shl_4_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x04(%rsi), %xmm1
@@ -773,7 +773,7 @@ L(shl_4_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_5):
+INDIRECT_JUMP_ENTRY(shl_5)
lea (L(shl_5_loop_L1)-L(shl_5))(%r9), %r9
cmp %rcx, %rdx
movaps -0x05(%rsi), %xmm1
@@ -816,7 +816,7 @@ L(shl_5_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_5_bwd):
+INDIRECT_JUMP_ENTRY(shl_5_bwd)
lea (L(shl_5_bwd_loop_L1)-L(shl_5_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x05(%rsi), %xmm1
@@ -858,7 +858,7 @@ L(shl_5_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_6):
+INDIRECT_JUMP_ENTRY(shl_6)
lea (L(shl_6_loop_L1)-L(shl_6))(%r9), %r9
cmp %rcx, %rdx
movaps -0x06(%rsi), %xmm1
@@ -901,7 +901,7 @@ L(shl_6_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_6_bwd):
+INDIRECT_JUMP_ENTRY(shl_6_bwd)
lea (L(shl_6_bwd_loop_L1)-L(shl_6_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x06(%rsi), %xmm1
@@ -943,7 +943,7 @@ L(shl_6_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_7):
+INDIRECT_JUMP_ENTRY(shl_7)
lea (L(shl_7_loop_L1)-L(shl_7))(%r9), %r9
cmp %rcx, %rdx
movaps -0x07(%rsi), %xmm1
@@ -986,7 +986,7 @@ L(shl_7_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_7_bwd):
+INDIRECT_JUMP_ENTRY(shl_7_bwd)
lea (L(shl_7_bwd_loop_L1)-L(shl_7_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x07(%rsi), %xmm1
@@ -1028,7 +1028,7 @@ L(shl_7_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_8):
+INDIRECT_JUMP_ENTRY(shl_8)
lea (L(shl_8_loop_L1)-L(shl_8))(%r9), %r9
cmp %rcx, %rdx
movaps -0x08(%rsi), %xmm1
@@ -1071,7 +1071,7 @@ L(shl_8_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_8_bwd):
+INDIRECT_JUMP_ENTRY(shl_8_bwd)
lea (L(shl_8_bwd_loop_L1)-L(shl_8_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x08(%rsi), %xmm1
@@ -1113,7 +1113,7 @@ L(shl_8_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_9):
+INDIRECT_JUMP_ENTRY(shl_9)
lea (L(shl_9_loop_L1)-L(shl_9))(%r9), %r9
cmp %rcx, %rdx
movaps -0x09(%rsi), %xmm1
@@ -1156,7 +1156,7 @@ L(shl_9_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_9_bwd):
+INDIRECT_JUMP_ENTRY(shl_9_bwd)
lea (L(shl_9_bwd_loop_L1)-L(shl_9_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x09(%rsi), %xmm1
@@ -1198,7 +1198,7 @@ L(shl_9_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_10):
+INDIRECT_JUMP_ENTRY(shl_10)
lea (L(shl_10_loop_L1)-L(shl_10))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0a(%rsi), %xmm1
@@ -1241,7 +1241,7 @@ L(shl_10_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_10_bwd):
+INDIRECT_JUMP_ENTRY(shl_10_bwd)
lea (L(shl_10_bwd_loop_L1)-L(shl_10_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0a(%rsi), %xmm1
@@ -1283,7 +1283,7 @@ L(shl_10_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_11):
+INDIRECT_JUMP_ENTRY(shl_11)
lea (L(shl_11_loop_L1)-L(shl_11))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0b(%rsi), %xmm1
@@ -1326,7 +1326,7 @@ L(shl_11_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_11_bwd):
+INDIRECT_JUMP_ENTRY(shl_11_bwd)
lea (L(shl_11_bwd_loop_L1)-L(shl_11_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0b(%rsi), %xmm1
@@ -1368,7 +1368,7 @@ L(shl_11_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_12):
+INDIRECT_JUMP_ENTRY(shl_12)
lea (L(shl_12_loop_L1)-L(shl_12))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0c(%rsi), %xmm1
@@ -1411,7 +1411,7 @@ L(shl_12_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_12_bwd):
+INDIRECT_JUMP_ENTRY(shl_12_bwd)
lea (L(shl_12_bwd_loop_L1)-L(shl_12_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0c(%rsi), %xmm1
@@ -1453,7 +1453,7 @@ L(shl_12_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_13):
+INDIRECT_JUMP_ENTRY(shl_13)
lea (L(shl_13_loop_L1)-L(shl_13))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0d(%rsi), %xmm1
@@ -1496,7 +1496,7 @@ L(shl_13_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_13_bwd):
+INDIRECT_JUMP_ENTRY(shl_13_bwd)
lea (L(shl_13_bwd_loop_L1)-L(shl_13_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0d(%rsi), %xmm1
@@ -1538,7 +1538,7 @@ L(shl_13_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_14):
+INDIRECT_JUMP_ENTRY(shl_14)
lea (L(shl_14_loop_L1)-L(shl_14))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0e(%rsi), %xmm1
@@ -1581,7 +1581,7 @@ L(shl_14_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_14_bwd):
+INDIRECT_JUMP_ENTRY(shl_14_bwd)
lea (L(shl_14_bwd_loop_L1)-L(shl_14_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0e(%rsi), %xmm1
@@ -1623,7 +1623,7 @@ L(shl_14_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_15):
+INDIRECT_JUMP_ENTRY(shl_15)
lea (L(shl_15_loop_L1)-L(shl_15))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0f(%rsi), %xmm1
@@ -1666,7 +1666,7 @@ L(shl_15_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(shl_15_bwd):
+INDIRECT_JUMP_ENTRY(shl_15_bwd)
lea (L(shl_15_bwd_loop_L1)-L(shl_15_bwd))(%r9), %r9
cmp %rcx, %rdx
movaps -0x0f(%rsi), %xmm1
@@ -1708,7 +1708,7 @@ L(shl_15_bwd_end):
BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
.p2align 4
-L(write_72bytes):
+INDIRECT_JUMP_ENTRY(write_72bytes)
movdqu -72(%rsi), %xmm0
movdqu -56(%rsi), %xmm1
mov -40(%rsi), %r8
@@ -1726,7 +1726,7 @@ L(write_72bytes):
ret
.p2align 4
-L(write_64bytes):
+INDIRECT_JUMP_ENTRY(write_64bytes)
movdqu -64(%rsi), %xmm0
mov -48(%rsi), %rcx
mov -40(%rsi), %r8
@@ -1744,7 +1744,7 @@ L(write_64bytes):
ret
.p2align 4
-L(write_56bytes):
+INDIRECT_JUMP_ENTRY(write_56bytes)
movdqu -56(%rsi), %xmm0
mov -40(%rsi), %r8
mov -32(%rsi), %r9
@@ -1760,7 +1760,7 @@ L(write_56bytes):
ret
.p2align 4
-L(write_48bytes):
+INDIRECT_JUMP_ENTRY(write_48bytes)
mov -48(%rsi), %rcx
mov -40(%rsi), %r8
mov -32(%rsi), %r9
@@ -1776,7 +1776,7 @@ L(write_48bytes):
ret
.p2align 4
-L(write_40bytes):
+INDIRECT_JUMP_ENTRY(write_40bytes)
mov -40(%rsi), %r8
mov -32(%rsi), %r9
mov -24(%rsi), %r10
@@ -1790,7 +1790,7 @@ L(write_40bytes):
ret
.p2align 4
-L(write_32bytes):
+INDIRECT_JUMP_ENTRY(write_32bytes)
mov -32(%rsi), %r9
mov -24(%rsi), %r10
mov -16(%rsi), %r11
@@ -1802,7 +1802,7 @@ L(write_32bytes):
ret
.p2align 4
-L(write_24bytes):
+INDIRECT_JUMP_ENTRY(write_24bytes)
mov -24(%rsi), %r10
mov -16(%rsi), %r11
mov -8(%rsi), %rdx
@@ -1812,7 +1812,7 @@ L(write_24bytes):
ret
.p2align 4
-L(write_16bytes):
+INDIRECT_JUMP_ENTRY(write_16bytes)
mov -16(%rsi), %r11
mov -8(%rsi), %rdx
mov %r11, -16(%rdi)
@@ -1820,14 +1820,14 @@ L(write_16bytes):
ret
.p2align 4
-L(write_8bytes):
+INDIRECT_JUMP_ENTRY(write_8bytes)
mov -8(%rsi), %rdx
mov %rdx, -8(%rdi)
-L(write_0bytes):
+INDIRECT_JUMP_ENTRY(write_0bytes)
ret
.p2align 4
-L(write_73bytes):
+INDIRECT_JUMP_ENTRY(write_73bytes)
movdqu -73(%rsi), %xmm0
movdqu -57(%rsi), %xmm1
mov -41(%rsi), %rcx
@@ -1847,7 +1847,7 @@ L(write_73bytes):
ret
.p2align 4
-L(write_65bytes):
+INDIRECT_JUMP_ENTRY(write_65bytes)
movdqu -65(%rsi), %xmm0
movdqu -49(%rsi), %xmm1
mov -33(%rsi), %r9
@@ -1865,7 +1865,7 @@ L(write_65bytes):
ret
.p2align 4
-L(write_57bytes):
+INDIRECT_JUMP_ENTRY(write_57bytes)
movdqu -57(%rsi), %xmm0
mov -41(%rsi), %r8
mov -33(%rsi), %r9
@@ -1883,7 +1883,7 @@ L(write_57bytes):
ret
.p2align 4
-L(write_49bytes):
+INDIRECT_JUMP_ENTRY(write_49bytes)
movdqu -49(%rsi), %xmm0
mov -33(%rsi), %r9
mov -25(%rsi), %r10
@@ -1899,7 +1899,7 @@ L(write_49bytes):
ret
.p2align 4
-L(write_41bytes):
+INDIRECT_JUMP_ENTRY(write_41bytes)
mov -41(%rsi), %r8
mov -33(%rsi), %r9
mov -25(%rsi), %r10
@@ -1915,7 +1915,7 @@ L(write_41bytes):
ret
.p2align 4
-L(write_33bytes):
+INDIRECT_JUMP_ENTRY(write_33bytes)
mov -33(%rsi), %r9
mov -25(%rsi), %r10
mov -17(%rsi), %r11
@@ -1929,7 +1929,7 @@ L(write_33bytes):
ret
.p2align 4
-L(write_25bytes):
+INDIRECT_JUMP_ENTRY(write_25bytes)
mov -25(%rsi), %r10
mov -17(%rsi), %r11
mov -9(%rsi), %rcx
@@ -1941,7 +1941,7 @@ L(write_25bytes):
ret
.p2align 4
-L(write_17bytes):
+INDIRECT_JUMP_ENTRY(write_17bytes)
mov -17(%rsi), %r11
mov -9(%rsi), %rcx
mov -4(%rsi), %edx
@@ -1951,7 +1951,7 @@ L(write_17bytes):
ret
.p2align 4
-L(write_9bytes):
+INDIRECT_JUMP_ENTRY(write_9bytes)
mov -9(%rsi), %rcx
mov -4(%rsi), %edx
mov %rcx, -9(%rdi)
@@ -1959,13 +1959,13 @@ L(write_9bytes):
ret
.p2align 4
-L(write_1bytes):
+INDIRECT_JUMP_ENTRY(write_1bytes)
mov -1(%rsi), %dl
mov %dl, -1(%rdi)
ret
.p2align 4
-L(write_74bytes):
+INDIRECT_JUMP_ENTRY(write_74bytes)
movdqu -74(%rsi), %xmm0
movdqu -58(%rsi), %xmm1
mov -42(%rsi), %r8
@@ -1985,7 +1985,7 @@ L(write_74bytes):
ret
.p2align 4
-L(write_66bytes):
+INDIRECT_JUMP_ENTRY(write_66bytes)
movdqu -66(%rsi), %xmm0
movdqu -50(%rsi), %xmm1
mov -42(%rsi), %r8
@@ -2005,7 +2005,7 @@ L(write_66bytes):
ret
.p2align 4
-L(write_58bytes):
+INDIRECT_JUMP_ENTRY(write_58bytes)
movdqu -58(%rsi), %xmm1
mov -42(%rsi), %r8
mov -34(%rsi), %r9
@@ -2023,7 +2023,7 @@ L(write_58bytes):
ret
.p2align 4
-L(write_50bytes):
+INDIRECT_JUMP_ENTRY(write_50bytes)
movdqu -50(%rsi), %xmm0
mov -34(%rsi), %r9
mov -26(%rsi), %r10
@@ -2039,7 +2039,7 @@ L(write_50bytes):
ret
.p2align 4
-L(write_42bytes):
+INDIRECT_JUMP_ENTRY(write_42bytes)
mov -42(%rsi), %r8
mov -34(%rsi), %r9
mov -26(%rsi), %r10
@@ -2055,7 +2055,7 @@ L(write_42bytes):
ret
.p2align 4
-L(write_34bytes):
+INDIRECT_JUMP_ENTRY(write_34bytes)
mov -34(%rsi), %r9
mov -26(%rsi), %r10
mov -18(%rsi), %r11
@@ -2069,7 +2069,7 @@ L(write_34bytes):
ret
.p2align 4
-L(write_26bytes):
+INDIRECT_JUMP_ENTRY(write_26bytes)
mov -26(%rsi), %r10
mov -18(%rsi), %r11
mov -10(%rsi), %rcx
@@ -2081,7 +2081,7 @@ L(write_26bytes):
ret
.p2align 4
-L(write_18bytes):
+INDIRECT_JUMP_ENTRY(write_18bytes)
mov -18(%rsi), %r11
mov -10(%rsi), %rcx
mov -4(%rsi), %edx
@@ -2091,7 +2091,7 @@ L(write_18bytes):
ret
.p2align 4
-L(write_10bytes):
+INDIRECT_JUMP_ENTRY(write_10bytes)
mov -10(%rsi), %rcx
mov -4(%rsi), %edx
mov %rcx, -10(%rdi)
@@ -2099,13 +2099,13 @@ L(write_10bytes):
ret
.p2align 4
-L(write_2bytes):
+INDIRECT_JUMP_ENTRY(write_2bytes)
mov -2(%rsi), %dx
mov %dx, -2(%rdi)
ret
.p2align 4
-L(write_75bytes):
+INDIRECT_JUMP_ENTRY(write_75bytes)
movdqu -75(%rsi), %xmm0
movdqu -59(%rsi), %xmm1
mov -43(%rsi), %r8
@@ -2125,7 +2125,7 @@ L(write_75bytes):
ret
.p2align 4
-L(write_67bytes):
+INDIRECT_JUMP_ENTRY(write_67bytes)
movdqu -67(%rsi), %xmm0
movdqu -59(%rsi), %xmm1
mov -43(%rsi), %r8
@@ -2145,7 +2145,7 @@ L(write_67bytes):
ret
.p2align 4
-L(write_59bytes):
+INDIRECT_JUMP_ENTRY(write_59bytes)
movdqu -59(%rsi), %xmm0
mov -43(%rsi), %r8
mov -35(%rsi), %r9
@@ -2163,7 +2163,7 @@ L(write_59bytes):
ret
.p2align 4
-L(write_51bytes):
+INDIRECT_JUMP_ENTRY(write_51bytes)
movdqu -51(%rsi), %xmm0
mov -35(%rsi), %r9
mov -27(%rsi), %r10
@@ -2179,7 +2179,7 @@ L(write_51bytes):
ret
.p2align 4
-L(write_43bytes):
+INDIRECT_JUMP_ENTRY(write_43bytes)
mov -43(%rsi), %r8
mov -35(%rsi), %r9
mov -27(%rsi), %r10
@@ -2195,7 +2195,7 @@ L(write_43bytes):
ret
.p2align 4
-L(write_35bytes):
+INDIRECT_JUMP_ENTRY(write_35bytes)
mov -35(%rsi), %r9
mov -27(%rsi), %r10
mov -19(%rsi), %r11
@@ -2209,7 +2209,7 @@ L(write_35bytes):
ret
.p2align 4
-L(write_27bytes):
+INDIRECT_JUMP_ENTRY(write_27bytes)
mov -27(%rsi), %r10
mov -19(%rsi), %r11
mov -11(%rsi), %rcx
@@ -2221,7 +2221,7 @@ L(write_27bytes):
ret
.p2align 4
-L(write_19bytes):
+INDIRECT_JUMP_ENTRY(write_19bytes)
mov -19(%rsi), %r11
mov -11(%rsi), %rcx
mov -4(%rsi), %edx
@@ -2231,7 +2231,7 @@ L(write_19bytes):
ret
.p2align 4
-L(write_11bytes):
+INDIRECT_JUMP_ENTRY(write_11bytes)
mov -11(%rsi), %rcx
mov -4(%rsi), %edx
mov %rcx, -11(%rdi)
@@ -2239,7 +2239,7 @@ L(write_11bytes):
ret
.p2align 4
-L(write_3bytes):
+INDIRECT_JUMP_ENTRY(write_3bytes)
mov -3(%rsi), %dx
mov -2(%rsi), %cx
mov %dx, -3(%rdi)
@@ -2247,7 +2247,7 @@ L(write_3bytes):
ret
.p2align 4
-L(write_76bytes):
+INDIRECT_JUMP_ENTRY(write_76bytes)
movdqu -76(%rsi), %xmm0
movdqu -60(%rsi), %xmm1
mov -44(%rsi), %r8
@@ -2267,7 +2267,7 @@ L(write_76bytes):
ret
.p2align 4
-L(write_68bytes):
+INDIRECT_JUMP_ENTRY(write_68bytes)
movdqu -68(%rsi), %xmm0
movdqu -52(%rsi), %xmm1
mov -36(%rsi), %r9
@@ -2285,7 +2285,7 @@ L(write_68bytes):
ret
.p2align 4
-L(write_60bytes):
+INDIRECT_JUMP_ENTRY(write_60bytes)
movdqu -60(%rsi), %xmm0
mov -44(%rsi), %r8
mov -36(%rsi), %r9
@@ -2303,7 +2303,7 @@ L(write_60bytes):
ret
.p2align 4
-L(write_52bytes):
+INDIRECT_JUMP_ENTRY(write_52bytes)
movdqu -52(%rsi), %xmm0
mov -36(%rsi), %r9
mov -28(%rsi), %r10
@@ -2319,7 +2319,7 @@ L(write_52bytes):
ret
.p2align 4
-L(write_44bytes):
+INDIRECT_JUMP_ENTRY(write_44bytes)
mov -44(%rsi), %r8
mov -36(%rsi), %r9
mov -28(%rsi), %r10
@@ -2335,7 +2335,7 @@ L(write_44bytes):
ret
.p2align 4
-L(write_36bytes):
+INDIRECT_JUMP_ENTRY(write_36bytes)
mov -36(%rsi), %r9
mov -28(%rsi), %r10
mov -20(%rsi), %r11
@@ -2349,7 +2349,7 @@ L(write_36bytes):
ret
.p2align 4
-L(write_28bytes):
+INDIRECT_JUMP_ENTRY(write_28bytes)
mov -28(%rsi), %r10
mov -20(%rsi), %r11
mov -12(%rsi), %rcx
@@ -2361,7 +2361,7 @@ L(write_28bytes):
ret
.p2align 4
-L(write_20bytes):
+INDIRECT_JUMP_ENTRY(write_20bytes)
mov -20(%rsi), %r11
mov -12(%rsi), %rcx
mov -4(%rsi), %edx
@@ -2371,7 +2371,7 @@ L(write_20bytes):
ret
.p2align 4
-L(write_12bytes):
+INDIRECT_JUMP_ENTRY(write_12bytes)
mov -12(%rsi), %rcx
mov -4(%rsi), %edx
mov %rcx, -12(%rdi)
@@ -2379,13 +2379,13 @@ L(write_12bytes):
ret
.p2align 4
-L(write_4bytes):
+INDIRECT_JUMP_ENTRY(write_4bytes)
mov -4(%rsi), %edx
mov %edx, -4(%rdi)
ret
.p2align 4
-L(write_77bytes):
+INDIRECT_JUMP_ENTRY(write_77bytes)
movdqu -77(%rsi), %xmm0
movdqu -61(%rsi), %xmm1
mov -45(%rsi), %r8
@@ -2405,7 +2405,7 @@ L(write_77bytes):
ret
.p2align 4
-L(write_69bytes):
+INDIRECT_JUMP_ENTRY(write_69bytes)
movdqu -69(%rsi), %xmm0
movdqu -53(%rsi), %xmm1
mov -37(%rsi), %r9
@@ -2423,7 +2423,7 @@ L(write_69bytes):
ret
.p2align 4
-L(write_61bytes):
+INDIRECT_JUMP_ENTRY(write_61bytes)
movdqu -61(%rsi), %xmm0
mov -45(%rsi), %r8
mov -37(%rsi), %r9
@@ -2441,7 +2441,7 @@ L(write_61bytes):
ret
.p2align 4
-L(write_53bytes):
+INDIRECT_JUMP_ENTRY(write_53bytes)
movdqu -53(%rsi), %xmm0
mov -45(%rsi), %r8
mov -37(%rsi), %r9
@@ -2458,7 +2458,7 @@ L(write_53bytes):
ret
.p2align 4
-L(write_45bytes):
+INDIRECT_JUMP_ENTRY(write_45bytes)
mov -45(%rsi), %r8
mov -37(%rsi), %r9
mov -29(%rsi), %r10
@@ -2474,7 +2474,7 @@ L(write_45bytes):
ret
.p2align 4
-L(write_37bytes):
+INDIRECT_JUMP_ENTRY(write_37bytes)
mov -37(%rsi), %r9
mov -29(%rsi), %r10
mov -21(%rsi), %r11
@@ -2488,7 +2488,7 @@ L(write_37bytes):
ret
.p2align 4
-L(write_29bytes):
+INDIRECT_JUMP_ENTRY(write_29bytes)
mov -29(%rsi), %r10
mov -21(%rsi), %r11
mov -13(%rsi), %rcx
@@ -2500,7 +2500,7 @@ L(write_29bytes):
ret
.p2align 4
-L(write_21bytes):
+INDIRECT_JUMP_ENTRY(write_21bytes)
mov -21(%rsi), %r11
mov -13(%rsi), %rcx
mov -8(%rsi), %rdx
@@ -2510,7 +2510,7 @@ L(write_21bytes):
ret
.p2align 4
-L(write_13bytes):
+INDIRECT_JUMP_ENTRY(write_13bytes)
mov -13(%rsi), %rcx
mov -8(%rsi), %rdx
mov %rcx, -13(%rdi)
@@ -2518,7 +2518,7 @@ L(write_13bytes):
ret
.p2align 4
-L(write_5bytes):
+INDIRECT_JUMP_ENTRY(write_5bytes)
mov -5(%rsi), %edx
mov -4(%rsi), %ecx
mov %edx, -5(%rdi)
@@ -2526,7 +2526,7 @@ L(write_5bytes):
ret
.p2align 4
-L(write_78bytes):
+INDIRECT_JUMP_ENTRY(write_78bytes)
movdqu -78(%rsi), %xmm0
movdqu -62(%rsi), %xmm1
mov -46(%rsi), %r8
@@ -2546,7 +2546,7 @@ L(write_78bytes):
ret
.p2align 4
-L(write_70bytes):
+INDIRECT_JUMP_ENTRY(write_70bytes)
movdqu -70(%rsi), %xmm0
movdqu -54(%rsi), %xmm1
mov -38(%rsi), %r9
@@ -2564,7 +2564,7 @@ L(write_70bytes):
ret
.p2align 4
-L(write_62bytes):
+INDIRECT_JUMP_ENTRY(write_62bytes)
movdqu -62(%rsi), %xmm0
mov -46(%rsi), %r8
mov -38(%rsi), %r9
@@ -2582,7 +2582,7 @@ L(write_62bytes):
ret
.p2align 4
-L(write_54bytes):
+INDIRECT_JUMP_ENTRY(write_54bytes)
movdqu -54(%rsi), %xmm0
mov -38(%rsi), %r9
mov -30(%rsi), %r10
@@ -2598,7 +2598,7 @@ L(write_54bytes):
ret
.p2align 4
-L(write_46bytes):
+INDIRECT_JUMP_ENTRY(write_46bytes)
mov -46(%rsi), %r8
mov -38(%rsi), %r9
mov -30(%rsi), %r10
@@ -2614,7 +2614,7 @@ L(write_46bytes):
ret
.p2align 4
-L(write_38bytes):
+INDIRECT_JUMP_ENTRY(write_38bytes)
mov -38(%rsi), %r9
mov -30(%rsi), %r10
mov -22(%rsi), %r11
@@ -2628,7 +2628,7 @@ L(write_38bytes):
ret
.p2align 4
-L(write_30bytes):
+INDIRECT_JUMP_ENTRY(write_30bytes)
mov -30(%rsi), %r10
mov -22(%rsi), %r11
mov -14(%rsi), %rcx
@@ -2640,7 +2640,7 @@ L(write_30bytes):
ret
.p2align 4
-L(write_22bytes):
+INDIRECT_JUMP_ENTRY(write_22bytes)
mov -22(%rsi), %r11
mov -14(%rsi), %rcx
mov -8(%rsi), %rdx
@@ -2650,7 +2650,7 @@ L(write_22bytes):
ret
.p2align 4
-L(write_14bytes):
+INDIRECT_JUMP_ENTRY(write_14bytes)
mov -14(%rsi), %rcx
mov -8(%rsi), %rdx
mov %rcx, -14(%rdi)
@@ -2658,7 +2658,7 @@ L(write_14bytes):
ret
.p2align 4
-L(write_6bytes):
+INDIRECT_JUMP_ENTRY(write_6bytes)
mov -6(%rsi), %edx
mov -4(%rsi), %ecx
mov %edx, -6(%rdi)
@@ -2666,7 +2666,7 @@ L(write_6bytes):
ret
.p2align 4
-L(write_79bytes):
+INDIRECT_JUMP_ENTRY(write_79bytes)
movdqu -79(%rsi), %xmm0
movdqu -63(%rsi), %xmm1
mov -47(%rsi), %r8
@@ -2686,7 +2686,7 @@ L(write_79bytes):
ret
.p2align 4
-L(write_71bytes):
+INDIRECT_JUMP_ENTRY(write_71bytes)
movdqu -71(%rsi), %xmm0
movdqu -55(%rsi), %xmm1
mov -39(%rsi), %r9
@@ -2704,7 +2704,7 @@ L(write_71bytes):
ret
.p2align 4
-L(write_63bytes):
+INDIRECT_JUMP_ENTRY(write_63bytes)
movdqu -63(%rsi), %xmm0
mov -47(%rsi), %r8
mov -39(%rsi), %r9
@@ -2722,7 +2722,7 @@ L(write_63bytes):
ret
.p2align 4
-L(write_55bytes):
+INDIRECT_JUMP_ENTRY(write_55bytes)
movdqu -55(%rsi), %xmm0
mov -39(%rsi), %r9
mov -31(%rsi), %r10
@@ -2738,7 +2738,7 @@ L(write_55bytes):
ret
.p2align 4
-L(write_47bytes):
+INDIRECT_JUMP_ENTRY(write_47bytes)
mov -47(%rsi), %r8
mov -39(%rsi), %r9
mov -31(%rsi), %r10
@@ -2754,7 +2754,7 @@ L(write_47bytes):
ret
.p2align 4
-L(write_39bytes):
+INDIRECT_JUMP_ENTRY(write_39bytes)
mov -39(%rsi), %r9
mov -31(%rsi), %r10
mov -23(%rsi), %r11
@@ -2768,7 +2768,7 @@ L(write_39bytes):
ret
.p2align 4
-L(write_31bytes):
+INDIRECT_JUMP_ENTRY(write_31bytes)
mov -31(%rsi), %r10
mov -23(%rsi), %r11
mov -15(%rsi), %rcx
@@ -2780,7 +2780,7 @@ L(write_31bytes):
ret
.p2align 4
-L(write_23bytes):
+INDIRECT_JUMP_ENTRY(write_23bytes)
mov -23(%rsi), %r11
mov -15(%rsi), %rcx
mov -8(%rsi), %rdx
@@ -2790,7 +2790,7 @@ L(write_23bytes):
ret
.p2align 4
-L(write_15bytes):
+INDIRECT_JUMP_ENTRY(write_15bytes)
mov -15(%rsi), %rcx
mov -8(%rsi), %rdx
mov %rcx, -15(%rdi)
@@ -2798,7 +2798,7 @@ L(write_15bytes):
ret
.p2align 4
-L(write_7bytes):
+INDIRECT_JUMP_ENTRY(write_7bytes)
mov -7(%rsi), %edx
mov -4(%rsi), %ecx
mov %edx, -7(%rdi)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8afb017319a18236d622601c03052d3bc66bda3d
commit 8afb017319a18236d622601c03052d3bc66bda3d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 11:00:05 2018 -0800
x86-64: Use INDIRECT_JUMP_ENTRY in memcmp-sse4.S
* sysdeps/x86_64/multiarch/memcmp-sse4.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/x86_64/multiarch/memcmp-sse4.S b/sysdeps/x86_64/multiarch/memcmp-sse4.S
index 0d96d6b..3d7c2cf 100644
--- a/sysdeps/x86_64/multiarch/memcmp-sse4.S
+++ b/sysdeps/x86_64/multiarch/memcmp-sse4.S
@@ -789,12 +789,12 @@ L(32bytesin256):
L(16bytesin256):
add $16, %rdi
add $16, %rsi
-L(16bytes):
+INDIRECT_JUMP_ENTRY(16bytes)
mov -16(%rdi), %rax
mov -16(%rsi), %rcx
cmp %rax, %rcx
jne L(diffin8bytes)
-L(8bytes):
+INDIRECT_JUMP_ENTRY(8bytes)
mov -8(%rdi), %rax
mov -8(%rsi), %rcx
cmp %rax, %rcx
@@ -803,12 +803,12 @@ L(8bytes):
ret
.p2align 4
-L(12bytes):
+INDIRECT_JUMP_ENTRY(12bytes)
mov -12(%rdi), %rax
mov -12(%rsi), %rcx
cmp %rax, %rcx
jne L(diffin8bytes)
-L(4bytes):
+INDIRECT_JUMP_ENTRY(4bytes)
mov -4(%rsi), %ecx
# ifndef USE_AS_WMEMCMP
mov -4(%rdi), %eax
@@ -817,40 +817,40 @@ L(4bytes):
cmp -4(%rdi), %ecx
# endif
jne L(diffin4bytes)
-L(0bytes):
+INDIRECT_JUMP_ENTRY(0bytes)
xor %eax, %eax
ret
# ifndef USE_AS_WMEMCMP
/* unreal case for wmemcmp */
.p2align 4
-L(65bytes):
+INDIRECT_JUMP_ENTRY(65bytes)
movdqu -65(%rdi), %xmm1
movdqu -65(%rsi), %xmm2
mov $-65, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(49bytes):
+INDIRECT_JUMP_ENTRY(49bytes)
movdqu -49(%rdi), %xmm1
movdqu -49(%rsi), %xmm2
mov $-49, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(33bytes):
+INDIRECT_JUMP_ENTRY(33bytes)
movdqu -33(%rdi), %xmm1
movdqu -33(%rsi), %xmm2
mov $-33, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(17bytes):
+INDIRECT_JUMP_ENTRY(17bytes)
mov -17(%rdi), %rax
mov -17(%rsi), %rcx
cmp %rax, %rcx
jne L(diffin8bytes)
-L(9bytes):
+INDIRECT_JUMP_ENTRY(9bytes)
mov -9(%rdi), %rax
mov -9(%rsi), %rcx
cmp %rax, %rcx
@@ -861,7 +861,7 @@ L(9bytes):
ret
.p2align 4
-L(13bytes):
+INDIRECT_JUMP_ENTRY(13bytes)
mov -13(%rdi), %rax
mov -13(%rsi), %rcx
cmp %rax, %rcx
@@ -874,7 +874,7 @@ L(13bytes):
ret
.p2align 4
-L(5bytes):
+INDIRECT_JUMP_ENTRY(5bytes)
mov -5(%rdi), %eax
mov -5(%rsi), %ecx
cmp %eax, %ecx
@@ -885,33 +885,33 @@ L(5bytes):
ret
.p2align 4
-L(66bytes):
+INDIRECT_JUMP_ENTRY(66bytes)
movdqu -66(%rdi), %xmm1
movdqu -66(%rsi), %xmm2
mov $-66, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(50bytes):
+INDIRECT_JUMP_ENTRY(50bytes)
movdqu -50(%rdi), %xmm1
movdqu -50(%rsi), %xmm2
mov $-50, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(34bytes):
+INDIRECT_JUMP_ENTRY(34bytes)
movdqu -34(%rdi), %xmm1
movdqu -34(%rsi), %xmm2
mov $-34, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(18bytes):
+INDIRECT_JUMP_ENTRY(18bytes)
mov -18(%rdi), %rax
mov -18(%rsi), %rcx
cmp %rax, %rcx
jne L(diffin8bytes)
-L(10bytes):
+INDIRECT_JUMP_ENTRY(10bytes)
mov -10(%rdi), %rax
mov -10(%rsi), %rcx
cmp %rax, %rcx
@@ -926,7 +926,7 @@ L(10bytes):
ret
.p2align 4
-L(14bytes):
+INDIRECT_JUMP_ENTRY(14bytes)
mov -14(%rdi), %rax
mov -14(%rsi), %rcx
cmp %rax, %rcx
@@ -939,12 +939,12 @@ L(14bytes):
ret
.p2align 4
-L(6bytes):
+INDIRECT_JUMP_ENTRY(6bytes)
mov -6(%rdi), %eax
mov -6(%rsi), %ecx
cmp %eax, %ecx
jne L(diffin4bytes)
-L(2bytes):
+INDIRECT_JUMP_ENTRY(2bytes)
movzwl -2(%rsi), %ecx
movzwl -2(%rdi), %eax
cmp %cl, %al
@@ -955,33 +955,33 @@ L(2bytes):
ret
.p2align 4
-L(67bytes):
+INDIRECT_JUMP_ENTRY(67bytes)
movdqu -67(%rdi), %xmm2
movdqu -67(%rsi), %xmm1
mov $-67, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(51bytes):
+INDIRECT_JUMP_ENTRY(51bytes)
movdqu -51(%rdi), %xmm2
movdqu -51(%rsi), %xmm1
mov $-51, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(35bytes):
+INDIRECT_JUMP_ENTRY(35bytes)
movdqu -35(%rsi), %xmm1
movdqu -35(%rdi), %xmm2
mov $-35, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(19bytes):
+INDIRECT_JUMP_ENTRY(19bytes)
mov -19(%rdi), %rax
mov -19(%rsi), %rcx
cmp %rax, %rcx
jne L(diffin8bytes)
-L(11bytes):
+INDIRECT_JUMP_ENTRY(11bytes)
mov -11(%rdi), %rax
mov -11(%rsi), %rcx
cmp %rax, %rcx
@@ -994,7 +994,7 @@ L(11bytes):
ret
.p2align 4
-L(15bytes):
+INDIRECT_JUMP_ENTRY(15bytes)
mov -15(%rdi), %rax
mov -15(%rsi), %rcx
cmp %rax, %rcx
@@ -1007,7 +1007,7 @@ L(15bytes):
ret
.p2align 4
-L(7bytes):
+INDIRECT_JUMP_ENTRY(7bytes)
mov -7(%rdi), %eax
mov -7(%rsi), %ecx
cmp %eax, %ecx
@@ -1020,12 +1020,12 @@ L(7bytes):
ret
.p2align 4
-L(3bytes):
+INDIRECT_JUMP_ENTRY(3bytes)
movzwl -3(%rdi), %eax
movzwl -3(%rsi), %ecx
cmp %eax, %ecx
jne L(diffin2bytes)
-L(1bytes):
+INDIRECT_JUMP_ENTRY(1bytes)
movzbl -1(%rdi), %eax
movzbl -1(%rsi), %ecx
sub %ecx, %eax
@@ -1033,28 +1033,28 @@ L(1bytes):
# endif
.p2align 4
-L(68bytes):
+INDIRECT_JUMP_ENTRY(68bytes)
movdqu -68(%rdi), %xmm2
movdqu -68(%rsi), %xmm1
mov $-68, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(52bytes):
+INDIRECT_JUMP_ENTRY(52bytes)
movdqu -52(%rdi), %xmm2
movdqu -52(%rsi), %xmm1
mov $-52, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(36bytes):
+INDIRECT_JUMP_ENTRY(36bytes)
movdqu -36(%rdi), %xmm2
movdqu -36(%rsi), %xmm1
mov $-36, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(20bytes):
+INDIRECT_JUMP_ENTRY(20bytes)
movdqu -20(%rdi), %xmm2
movdqu -20(%rsi), %xmm1
mov $-20, %dl
@@ -1076,28 +1076,28 @@ L(20bytes):
# ifndef USE_AS_WMEMCMP
/* unreal cases for wmemcmp */
.p2align 4
-L(69bytes):
+INDIRECT_JUMP_ENTRY(69bytes)
movdqu -69(%rsi), %xmm1
movdqu -69(%rdi), %xmm2
mov $-69, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(53bytes):
+INDIRECT_JUMP_ENTRY(53bytes)
movdqu -53(%rsi), %xmm1
movdqu -53(%rdi), %xmm2
mov $-53, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(37bytes):
+INDIRECT_JUMP_ENTRY(37bytes)
movdqu -37(%rsi), %xmm1
movdqu -37(%rdi), %xmm2
mov $-37, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(21bytes):
+INDIRECT_JUMP_ENTRY(21bytes)
movdqu -21(%rsi), %xmm1
movdqu -21(%rdi), %xmm2
mov $-21, %dl
@@ -1112,28 +1112,28 @@ L(21bytes):
ret
.p2align 4
-L(70bytes):
+INDIRECT_JUMP_ENTRY(70bytes)
movdqu -70(%rsi), %xmm1
movdqu -70(%rdi), %xmm2
mov $-70, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(54bytes):
+INDIRECT_JUMP_ENTRY(54bytes)
movdqu -54(%rsi), %xmm1
movdqu -54(%rdi), %xmm2
mov $-54, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(38bytes):
+INDIRECT_JUMP_ENTRY(38bytes)
movdqu -38(%rsi), %xmm1
movdqu -38(%rdi), %xmm2
mov $-38, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(22bytes):
+INDIRECT_JUMP_ENTRY(22bytes)
movdqu -22(%rsi), %xmm1
movdqu -22(%rdi), %xmm2
mov $-22, %dl
@@ -1148,28 +1148,28 @@ L(22bytes):
ret
.p2align 4
-L(71bytes):
+INDIRECT_JUMP_ENTRY(71bytes)
movdqu -71(%rsi), %xmm1
movdqu -71(%rdi), %xmm2
mov $-71, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(55bytes):
+INDIRECT_JUMP_ENTRY(55bytes)
movdqu -55(%rdi), %xmm2
movdqu -55(%rsi), %xmm1
mov $-55, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(39bytes):
+INDIRECT_JUMP_ENTRY(39bytes)
movdqu -39(%rdi), %xmm2
movdqu -39(%rsi), %xmm1
mov $-39, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(23bytes):
+INDIRECT_JUMP_ENTRY(23bytes)
movdqu -23(%rdi), %xmm2
movdqu -23(%rsi), %xmm1
mov $-23, %dl
@@ -1185,28 +1185,28 @@ L(23bytes):
# endif
.p2align 4
-L(72bytes):
+INDIRECT_JUMP_ENTRY(72bytes)
movdqu -72(%rsi), %xmm1
movdqu -72(%rdi), %xmm2
mov $-72, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(56bytes):
+INDIRECT_JUMP_ENTRY(56bytes)
movdqu -56(%rdi), %xmm2
movdqu -56(%rsi), %xmm1
mov $-56, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(40bytes):
+INDIRECT_JUMP_ENTRY(40bytes)
movdqu -40(%rdi), %xmm2
movdqu -40(%rsi), %xmm1
mov $-40, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(24bytes):
+INDIRECT_JUMP_ENTRY(24bytes)
movdqu -24(%rdi), %xmm2
movdqu -24(%rsi), %xmm1
mov $-24, %dl
@@ -1224,28 +1224,28 @@ L(24bytes):
# ifndef USE_AS_WMEMCMP
/* unreal cases for wmemcmp */
.p2align 4
-L(73bytes):
+INDIRECT_JUMP_ENTRY(73bytes)
movdqu -73(%rsi), %xmm1
movdqu -73(%rdi), %xmm2
mov $-73, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(57bytes):
+INDIRECT_JUMP_ENTRY(57bytes)
movdqu -57(%rdi), %xmm2
movdqu -57(%rsi), %xmm1
mov $-57, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(41bytes):
+INDIRECT_JUMP_ENTRY(41bytes)
movdqu -41(%rdi), %xmm2
movdqu -41(%rsi), %xmm1
mov $-41, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(25bytes):
+INDIRECT_JUMP_ENTRY(25bytes)
movdqu -25(%rdi), %xmm2
movdqu -25(%rsi), %xmm1
mov $-25, %dl
@@ -1262,28 +1262,28 @@ L(25bytes):
ret
.p2align 4
-L(74bytes):
+INDIRECT_JUMP_ENTRY(74bytes)
movdqu -74(%rsi), %xmm1
movdqu -74(%rdi), %xmm2
mov $-74, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(58bytes):
+INDIRECT_JUMP_ENTRY(58bytes)
movdqu -58(%rdi), %xmm2
movdqu -58(%rsi), %xmm1
mov $-58, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(42bytes):
+INDIRECT_JUMP_ENTRY(42bytes)
movdqu -42(%rdi), %xmm2
movdqu -42(%rsi), %xmm1
mov $-42, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(26bytes):
+INDIRECT_JUMP_ENTRY(26bytes)
movdqu -26(%rdi), %xmm2
movdqu -26(%rsi), %xmm1
mov $-26, %dl
@@ -1299,28 +1299,28 @@ L(26bytes):
jmp L(diffin2bytes)
.p2align 4
-L(75bytes):
+INDIRECT_JUMP_ENTRY(75bytes)
movdqu -75(%rsi), %xmm1
movdqu -75(%rdi), %xmm2
mov $-75, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(59bytes):
+INDIRECT_JUMP_ENTRY(59bytes)
movdqu -59(%rdi), %xmm2
movdqu -59(%rsi), %xmm1
mov $-59, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(43bytes):
+INDIRECT_JUMP_ENTRY(43bytes)
movdqu -43(%rdi), %xmm2
movdqu -43(%rsi), %xmm1
mov $-43, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(27bytes):
+INDIRECT_JUMP_ENTRY(27bytes)
movdqu -27(%rdi), %xmm2
movdqu -27(%rsi), %xmm1
mov $-27, %dl
@@ -1339,28 +1339,28 @@ L(27bytes):
ret
# endif
.p2align 4
-L(76bytes):
+INDIRECT_JUMP_ENTRY(76bytes)
movdqu -76(%rsi), %xmm1
movdqu -76(%rdi), %xmm2
mov $-76, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(60bytes):
+INDIRECT_JUMP_ENTRY(60bytes)
movdqu -60(%rdi), %xmm2
movdqu -60(%rsi), %xmm1
mov $-60, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(44bytes):
+INDIRECT_JUMP_ENTRY(44bytes)
movdqu -44(%rdi), %xmm2
movdqu -44(%rsi), %xmm1
mov $-44, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(28bytes):
+INDIRECT_JUMP_ENTRY(28bytes)
movdqu -28(%rdi), %xmm2
movdqu -28(%rsi), %xmm1
mov $-28, %dl
@@ -1385,28 +1385,28 @@ L(28bytes):
# ifndef USE_AS_WMEMCMP
/* unreal cases for wmemcmp */
.p2align 4
-L(77bytes):
+INDIRECT_JUMP_ENTRY(77bytes)
movdqu -77(%rsi), %xmm1
movdqu -77(%rdi), %xmm2
mov $-77, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(61bytes):
+INDIRECT_JUMP_ENTRY(61bytes)
movdqu -61(%rdi), %xmm2
movdqu -61(%rsi), %xmm1
mov $-61, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(45bytes):
+INDIRECT_JUMP_ENTRY(45bytes)
movdqu -45(%rdi), %xmm2
movdqu -45(%rsi), %xmm1
mov $-45, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(29bytes):
+INDIRECT_JUMP_ENTRY(29bytes)
movdqu -29(%rdi), %xmm2
movdqu -29(%rsi), %xmm1
mov $-29, %dl
@@ -1427,28 +1427,28 @@ L(29bytes):
ret
.p2align 4
-L(78bytes):
+INDIRECT_JUMP_ENTRY(78bytes)
movdqu -78(%rsi), %xmm1
movdqu -78(%rdi), %xmm2
mov $-78, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(62bytes):
+INDIRECT_JUMP_ENTRY(62bytes)
movdqu -62(%rdi), %xmm2
movdqu -62(%rsi), %xmm1
mov $-62, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(46bytes):
+INDIRECT_JUMP_ENTRY(46bytes)
movdqu -46(%rdi), %xmm2
movdqu -46(%rsi), %xmm1
mov $-46, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(30bytes):
+INDIRECT_JUMP_ENTRY(30bytes)
movdqu -30(%rdi), %xmm2
movdqu -30(%rsi), %xmm1
mov $-30, %dl
@@ -1467,28 +1467,28 @@ L(30bytes):
ret
.p2align 4
-L(79bytes):
+INDIRECT_JUMP_ENTRY(79bytes)
movdqu -79(%rsi), %xmm1
movdqu -79(%rdi), %xmm2
mov $-79, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(63bytes):
+INDIRECT_JUMP_ENTRY(63bytes)
movdqu -63(%rdi), %xmm2
movdqu -63(%rsi), %xmm1
mov $-63, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(47bytes):
+INDIRECT_JUMP_ENTRY(47bytes)
movdqu -47(%rdi), %xmm2
movdqu -47(%rsi), %xmm1
mov $-47, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(31bytes):
+INDIRECT_JUMP_ENTRY(31bytes)
movdqu -31(%rdi), %xmm2
movdqu -31(%rsi), %xmm1
mov $-31, %dl
@@ -1507,21 +1507,21 @@ L(31bytes):
ret
# endif
.p2align 4
-L(64bytes):
+INDIRECT_JUMP_ENTRY(64bytes)
movdqu -64(%rdi), %xmm2
movdqu -64(%rsi), %xmm1
mov $-64, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(48bytes):
+INDIRECT_JUMP_ENTRY(48bytes)
movdqu -48(%rdi), %xmm2
movdqu -48(%rsi), %xmm1
mov $-48, %dl
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
-L(32bytes):
+INDIRECT_JUMP_ENTRY(32bytes)
movdqu -32(%rdi), %xmm2
movdqu -32(%rsi), %xmm1
mov $-32, %dl
@@ -1599,7 +1599,7 @@ L(end):
L(nequal_bigger):
ret
-L(unreal_case):
+INDIRECT_JUMP_ENTRY(unreal_case)
xor %eax, %eax
ret
# endif
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a96e3a76c2ceae628389f65fefd45d82a88a63b0
commit a96e3a76c2ceae628389f65fefd45d82a88a63b0
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 10:57:27 2018 -0800
x86-64: Use INDIRECT_JUMP_ENTRY in memcpy-ssse3-back.S
* sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
index 7e37035..2b8a5ba 100644
--- a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
+++ b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
@@ -159,7 +159,7 @@ L(copy_backward):
ud2
.p2align 4
-L(shl_0):
+INDIRECT_JUMP_ENTRY(shl_0)
mov %rdx, %r9
shr $8, %r9
@@ -200,7 +200,7 @@ L(shl_0_loop):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_0_bwd):
+INDIRECT_JUMP_ENTRY(shl_0_bwd)
sub $0x80, %rdx
L(copy_backward_loop):
movaps -0x10(%rsi), %xmm1
@@ -231,7 +231,7 @@ L(copy_backward_loop):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_1):
+INDIRECT_JUMP_ENTRY(shl_1)
sub $0x80, %rdx
movaps -0x01(%rsi), %xmm1
movaps 0x0f(%rsi), %xmm2
@@ -268,7 +268,7 @@ L(shl_1):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_1_bwd):
+INDIRECT_JUMP_ENTRY(shl_1_bwd)
movaps -0x01(%rsi), %xmm1
movaps -0x11(%rsi), %xmm2
@@ -314,7 +314,7 @@ L(shl_1_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_2):
+INDIRECT_JUMP_ENTRY(shl_2)
sub $0x80, %rdx
movaps -0x02(%rsi), %xmm1
movaps 0x0e(%rsi), %xmm2
@@ -351,7 +351,7 @@ L(shl_2):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_2_bwd):
+INDIRECT_JUMP_ENTRY(shl_2_bwd)
movaps -0x02(%rsi), %xmm1
movaps -0x12(%rsi), %xmm2
@@ -397,7 +397,7 @@ L(shl_2_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_3):
+INDIRECT_JUMP_ENTRY(shl_3)
sub $0x80, %rdx
movaps -0x03(%rsi), %xmm1
movaps 0x0d(%rsi), %xmm2
@@ -434,7 +434,7 @@ L(shl_3):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_3_bwd):
+INDIRECT_JUMP_ENTRY(shl_3_bwd)
movaps -0x03(%rsi), %xmm1
movaps -0x13(%rsi), %xmm2
@@ -480,7 +480,7 @@ L(shl_3_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_4):
+INDIRECT_JUMP_ENTRY(shl_4)
sub $0x80, %rdx
movaps -0x04(%rsi), %xmm1
movaps 0x0c(%rsi), %xmm2
@@ -517,7 +517,7 @@ L(shl_4):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_4_bwd):
+INDIRECT_JUMP_ENTRY(shl_4_bwd)
movaps -0x04(%rsi), %xmm1
movaps -0x14(%rsi), %xmm2
@@ -563,7 +563,7 @@ L(shl_4_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_5):
+INDIRECT_JUMP_ENTRY(shl_5)
sub $0x80, %rdx
movaps -0x05(%rsi), %xmm1
movaps 0x0b(%rsi), %xmm2
@@ -600,7 +600,7 @@ L(shl_5):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_5_bwd):
+INDIRECT_JUMP_ENTRY(shl_5_bwd)
movaps -0x05(%rsi), %xmm1
movaps -0x15(%rsi), %xmm2
@@ -646,7 +646,7 @@ L(shl_5_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_6):
+INDIRECT_JUMP_ENTRY(shl_6)
sub $0x80, %rdx
movaps -0x06(%rsi), %xmm1
movaps 0x0a(%rsi), %xmm2
@@ -683,7 +683,7 @@ L(shl_6):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_6_bwd):
+INDIRECT_JUMP_ENTRY(shl_6_bwd)
movaps -0x06(%rsi), %xmm1
movaps -0x16(%rsi), %xmm2
@@ -729,7 +729,7 @@ L(shl_6_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_7):
+INDIRECT_JUMP_ENTRY(shl_7)
sub $0x80, %rdx
movaps -0x07(%rsi), %xmm1
movaps 0x09(%rsi), %xmm2
@@ -766,7 +766,7 @@ L(shl_7):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_7_bwd):
+INDIRECT_JUMP_ENTRY(shl_7_bwd)
movaps -0x07(%rsi), %xmm1
movaps -0x17(%rsi), %xmm2
@@ -812,7 +812,7 @@ L(shl_7_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_8):
+INDIRECT_JUMP_ENTRY(shl_8)
sub $0x80, %rdx
movaps -0x08(%rsi), %xmm1
movaps 0x08(%rsi), %xmm2
@@ -849,7 +849,7 @@ L(shl_8):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_8_bwd):
+INDIRECT_JUMP_ENTRY(shl_8_bwd)
movaps -0x08(%rsi), %xmm1
movaps -0x18(%rsi), %xmm2
@@ -896,7 +896,7 @@ L(shl_8_end_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_9):
+INDIRECT_JUMP_ENTRY(shl_9)
sub $0x80, %rdx
movaps -0x09(%rsi), %xmm1
movaps 0x07(%rsi), %xmm2
@@ -933,7 +933,7 @@ L(shl_9):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_9_bwd):
+INDIRECT_JUMP_ENTRY(shl_9_bwd)
movaps -0x09(%rsi), %xmm1
movaps -0x19(%rsi), %xmm2
@@ -979,7 +979,7 @@ L(shl_9_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_10):
+INDIRECT_JUMP_ENTRY(shl_10)
sub $0x80, %rdx
movaps -0x0a(%rsi), %xmm1
movaps 0x06(%rsi), %xmm2
@@ -1016,7 +1016,7 @@ L(shl_10):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_10_bwd):
+INDIRECT_JUMP_ENTRY(shl_10_bwd)
movaps -0x0a(%rsi), %xmm1
movaps -0x1a(%rsi), %xmm2
@@ -1062,7 +1062,7 @@ L(shl_10_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_11):
+INDIRECT_JUMP_ENTRY(shl_11)
sub $0x80, %rdx
movaps -0x0b(%rsi), %xmm1
movaps 0x05(%rsi), %xmm2
@@ -1099,7 +1099,7 @@ L(shl_11):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_11_bwd):
+INDIRECT_JUMP_ENTRY(shl_11_bwd)
movaps -0x0b(%rsi), %xmm1
movaps -0x1b(%rsi), %xmm2
@@ -1145,7 +1145,7 @@ L(shl_11_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_12):
+INDIRECT_JUMP_ENTRY(shl_12)
sub $0x80, %rdx
movdqa -0x0c(%rsi), %xmm1
movaps 0x04(%rsi), %xmm2
@@ -1183,7 +1183,7 @@ L(shl_12):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_12_bwd):
+INDIRECT_JUMP_ENTRY(shl_12_bwd)
movaps -0x0c(%rsi), %xmm1
movaps -0x1c(%rsi), %xmm2
@@ -1229,7 +1229,7 @@ L(shl_12_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_13):
+INDIRECT_JUMP_ENTRY(shl_13)
sub $0x80, %rdx
movaps -0x0d(%rsi), %xmm1
movaps 0x03(%rsi), %xmm2
@@ -1266,7 +1266,7 @@ L(shl_13):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_13_bwd):
+INDIRECT_JUMP_ENTRY(shl_13_bwd)
movaps -0x0d(%rsi), %xmm1
movaps -0x1d(%rsi), %xmm2
@@ -1312,7 +1312,7 @@ L(shl_13_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_14):
+INDIRECT_JUMP_ENTRY(shl_14)
sub $0x80, %rdx
movaps -0x0e(%rsi), %xmm1
movaps 0x02(%rsi), %xmm2
@@ -1349,7 +1349,7 @@ L(shl_14):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_14_bwd):
+INDIRECT_JUMP_ENTRY(shl_14_bwd)
movaps -0x0e(%rsi), %xmm1
movaps -0x1e(%rsi), %xmm2
@@ -1395,7 +1395,7 @@ L(shl_14_bwd):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(shl_15):
+INDIRECT_JUMP_ENTRY(shl_15)
sub $0x80, %rdx
movaps -0x0f(%rsi), %xmm1
movaps 0x01(%rsi), %xmm2
@@ -1432,7 +1432,7 @@ L(shl_15):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_fwd), %rdx, 4)
.p2align 4
-L(shl_15_bwd):
+INDIRECT_JUMP_ENTRY(shl_15_bwd)
movaps -0x0f(%rsi), %xmm1
movaps -0x1f(%rsi), %xmm2
@@ -1688,57 +1688,57 @@ L(gobble_mem_bwd_end):
BRANCH_TO_JMPTBL_ENTRY (L(table_144_bytes_bwd), %rdx, 4)
.p2align 4
-L(fwd_write_128bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_128bytes)
lddqu -128(%rsi), %xmm0
movdqu %xmm0, -128(%rdi)
-L(fwd_write_112bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_112bytes)
lddqu -112(%rsi), %xmm0
movdqu %xmm0, -112(%rdi)
-L(fwd_write_96bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_96bytes)
lddqu -96(%rsi), %xmm0
movdqu %xmm0, -96(%rdi)
-L(fwd_write_80bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_80bytes)
lddqu -80(%rsi), %xmm0
movdqu %xmm0, -80(%rdi)
-L(fwd_write_64bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_64bytes)
lddqu -64(%rsi), %xmm0
movdqu %xmm0, -64(%rdi)
-L(fwd_write_48bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_48bytes)
lddqu -48(%rsi), %xmm0
movdqu %xmm0, -48(%rdi)
-L(fwd_write_32bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_32bytes)
lddqu -32(%rsi), %xmm0
movdqu %xmm0, -32(%rdi)
-L(fwd_write_16bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_16bytes)
lddqu -16(%rsi), %xmm0
movdqu %xmm0, -16(%rdi)
-L(fwd_write_0bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_0bytes)
ret
.p2align 4
-L(fwd_write_143bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_143bytes)
lddqu -143(%rsi), %xmm0
movdqu %xmm0, -143(%rdi)
-L(fwd_write_127bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_127bytes)
lddqu -127(%rsi), %xmm0
movdqu %xmm0, -127(%rdi)
-L(fwd_write_111bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_111bytes)
lddqu -111(%rsi), %xmm0
movdqu %xmm0, -111(%rdi)
-L(fwd_write_95bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_95bytes)
lddqu -95(%rsi), %xmm0
movdqu %xmm0, -95(%rdi)
-L(fwd_write_79bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_79bytes)
lddqu -79(%rsi), %xmm0
movdqu %xmm0, -79(%rdi)
-L(fwd_write_63bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_63bytes)
lddqu -63(%rsi), %xmm0
movdqu %xmm0, -63(%rdi)
-L(fwd_write_47bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_47bytes)
lddqu -47(%rsi), %xmm0
movdqu %xmm0, -47(%rdi)
-L(fwd_write_31bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_31bytes)
lddqu -31(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -31(%rdi)
@@ -1746,7 +1746,7 @@ L(fwd_write_31bytes):
ret
.p2align 4
-L(fwd_write_15bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_15bytes)
mov -15(%rsi), %rdx
mov -8(%rsi), %rcx
mov %rdx, -15(%rdi)
@@ -1754,28 +1754,28 @@ L(fwd_write_15bytes):
ret
.p2align 4
-L(fwd_write_142bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_142bytes)
lddqu -142(%rsi), %xmm0
movdqu %xmm0, -142(%rdi)
-L(fwd_write_126bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_126bytes)
lddqu -126(%rsi), %xmm0
movdqu %xmm0, -126(%rdi)
-L(fwd_write_110bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_110bytes)
lddqu -110(%rsi), %xmm0
movdqu %xmm0, -110(%rdi)
-L(fwd_write_94bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_94bytes)
lddqu -94(%rsi), %xmm0
movdqu %xmm0, -94(%rdi)
-L(fwd_write_78bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_78bytes)
lddqu -78(%rsi), %xmm0
movdqu %xmm0, -78(%rdi)
-L(fwd_write_62bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_62bytes)
lddqu -62(%rsi), %xmm0
movdqu %xmm0, -62(%rdi)
-L(fwd_write_46bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_46bytes)
lddqu -46(%rsi), %xmm0
movdqu %xmm0, -46(%rdi)
-L(fwd_write_30bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_30bytes)
lddqu -30(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -30(%rdi)
@@ -1783,7 +1783,7 @@ L(fwd_write_30bytes):
ret
.p2align 4
-L(fwd_write_14bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_14bytes)
mov -14(%rsi), %rdx
mov -8(%rsi), %rcx
mov %rdx, -14(%rdi)
@@ -1791,28 +1791,28 @@ L(fwd_write_14bytes):
ret
.p2align 4
-L(fwd_write_141bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_141bytes)
lddqu -141(%rsi), %xmm0
movdqu %xmm0, -141(%rdi)
-L(fwd_write_125bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_125bytes)
lddqu -125(%rsi), %xmm0
movdqu %xmm0, -125(%rdi)
-L(fwd_write_109bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_109bytes)
lddqu -109(%rsi), %xmm0
movdqu %xmm0, -109(%rdi)
-L(fwd_write_93bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_93bytes)
lddqu -93(%rsi), %xmm0
movdqu %xmm0, -93(%rdi)
-L(fwd_write_77bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_77bytes)
lddqu -77(%rsi), %xmm0
movdqu %xmm0, -77(%rdi)
-L(fwd_write_61bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_61bytes)
lddqu -61(%rsi), %xmm0
movdqu %xmm0, -61(%rdi)
-L(fwd_write_45bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_45bytes)
lddqu -45(%rsi), %xmm0
movdqu %xmm0, -45(%rdi)
-L(fwd_write_29bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_29bytes)
lddqu -29(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -29(%rdi)
@@ -1820,7 +1820,7 @@ L(fwd_write_29bytes):
ret
.p2align 4
-L(fwd_write_13bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_13bytes)
mov -13(%rsi), %rdx
mov -8(%rsi), %rcx
mov %rdx, -13(%rdi)
@@ -1828,28 +1828,28 @@ L(fwd_write_13bytes):
ret
.p2align 4
-L(fwd_write_140bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_140bytes)
lddqu -140(%rsi), %xmm0
movdqu %xmm0, -140(%rdi)
-L(fwd_write_124bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_124bytes)
lddqu -124(%rsi), %xmm0
movdqu %xmm0, -124(%rdi)
-L(fwd_write_108bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_108bytes)
lddqu -108(%rsi), %xmm0
movdqu %xmm0, -108(%rdi)
-L(fwd_write_92bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_92bytes)
lddqu -92(%rsi), %xmm0
movdqu %xmm0, -92(%rdi)
-L(fwd_write_76bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_76bytes)
lddqu -76(%rsi), %xmm0
movdqu %xmm0, -76(%rdi)
-L(fwd_write_60bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_60bytes)
lddqu -60(%rsi), %xmm0
movdqu %xmm0, -60(%rdi)
-L(fwd_write_44bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_44bytes)
lddqu -44(%rsi), %xmm0
movdqu %xmm0, -44(%rdi)
-L(fwd_write_28bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_28bytes)
lddqu -28(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -28(%rdi)
@@ -1857,7 +1857,7 @@ L(fwd_write_28bytes):
ret
.p2align 4
-L(fwd_write_12bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_12bytes)
mov -12(%rsi), %rdx
mov -4(%rsi), %ecx
mov %rdx, -12(%rdi)
@@ -1865,28 +1865,28 @@ L(fwd_write_12bytes):
ret
.p2align 4
-L(fwd_write_139bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_139bytes)
lddqu -139(%rsi), %xmm0
movdqu %xmm0, -139(%rdi)
-L(fwd_write_123bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_123bytes)
lddqu -123(%rsi), %xmm0
movdqu %xmm0, -123(%rdi)
-L(fwd_write_107bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_107bytes)
lddqu -107(%rsi), %xmm0
movdqu %xmm0, -107(%rdi)
-L(fwd_write_91bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_91bytes)
lddqu -91(%rsi), %xmm0
movdqu %xmm0, -91(%rdi)
-L(fwd_write_75bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_75bytes)
lddqu -75(%rsi), %xmm0
movdqu %xmm0, -75(%rdi)
-L(fwd_write_59bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_59bytes)
lddqu -59(%rsi), %xmm0
movdqu %xmm0, -59(%rdi)
-L(fwd_write_43bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_43bytes)
lddqu -43(%rsi), %xmm0
movdqu %xmm0, -43(%rdi)
-L(fwd_write_27bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_27bytes)
lddqu -27(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -27(%rdi)
@@ -1894,7 +1894,7 @@ L(fwd_write_27bytes):
ret
.p2align 4
-L(fwd_write_11bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_11bytes)
mov -11(%rsi), %rdx
mov -4(%rsi), %ecx
mov %rdx, -11(%rdi)
@@ -1902,28 +1902,28 @@ L(fwd_write_11bytes):
ret
.p2align 4
-L(fwd_write_138bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_138bytes)
lddqu -138(%rsi), %xmm0
movdqu %xmm0, -138(%rdi)
-L(fwd_write_122bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_122bytes)
lddqu -122(%rsi), %xmm0
movdqu %xmm0, -122(%rdi)
-L(fwd_write_106bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_106bytes)
lddqu -106(%rsi), %xmm0
movdqu %xmm0, -106(%rdi)
-L(fwd_write_90bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_90bytes)
lddqu -90(%rsi), %xmm0
movdqu %xmm0, -90(%rdi)
-L(fwd_write_74bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_74bytes)
lddqu -74(%rsi), %xmm0
movdqu %xmm0, -74(%rdi)
-L(fwd_write_58bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_58bytes)
lddqu -58(%rsi), %xmm0
movdqu %xmm0, -58(%rdi)
-L(fwd_write_42bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_42bytes)
lddqu -42(%rsi), %xmm0
movdqu %xmm0, -42(%rdi)
-L(fwd_write_26bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_26bytes)
lddqu -26(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -26(%rdi)
@@ -1931,7 +1931,7 @@ L(fwd_write_26bytes):
ret
.p2align 4
-L(fwd_write_10bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_10bytes)
mov -10(%rsi), %rdx
mov -4(%rsi), %ecx
mov %rdx, -10(%rdi)
@@ -1939,28 +1939,28 @@ L(fwd_write_10bytes):
ret
.p2align 4
-L(fwd_write_137bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_137bytes)
lddqu -137(%rsi), %xmm0
movdqu %xmm0, -137(%rdi)
-L(fwd_write_121bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_121bytes)
lddqu -121(%rsi), %xmm0
movdqu %xmm0, -121(%rdi)
-L(fwd_write_105bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_105bytes)
lddqu -105(%rsi), %xmm0
movdqu %xmm0, -105(%rdi)
-L(fwd_write_89bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_89bytes)
lddqu -89(%rsi), %xmm0
movdqu %xmm0, -89(%rdi)
-L(fwd_write_73bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_73bytes)
lddqu -73(%rsi), %xmm0
movdqu %xmm0, -73(%rdi)
-L(fwd_write_57bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_57bytes)
lddqu -57(%rsi), %xmm0
movdqu %xmm0, -57(%rdi)
-L(fwd_write_41bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_41bytes)
lddqu -41(%rsi), %xmm0
movdqu %xmm0, -41(%rdi)
-L(fwd_write_25bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_25bytes)
lddqu -25(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -25(%rdi)
@@ -1968,7 +1968,7 @@ L(fwd_write_25bytes):
ret
.p2align 4
-L(fwd_write_9bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_9bytes)
mov -9(%rsi), %rdx
mov -4(%rsi), %ecx
mov %rdx, -9(%rdi)
@@ -1976,28 +1976,28 @@ L(fwd_write_9bytes):
ret
.p2align 4
-L(fwd_write_136bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_136bytes)
lddqu -136(%rsi), %xmm0
movdqu %xmm0, -136(%rdi)
-L(fwd_write_120bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_120bytes)
lddqu -120(%rsi), %xmm0
movdqu %xmm0, -120(%rdi)
-L(fwd_write_104bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_104bytes)
lddqu -104(%rsi), %xmm0
movdqu %xmm0, -104(%rdi)
-L(fwd_write_88bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_88bytes)
lddqu -88(%rsi), %xmm0
movdqu %xmm0, -88(%rdi)
-L(fwd_write_72bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_72bytes)
lddqu -72(%rsi), %xmm0
movdqu %xmm0, -72(%rdi)
-L(fwd_write_56bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_56bytes)
lddqu -56(%rsi), %xmm0
movdqu %xmm0, -56(%rdi)
-L(fwd_write_40bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_40bytes)
lddqu -40(%rsi), %xmm0
movdqu %xmm0, -40(%rdi)
-L(fwd_write_24bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_24bytes)
lddqu -24(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -24(%rdi)
@@ -2005,34 +2005,34 @@ L(fwd_write_24bytes):
ret
.p2align 4
-L(fwd_write_8bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_8bytes)
mov -8(%rsi), %rdx
mov %rdx, -8(%rdi)
ret
.p2align 4
-L(fwd_write_135bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_135bytes)
lddqu -135(%rsi), %xmm0
movdqu %xmm0, -135(%rdi)
-L(fwd_write_119bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_119bytes)
lddqu -119(%rsi), %xmm0
movdqu %xmm0, -119(%rdi)
-L(fwd_write_103bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_103bytes)
lddqu -103(%rsi), %xmm0
movdqu %xmm0, -103(%rdi)
-L(fwd_write_87bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_87bytes)
lddqu -87(%rsi), %xmm0
movdqu %xmm0, -87(%rdi)
-L(fwd_write_71bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_71bytes)
lddqu -71(%rsi), %xmm0
movdqu %xmm0, -71(%rdi)
-L(fwd_write_55bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_55bytes)
lddqu -55(%rsi), %xmm0
movdqu %xmm0, -55(%rdi)
-L(fwd_write_39bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_39bytes)
lddqu -39(%rsi), %xmm0
movdqu %xmm0, -39(%rdi)
-L(fwd_write_23bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_23bytes)
lddqu -23(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -23(%rdi)
@@ -2040,7 +2040,7 @@ L(fwd_write_23bytes):
ret
.p2align 4
-L(fwd_write_7bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_7bytes)
mov -7(%rsi), %edx
mov -4(%rsi), %ecx
mov %edx, -7(%rdi)
@@ -2048,28 +2048,28 @@ L(fwd_write_7bytes):
ret
.p2align 4
-L(fwd_write_134bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_134bytes)
lddqu -134(%rsi), %xmm0
movdqu %xmm0, -134(%rdi)
-L(fwd_write_118bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_118bytes)
lddqu -118(%rsi), %xmm0
movdqu %xmm0, -118(%rdi)
-L(fwd_write_102bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_102bytes)
lddqu -102(%rsi), %xmm0
movdqu %xmm0, -102(%rdi)
-L(fwd_write_86bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_86bytes)
lddqu -86(%rsi), %xmm0
movdqu %xmm0, -86(%rdi)
-L(fwd_write_70bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_70bytes)
lddqu -70(%rsi), %xmm0
movdqu %xmm0, -70(%rdi)
-L(fwd_write_54bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_54bytes)
lddqu -54(%rsi), %xmm0
movdqu %xmm0, -54(%rdi)
-L(fwd_write_38bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_38bytes)
lddqu -38(%rsi), %xmm0
movdqu %xmm0, -38(%rdi)
-L(fwd_write_22bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_22bytes)
lddqu -22(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -22(%rdi)
@@ -2077,7 +2077,7 @@ L(fwd_write_22bytes):
ret
.p2align 4
-L(fwd_write_6bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_6bytes)
mov -6(%rsi), %edx
mov -4(%rsi), %ecx
mov %edx, -6(%rdi)
@@ -2085,28 +2085,28 @@ L(fwd_write_6bytes):
ret
.p2align 4
-L(fwd_write_133bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_133bytes)
lddqu -133(%rsi), %xmm0
movdqu %xmm0, -133(%rdi)
-L(fwd_write_117bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_117bytes)
lddqu -117(%rsi), %xmm0
movdqu %xmm0, -117(%rdi)
-L(fwd_write_101bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_101bytes)
lddqu -101(%rsi), %xmm0
movdqu %xmm0, -101(%rdi)
-L(fwd_write_85bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_85bytes)
lddqu -85(%rsi), %xmm0
movdqu %xmm0, -85(%rdi)
-L(fwd_write_69bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_69bytes)
lddqu -69(%rsi), %xmm0
movdqu %xmm0, -69(%rdi)
-L(fwd_write_53bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_53bytes)
lddqu -53(%rsi), %xmm0
movdqu %xmm0, -53(%rdi)
-L(fwd_write_37bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_37bytes)
lddqu -37(%rsi), %xmm0
movdqu %xmm0, -37(%rdi)
-L(fwd_write_21bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_21bytes)
lddqu -21(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -21(%rdi)
@@ -2114,7 +2114,7 @@ L(fwd_write_21bytes):
ret
.p2align 4
-L(fwd_write_5bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_5bytes)
mov -5(%rsi), %edx
mov -4(%rsi), %ecx
mov %edx, -5(%rdi)
@@ -2122,28 +2122,28 @@ L(fwd_write_5bytes):
ret
.p2align 4
-L(fwd_write_132bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_132bytes)
lddqu -132(%rsi), %xmm0
movdqu %xmm0, -132(%rdi)
-L(fwd_write_116bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_116bytes)
lddqu -116(%rsi), %xmm0
movdqu %xmm0, -116(%rdi)
-L(fwd_write_100bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_100bytes)
lddqu -100(%rsi), %xmm0
movdqu %xmm0, -100(%rdi)
-L(fwd_write_84bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_84bytes)
lddqu -84(%rsi), %xmm0
movdqu %xmm0, -84(%rdi)
-L(fwd_write_68bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_68bytes)
lddqu -68(%rsi), %xmm0
movdqu %xmm0, -68(%rdi)
-L(fwd_write_52bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_52bytes)
lddqu -52(%rsi), %xmm0
movdqu %xmm0, -52(%rdi)
-L(fwd_write_36bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_36bytes)
lddqu -36(%rsi), %xmm0
movdqu %xmm0, -36(%rdi)
-L(fwd_write_20bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_20bytes)
lddqu -20(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -20(%rdi)
@@ -2151,34 +2151,34 @@ L(fwd_write_20bytes):
ret
.p2align 4
-L(fwd_write_4bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_4bytes)
mov -4(%rsi), %edx
mov %edx, -4(%rdi)
ret
.p2align 4
-L(fwd_write_131bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_131bytes)
lddqu -131(%rsi), %xmm0
movdqu %xmm0, -131(%rdi)
-L(fwd_write_115bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_115bytes)
lddqu -115(%rsi), %xmm0
movdqu %xmm0, -115(%rdi)
-L(fwd_write_99bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_99bytes)
lddqu -99(%rsi), %xmm0
movdqu %xmm0, -99(%rdi)
-L(fwd_write_83bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_83bytes)
lddqu -83(%rsi), %xmm0
movdqu %xmm0, -83(%rdi)
-L(fwd_write_67bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_67bytes)
lddqu -67(%rsi), %xmm0
movdqu %xmm0, -67(%rdi)
-L(fwd_write_51bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_51bytes)
lddqu -51(%rsi), %xmm0
movdqu %xmm0, -51(%rdi)
-L(fwd_write_35bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_35bytes)
lddqu -35(%rsi), %xmm0
movdqu %xmm0, -35(%rdi)
-L(fwd_write_19bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_19bytes)
lddqu -19(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -19(%rdi)
@@ -2186,7 +2186,7 @@ L(fwd_write_19bytes):
ret
.p2align 4
-L(fwd_write_3bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_3bytes)
mov -3(%rsi), %dx
mov -2(%rsi), %cx
mov %dx, -3(%rdi)
@@ -2194,28 +2194,28 @@ L(fwd_write_3bytes):
ret
.p2align 4
-L(fwd_write_130bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_130bytes)
lddqu -130(%rsi), %xmm0
movdqu %xmm0, -130(%rdi)
-L(fwd_write_114bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_114bytes)
lddqu -114(%rsi), %xmm0
movdqu %xmm0, -114(%rdi)
-L(fwd_write_98bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_98bytes)
lddqu -98(%rsi), %xmm0
movdqu %xmm0, -98(%rdi)
-L(fwd_write_82bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_82bytes)
lddqu -82(%rsi), %xmm0
movdqu %xmm0, -82(%rdi)
-L(fwd_write_66bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_66bytes)
lddqu -66(%rsi), %xmm0
movdqu %xmm0, -66(%rdi)
-L(fwd_write_50bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_50bytes)
lddqu -50(%rsi), %xmm0
movdqu %xmm0, -50(%rdi)
-L(fwd_write_34bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_34bytes)
lddqu -34(%rsi), %xmm0
movdqu %xmm0, -34(%rdi)
-L(fwd_write_18bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_18bytes)
lddqu -18(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -18(%rdi)
@@ -2223,34 +2223,34 @@ L(fwd_write_18bytes):
ret
.p2align 4
-L(fwd_write_2bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_2bytes)
movzwl -2(%rsi), %edx
mov %dx, -2(%rdi)
ret
.p2align 4
-L(fwd_write_129bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_129bytes)
lddqu -129(%rsi), %xmm0
movdqu %xmm0, -129(%rdi)
-L(fwd_write_113bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_113bytes)
lddqu -113(%rsi), %xmm0
movdqu %xmm0, -113(%rdi)
-L(fwd_write_97bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_97bytes)
lddqu -97(%rsi), %xmm0
movdqu %xmm0, -97(%rdi)
-L(fwd_write_81bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_81bytes)
lddqu -81(%rsi), %xmm0
movdqu %xmm0, -81(%rdi)
-L(fwd_write_65bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_65bytes)
lddqu -65(%rsi), %xmm0
movdqu %xmm0, -65(%rdi)
-L(fwd_write_49bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_49bytes)
lddqu -49(%rsi), %xmm0
movdqu %xmm0, -49(%rdi)
-L(fwd_write_33bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_33bytes)
lddqu -33(%rsi), %xmm0
movdqu %xmm0, -33(%rdi)
-L(fwd_write_17bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_17bytes)
lddqu -17(%rsi), %xmm0
lddqu -16(%rsi), %xmm1
movdqu %xmm0, -17(%rdi)
@@ -2258,62 +2258,62 @@ L(fwd_write_17bytes):
ret
.p2align 4
-L(fwd_write_1bytes):
+INDIRECT_JUMP_ENTRY(fwd_write_1bytes)
movzbl -1(%rsi), %edx
mov %dl, -1(%rdi)
ret
.p2align 4
-L(bwd_write_128bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_128bytes)
lddqu 112(%rsi), %xmm0
movdqu %xmm0, 112(%rdi)
-L(bwd_write_112bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_112bytes)
lddqu 96(%rsi), %xmm0
movdqu %xmm0, 96(%rdi)
-L(bwd_write_96bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_96bytes)
lddqu 80(%rsi), %xmm0
movdqu %xmm0, 80(%rdi)
-L(bwd_write_80bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_80bytes)
lddqu 64(%rsi), %xmm0
movdqu %xmm0, 64(%rdi)
-L(bwd_write_64bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_64bytes)
lddqu 48(%rsi), %xmm0
movdqu %xmm0, 48(%rdi)
-L(bwd_write_48bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_48bytes)
lddqu 32(%rsi), %xmm0
movdqu %xmm0, 32(%rdi)
-L(bwd_write_32bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_32bytes)
lddqu 16(%rsi), %xmm0
movdqu %xmm0, 16(%rdi)
-L(bwd_write_16bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_16bytes)
lddqu (%rsi), %xmm0
movdqu %xmm0, (%rdi)
-L(bwd_write_0bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_0bytes)
ret
.p2align 4
-L(bwd_write_143bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_143bytes)
lddqu 127(%rsi), %xmm0
movdqu %xmm0, 127(%rdi)
-L(bwd_write_127bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_127bytes)
lddqu 111(%rsi), %xmm0
movdqu %xmm0, 111(%rdi)
-L(bwd_write_111bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_111bytes)
lddqu 95(%rsi), %xmm0
movdqu %xmm0, 95(%rdi)
-L(bwd_write_95bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_95bytes)
lddqu 79(%rsi), %xmm0
movdqu %xmm0, 79(%rdi)
-L(bwd_write_79bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_79bytes)
lddqu 63(%rsi), %xmm0
movdqu %xmm0, 63(%rdi)
-L(bwd_write_63bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_63bytes)
lddqu 47(%rsi), %xmm0
movdqu %xmm0, 47(%rdi)
-L(bwd_write_47bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_47bytes)
lddqu 31(%rsi), %xmm0
movdqu %xmm0, 31(%rdi)
-L(bwd_write_31bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_31bytes)
lddqu 15(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 15(%rdi)
@@ -2322,7 +2322,7 @@ L(bwd_write_31bytes):
.p2align 4
-L(bwd_write_15bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_15bytes)
mov 7(%rsi), %rdx
mov (%rsi), %rcx
mov %rdx, 7(%rdi)
@@ -2330,28 +2330,28 @@ L(bwd_write_15bytes):
ret
.p2align 4
-L(bwd_write_142bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_142bytes)
lddqu 126(%rsi), %xmm0
movdqu %xmm0, 126(%rdi)
-L(bwd_write_126bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_126bytes)
lddqu 110(%rsi), %xmm0
movdqu %xmm0, 110(%rdi)
-L(bwd_write_110bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_110bytes)
lddqu 94(%rsi), %xmm0
movdqu %xmm0, 94(%rdi)
-L(bwd_write_94bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_94bytes)
lddqu 78(%rsi), %xmm0
movdqu %xmm0, 78(%rdi)
-L(bwd_write_78bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_78bytes)
lddqu 62(%rsi), %xmm0
movdqu %xmm0, 62(%rdi)
-L(bwd_write_62bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_62bytes)
lddqu 46(%rsi), %xmm0
movdqu %xmm0, 46(%rdi)
-L(bwd_write_46bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_46bytes)
lddqu 30(%rsi), %xmm0
movdqu %xmm0, 30(%rdi)
-L(bwd_write_30bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_30bytes)
lddqu 14(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 14(%rdi)
@@ -2359,7 +2359,7 @@ L(bwd_write_30bytes):
ret
.p2align 4
-L(bwd_write_14bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_14bytes)
mov 6(%rsi), %rdx
mov (%rsi), %rcx
mov %rdx, 6(%rdi)
@@ -2367,28 +2367,28 @@ L(bwd_write_14bytes):
ret
.p2align 4
-L(bwd_write_141bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_141bytes)
lddqu 125(%rsi), %xmm0
movdqu %xmm0, 125(%rdi)
-L(bwd_write_125bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_125bytes)
lddqu 109(%rsi), %xmm0
movdqu %xmm0, 109(%rdi)
-L(bwd_write_109bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_109bytes)
lddqu 93(%rsi), %xmm0
movdqu %xmm0, 93(%rdi)
-L(bwd_write_93bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_93bytes)
lddqu 77(%rsi), %xmm0
movdqu %xmm0, 77(%rdi)
-L(bwd_write_77bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_77bytes)
lddqu 61(%rsi), %xmm0
movdqu %xmm0, 61(%rdi)
-L(bwd_write_61bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_61bytes)
lddqu 45(%rsi), %xmm0
movdqu %xmm0, 45(%rdi)
-L(bwd_write_45bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_45bytes)
lddqu 29(%rsi), %xmm0
movdqu %xmm0, 29(%rdi)
-L(bwd_write_29bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_29bytes)
lddqu 13(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 13(%rdi)
@@ -2396,7 +2396,7 @@ L(bwd_write_29bytes):
ret
.p2align 4
-L(bwd_write_13bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_13bytes)
mov 5(%rsi), %rdx
mov (%rsi), %rcx
mov %rdx, 5(%rdi)
@@ -2404,28 +2404,28 @@ L(bwd_write_13bytes):
ret
.p2align 4
-L(bwd_write_140bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_140bytes)
lddqu 124(%rsi), %xmm0
movdqu %xmm0, 124(%rdi)
-L(bwd_write_124bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_124bytes)
lddqu 108(%rsi), %xmm0
movdqu %xmm0, 108(%rdi)
-L(bwd_write_108bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_108bytes)
lddqu 92(%rsi), %xmm0
movdqu %xmm0, 92(%rdi)
-L(bwd_write_92bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_92bytes)
lddqu 76(%rsi), %xmm0
movdqu %xmm0, 76(%rdi)
-L(bwd_write_76bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_76bytes)
lddqu 60(%rsi), %xmm0
movdqu %xmm0, 60(%rdi)
-L(bwd_write_60bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_60bytes)
lddqu 44(%rsi), %xmm0
movdqu %xmm0, 44(%rdi)
-L(bwd_write_44bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_44bytes)
lddqu 28(%rsi), %xmm0
movdqu %xmm0, 28(%rdi)
-L(bwd_write_28bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_28bytes)
lddqu 12(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 12(%rdi)
@@ -2433,7 +2433,7 @@ L(bwd_write_28bytes):
ret
.p2align 4
-L(bwd_write_12bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_12bytes)
mov 4(%rsi), %rdx
mov (%rsi), %rcx
mov %rdx, 4(%rdi)
@@ -2441,28 +2441,28 @@ L(bwd_write_12bytes):
ret
.p2align 4
-L(bwd_write_139bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_139bytes)
lddqu 123(%rsi), %xmm0
movdqu %xmm0, 123(%rdi)
-L(bwd_write_123bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_123bytes)
lddqu 107(%rsi), %xmm0
movdqu %xmm0, 107(%rdi)
-L(bwd_write_107bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_107bytes)
lddqu 91(%rsi), %xmm0
movdqu %xmm0, 91(%rdi)
-L(bwd_write_91bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_91bytes)
lddqu 75(%rsi), %xmm0
movdqu %xmm0, 75(%rdi)
-L(bwd_write_75bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_75bytes)
lddqu 59(%rsi), %xmm0
movdqu %xmm0, 59(%rdi)
-L(bwd_write_59bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_59bytes)
lddqu 43(%rsi), %xmm0
movdqu %xmm0, 43(%rdi)
-L(bwd_write_43bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_43bytes)
lddqu 27(%rsi), %xmm0
movdqu %xmm0, 27(%rdi)
-L(bwd_write_27bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_27bytes)
lddqu 11(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 11(%rdi)
@@ -2470,7 +2470,7 @@ L(bwd_write_27bytes):
ret
.p2align 4
-L(bwd_write_11bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_11bytes)
mov 3(%rsi), %rdx
mov (%rsi), %rcx
mov %rdx, 3(%rdi)
@@ -2478,28 +2478,28 @@ L(bwd_write_11bytes):
ret
.p2align 4
-L(bwd_write_138bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_138bytes)
lddqu 122(%rsi), %xmm0
movdqu %xmm0, 122(%rdi)
-L(bwd_write_122bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_122bytes)
lddqu 106(%rsi), %xmm0
movdqu %xmm0, 106(%rdi)
-L(bwd_write_106bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_106bytes)
lddqu 90(%rsi), %xmm0
movdqu %xmm0, 90(%rdi)
-L(bwd_write_90bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_90bytes)
lddqu 74(%rsi), %xmm0
movdqu %xmm0, 74(%rdi)
-L(bwd_write_74bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_74bytes)
lddqu 58(%rsi), %xmm0
movdqu %xmm0, 58(%rdi)
-L(bwd_write_58bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_58bytes)
lddqu 42(%rsi), %xmm0
movdqu %xmm0, 42(%rdi)
-L(bwd_write_42bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_42bytes)
lddqu 26(%rsi), %xmm0
movdqu %xmm0, 26(%rdi)
-L(bwd_write_26bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_26bytes)
lddqu 10(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 10(%rdi)
@@ -2507,7 +2507,7 @@ L(bwd_write_26bytes):
ret
.p2align 4
-L(bwd_write_10bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_10bytes)
mov 2(%rsi), %rdx
mov (%rsi), %rcx
mov %rdx, 2(%rdi)
@@ -2515,28 +2515,28 @@ L(bwd_write_10bytes):
ret
.p2align 4
-L(bwd_write_137bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_137bytes)
lddqu 121(%rsi), %xmm0
movdqu %xmm0, 121(%rdi)
-L(bwd_write_121bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_121bytes)
lddqu 105(%rsi), %xmm0
movdqu %xmm0, 105(%rdi)
-L(bwd_write_105bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_105bytes)
lddqu 89(%rsi), %xmm0
movdqu %xmm0, 89(%rdi)
-L(bwd_write_89bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_89bytes)
lddqu 73(%rsi), %xmm0
movdqu %xmm0, 73(%rdi)
-L(bwd_write_73bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_73bytes)
lddqu 57(%rsi), %xmm0
movdqu %xmm0, 57(%rdi)
-L(bwd_write_57bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_57bytes)
lddqu 41(%rsi), %xmm0
movdqu %xmm0, 41(%rdi)
-L(bwd_write_41bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_41bytes)
lddqu 25(%rsi), %xmm0
movdqu %xmm0, 25(%rdi)
-L(bwd_write_25bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_25bytes)
lddqu 9(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 9(%rdi)
@@ -2544,7 +2544,7 @@ L(bwd_write_25bytes):
ret
.p2align 4
-L(bwd_write_9bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_9bytes)
mov 1(%rsi), %rdx
mov (%rsi), %rcx
mov %rdx, 1(%rdi)
@@ -2552,28 +2552,28 @@ L(bwd_write_9bytes):
ret
.p2align 4
-L(bwd_write_136bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_136bytes)
lddqu 120(%rsi), %xmm0
movdqu %xmm0, 120(%rdi)
-L(bwd_write_120bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_120bytes)
lddqu 104(%rsi), %xmm0
movdqu %xmm0, 104(%rdi)
-L(bwd_write_104bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_104bytes)
lddqu 88(%rsi), %xmm0
movdqu %xmm0, 88(%rdi)
-L(bwd_write_88bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_88bytes)
lddqu 72(%rsi), %xmm0
movdqu %xmm0, 72(%rdi)
-L(bwd_write_72bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_72bytes)
lddqu 56(%rsi), %xmm0
movdqu %xmm0, 56(%rdi)
-L(bwd_write_56bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_56bytes)
lddqu 40(%rsi), %xmm0
movdqu %xmm0, 40(%rdi)
-L(bwd_write_40bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_40bytes)
lddqu 24(%rsi), %xmm0
movdqu %xmm0, 24(%rdi)
-L(bwd_write_24bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_24bytes)
lddqu 8(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 8(%rdi)
@@ -2581,34 +2581,34 @@ L(bwd_write_24bytes):
ret
.p2align 4
-L(bwd_write_8bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_8bytes)
mov (%rsi), %rdx
mov %rdx, (%rdi)
ret
.p2align 4
-L(bwd_write_135bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_135bytes)
lddqu 119(%rsi), %xmm0
movdqu %xmm0, 119(%rdi)
-L(bwd_write_119bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_119bytes)
lddqu 103(%rsi), %xmm0
movdqu %xmm0, 103(%rdi)
-L(bwd_write_103bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_103bytes)
lddqu 87(%rsi), %xmm0
movdqu %xmm0, 87(%rdi)
-L(bwd_write_87bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_87bytes)
lddqu 71(%rsi), %xmm0
movdqu %xmm0, 71(%rdi)
-L(bwd_write_71bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_71bytes)
lddqu 55(%rsi), %xmm0
movdqu %xmm0, 55(%rdi)
-L(bwd_write_55bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_55bytes)
lddqu 39(%rsi), %xmm0
movdqu %xmm0, 39(%rdi)
-L(bwd_write_39bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_39bytes)
lddqu 23(%rsi), %xmm0
movdqu %xmm0, 23(%rdi)
-L(bwd_write_23bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_23bytes)
lddqu 7(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 7(%rdi)
@@ -2616,7 +2616,7 @@ L(bwd_write_23bytes):
ret
.p2align 4
-L(bwd_write_7bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_7bytes)
mov 3(%rsi), %edx
mov (%rsi), %ecx
mov %edx, 3(%rdi)
@@ -2624,28 +2624,28 @@ L(bwd_write_7bytes):
ret
.p2align 4
-L(bwd_write_134bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_134bytes)
lddqu 118(%rsi), %xmm0
movdqu %xmm0, 118(%rdi)
-L(bwd_write_118bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_118bytes)
lddqu 102(%rsi), %xmm0
movdqu %xmm0, 102(%rdi)
-L(bwd_write_102bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_102bytes)
lddqu 86(%rsi), %xmm0
movdqu %xmm0, 86(%rdi)
-L(bwd_write_86bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_86bytes)
lddqu 70(%rsi), %xmm0
movdqu %xmm0, 70(%rdi)
-L(bwd_write_70bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_70bytes)
lddqu 54(%rsi), %xmm0
movdqu %xmm0, 54(%rdi)
-L(bwd_write_54bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_54bytes)
lddqu 38(%rsi), %xmm0
movdqu %xmm0, 38(%rdi)
-L(bwd_write_38bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_38bytes)
lddqu 22(%rsi), %xmm0
movdqu %xmm0, 22(%rdi)
-L(bwd_write_22bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_22bytes)
lddqu 6(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 6(%rdi)
@@ -2653,7 +2653,7 @@ L(bwd_write_22bytes):
ret
.p2align 4
-L(bwd_write_6bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_6bytes)
mov 2(%rsi), %edx
mov (%rsi), %ecx
mov %edx, 2(%rdi)
@@ -2661,28 +2661,28 @@ L(bwd_write_6bytes):
ret
.p2align 4
-L(bwd_write_133bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_133bytes)
lddqu 117(%rsi), %xmm0
movdqu %xmm0, 117(%rdi)
-L(bwd_write_117bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_117bytes)
lddqu 101(%rsi), %xmm0
movdqu %xmm0, 101(%rdi)
-L(bwd_write_101bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_101bytes)
lddqu 85(%rsi), %xmm0
movdqu %xmm0, 85(%rdi)
-L(bwd_write_85bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_85bytes)
lddqu 69(%rsi), %xmm0
movdqu %xmm0, 69(%rdi)
-L(bwd_write_69bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_69bytes)
lddqu 53(%rsi), %xmm0
movdqu %xmm0, 53(%rdi)
-L(bwd_write_53bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_53bytes)
lddqu 37(%rsi), %xmm0
movdqu %xmm0, 37(%rdi)
-L(bwd_write_37bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_37bytes)
lddqu 21(%rsi), %xmm0
movdqu %xmm0, 21(%rdi)
-L(bwd_write_21bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_21bytes)
lddqu 5(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 5(%rdi)
@@ -2690,7 +2690,7 @@ L(bwd_write_21bytes):
ret
.p2align 4
-L(bwd_write_5bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_5bytes)
mov 1(%rsi), %edx
mov (%rsi), %ecx
mov %edx, 1(%rdi)
@@ -2698,28 +2698,28 @@ L(bwd_write_5bytes):
ret
.p2align 4
-L(bwd_write_132bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_132bytes)
lddqu 116(%rsi), %xmm0
movdqu %xmm0, 116(%rdi)
-L(bwd_write_116bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_116bytes)
lddqu 100(%rsi), %xmm0
movdqu %xmm0, 100(%rdi)
-L(bwd_write_100bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_100bytes)
lddqu 84(%rsi), %xmm0
movdqu %xmm0, 84(%rdi)
-L(bwd_write_84bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_84bytes)
lddqu 68(%rsi), %xmm0
movdqu %xmm0, 68(%rdi)
-L(bwd_write_68bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_68bytes)
lddqu 52(%rsi), %xmm0
movdqu %xmm0, 52(%rdi)
-L(bwd_write_52bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_52bytes)
lddqu 36(%rsi), %xmm0
movdqu %xmm0, 36(%rdi)
-L(bwd_write_36bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_36bytes)
lddqu 20(%rsi), %xmm0
movdqu %xmm0, 20(%rdi)
-L(bwd_write_20bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_20bytes)
lddqu 4(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 4(%rdi)
@@ -2727,34 +2727,34 @@ L(bwd_write_20bytes):
ret
.p2align 4
-L(bwd_write_4bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_4bytes)
mov (%rsi), %edx
mov %edx, (%rdi)
ret
.p2align 4
-L(bwd_write_131bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_131bytes)
lddqu 115(%rsi), %xmm0
movdqu %xmm0, 115(%rdi)
-L(bwd_write_115bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_115bytes)
lddqu 99(%rsi), %xmm0
movdqu %xmm0, 99(%rdi)
-L(bwd_write_99bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_99bytes)
lddqu 83(%rsi), %xmm0
movdqu %xmm0, 83(%rdi)
-L(bwd_write_83bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_83bytes)
lddqu 67(%rsi), %xmm0
movdqu %xmm0, 67(%rdi)
-L(bwd_write_67bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_67bytes)
lddqu 51(%rsi), %xmm0
movdqu %xmm0, 51(%rdi)
-L(bwd_write_51bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_51bytes)
lddqu 35(%rsi), %xmm0
movdqu %xmm0, 35(%rdi)
-L(bwd_write_35bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_35bytes)
lddqu 19(%rsi), %xmm0
movdqu %xmm0, 19(%rdi)
-L(bwd_write_19bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_19bytes)
lddqu 3(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 3(%rdi)
@@ -2762,7 +2762,7 @@ L(bwd_write_19bytes):
ret
.p2align 4
-L(bwd_write_3bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_3bytes)
mov 1(%rsi), %dx
mov (%rsi), %cx
mov %dx, 1(%rdi)
@@ -2770,28 +2770,28 @@ L(bwd_write_3bytes):
ret
.p2align 4
-L(bwd_write_130bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_130bytes)
lddqu 114(%rsi), %xmm0
movdqu %xmm0, 114(%rdi)
-L(bwd_write_114bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_114bytes)
lddqu 98(%rsi), %xmm0
movdqu %xmm0, 98(%rdi)
-L(bwd_write_98bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_98bytes)
lddqu 82(%rsi), %xmm0
movdqu %xmm0, 82(%rdi)
-L(bwd_write_82bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_82bytes)
lddqu 66(%rsi), %xmm0
movdqu %xmm0, 66(%rdi)
-L(bwd_write_66bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_66bytes)
lddqu 50(%rsi), %xmm0
movdqu %xmm0, 50(%rdi)
-L(bwd_write_50bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_50bytes)
lddqu 34(%rsi), %xmm0
movdqu %xmm0, 34(%rdi)
-L(bwd_write_34bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_34bytes)
lddqu 18(%rsi), %xmm0
movdqu %xmm0, 18(%rdi)
-L(bwd_write_18bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_18bytes)
lddqu 2(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 2(%rdi)
@@ -2799,34 +2799,34 @@ L(bwd_write_18bytes):
ret
.p2align 4
-L(bwd_write_2bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_2bytes)
movzwl (%rsi), %edx
mov %dx, (%rdi)
ret
.p2align 4
-L(bwd_write_129bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_129bytes)
lddqu 113(%rsi), %xmm0
movdqu %xmm0, 113(%rdi)
-L(bwd_write_113bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_113bytes)
lddqu 97(%rsi), %xmm0
movdqu %xmm0, 97(%rdi)
-L(bwd_write_97bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_97bytes)
lddqu 81(%rsi), %xmm0
movdqu %xmm0, 81(%rdi)
-L(bwd_write_81bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_81bytes)
lddqu 65(%rsi), %xmm0
movdqu %xmm0, 65(%rdi)
-L(bwd_write_65bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_65bytes)
lddqu 49(%rsi), %xmm0
movdqu %xmm0, 49(%rdi)
-L(bwd_write_49bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_49bytes)
lddqu 33(%rsi), %xmm0
movdqu %xmm0, 33(%rdi)
-L(bwd_write_33bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_33bytes)
lddqu 17(%rsi), %xmm0
movdqu %xmm0, 17(%rdi)
-L(bwd_write_17bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_17bytes)
lddqu 1(%rsi), %xmm0
lddqu (%rsi), %xmm1
movdqu %xmm0, 1(%rdi)
@@ -2834,7 +2834,7 @@ L(bwd_write_17bytes):
ret
.p2align 4
-L(bwd_write_1bytes):
+INDIRECT_JUMP_ENTRY(bwd_write_1bytes)
movzbl (%rsi), %edx
mov %dl, (%rdi)
ret
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=406ed83ebfc0d46e1c3306c3498465a1c5f46bb5
commit 406ed83ebfc0d46e1c3306c3498465a1c5f46bb5
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 10:52:38 2018 -0800
x86-64: Use INDIRECT_JUMP_ENTRY in strcmp-sse42.S
* sysdeps/x86_64/multiarch/strcmp-sse42.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/x86_64/multiarch/strcmp-sse42.S b/sysdeps/x86_64/multiarch/strcmp-sse42.S
index 6fa0c2c..b4f5612 100644
--- a/sysdeps/x86_64/multiarch/strcmp-sse42.S
+++ b/sysdeps/x86_64/multiarch/strcmp-sse42.S
@@ -372,7 +372,7 @@ LABEL(ashr_0_exit_use):
* n(15) n -15 0(15 +(n-15) - n) ashr_1
*/
.p2align 4
-LABEL(ashr_1):
+INDIRECT_JUMP_ENTRY(ashr_1)
pslldq $15, D(%xmm2) /* shift first string to align with second */
TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, D(%xmm2) /* compare 16 bytes for equality */
@@ -1172,7 +1172,7 @@ LABEL(nibble_ashr_9_use):
* n(6~15) n - 6 9(15 +(n - 6) - n) ashr_10
*/
.p2align 4
-LABEL(ashr_10):
+INDIRECT_JUMP_ENTRY(ashr_10)
pslldq $6, D(%xmm2)
TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, D(%xmm2)
@@ -1261,7 +1261,7 @@ LABEL(nibble_ashr_10_use):
* n(5~15) n - 5 10(15 +(n - 5) - n) ashr_11
*/
.p2align 4
-LABEL(ashr_11):
+INDIRECT_JUMP_ENTRY(ashr_11)
pslldq $5, D(%xmm2)
TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, D(%xmm2)
@@ -1350,7 +1350,7 @@ LABEL(nibble_ashr_11_use):
* n(4~15) n - 4 11(15 +(n - 4) - n) ashr_12
*/
.p2align 4
-LABEL(ashr_12):
+INDIRECT_JUMP_ENTRY(ashr_12)
pslldq $4, D(%xmm2)
TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, D(%xmm2)
@@ -1439,7 +1439,7 @@ LABEL(nibble_ashr_12_use):
* n(3~15) n - 3 12(15 +(n - 3) - n) ashr_13
*/
.p2align 4
-LABEL(ashr_13):
+INDIRECT_JUMP_ENTRY(ashr_13)
pslldq $3, D(%xmm2)
TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, D(%xmm2)
@@ -1529,7 +1529,7 @@ LABEL(nibble_ashr_13_use):
* n(2~15) n - 2 13(15 +(n - 2) - n) ashr_14
*/
.p2align 4
-LABEL(ashr_14):
+INDIRECT_JUMP_ENTRY(ashr_14)
pslldq $2, D(%xmm2)
TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, D(%xmm2)
@@ -1619,7 +1619,7 @@ LABEL(nibble_ashr_14_use):
* n(1~15) n - 1 14(15 +(n - 1) - n) ashr_15
*/
.p2align 4
-LABEL(ashr_15):
+INDIRECT_JUMP_ENTRY(ashr_15)
pslldq $1, D(%xmm2)
TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, D(%xmm2)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32596da395c7ad054ed744b9d723e2b0d616f86c
commit 32596da395c7ad054ed744b9d723e2b0d616f86c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 10:50:56 2018 -0800
x86-64: Use INDIRECT_JUMP_ENTRY in strcpy-sse2-unaligned.S
* sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Use
INDIRECT_JUMP_ENTRY with indirect jump targets to add _CET_ENDBR.
diff --git a/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S b/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S
index 56b748e..53be78d 100644
--- a/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S
+++ b/sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S
@@ -530,7 +530,7 @@ L(CopyFrom1To16BytesTail1Case2OrCase3):
/*------------End labels regarding with copying 1-16 bytes--and 1-32 bytes----*/
.p2align 4
-L(Exit1):
+INDIRECT_JUMP_ENTRY(Exit1)
mov %dh, (%rdi)
# ifdef USE_AS_STPCPY
lea (%rdi), %rax
@@ -543,7 +543,7 @@ L(Exit1):
ret
.p2align 4
-L(Exit2):
+INDIRECT_JUMP_ENTRY(Exit2)
mov (%rsi), %dx
mov %dx, (%rdi)
# ifdef USE_AS_STPCPY
@@ -557,7 +557,7 @@ L(Exit2):
ret
.p2align 4
-L(Exit3):
+INDIRECT_JUMP_ENTRY(Exit3)
mov (%rsi), %cx
mov %cx, (%rdi)
mov %dh, 2(%rdi)
@@ -572,7 +572,7 @@ L(Exit3):
ret
.p2align 4
-L(Exit4):
+INDIRECT_JUMP_ENTRY(Exit4)
mov (%rsi), %edx
mov %edx, (%rdi)
# ifdef USE_AS_STPCPY
@@ -586,7 +586,7 @@ L(Exit4):
ret
.p2align 4
-L(Exit5):
+INDIRECT_JUMP_ENTRY(Exit5)
mov (%rsi), %ecx
mov %dh, 4(%rdi)
mov %ecx, (%rdi)
@@ -601,7 +601,7 @@ L(Exit5):
ret
.p2align 4
-L(Exit6):
+INDIRECT_JUMP_ENTRY(Exit6)
mov (%rsi), %ecx
mov 4(%rsi), %dx
mov %ecx, (%rdi)
@@ -617,7 +617,7 @@ L(Exit6):
ret
.p2align 4
-L(Exit7):
+INDIRECT_JUMP_ENTRY(Exit7)
mov (%rsi), %ecx
mov 3(%rsi), %edx
mov %ecx, (%rdi)
@@ -633,7 +633,7 @@ L(Exit7):
ret
.p2align 4
-L(Exit8):
+INDIRECT_JUMP_ENTRY(Exit8)
mov (%rsi), %rdx
mov %rdx, (%rdi)
# ifdef USE_AS_STPCPY
@@ -647,7 +647,7 @@ L(Exit8):
ret
.p2align 4
-L(Exit9):
+INDIRECT_JUMP_ENTRY(Exit9)
mov (%rsi), %rcx
mov %dh, 8(%rdi)
mov %rcx, (%rdi)
@@ -662,7 +662,7 @@ L(Exit9):
ret
.p2align 4
-L(Exit10):
+INDIRECT_JUMP_ENTRY(Exit10)
mov (%rsi), %rcx
mov 8(%rsi), %dx
mov %rcx, (%rdi)
@@ -678,7 +678,7 @@ L(Exit10):
ret
.p2align 4
-L(Exit11):
+INDIRECT_JUMP_ENTRY(Exit11)
mov (%rsi), %rcx
mov 7(%rsi), %edx
mov %rcx, (%rdi)
@@ -694,7 +694,7 @@ L(Exit11):
ret
.p2align 4
-L(Exit12):
+INDIRECT_JUMP_ENTRY(Exit12)
mov (%rsi), %rcx
mov 8(%rsi), %edx
mov %rcx, (%rdi)
@@ -710,7 +710,7 @@ L(Exit12):
ret
.p2align 4
-L(Exit13):
+INDIRECT_JUMP_ENTRY(Exit13)
mov (%rsi), %rcx
mov 5(%rsi), %rdx
mov %rcx, (%rdi)
@@ -726,7 +726,7 @@ L(Exit13):
ret
.p2align 4
-L(Exit14):
+INDIRECT_JUMP_ENTRY(Exit14)
mov (%rsi), %rcx
mov 6(%rsi), %rdx
mov %rcx, (%rdi)
@@ -742,7 +742,7 @@ L(Exit14):
ret
.p2align 4
-L(Exit15):
+INDIRECT_JUMP_ENTRY(Exit15)
mov (%rsi), %rcx
mov 7(%rsi), %rdx
mov %rcx, (%rdi)
@@ -758,7 +758,7 @@ L(Exit15):
ret
.p2align 4
-L(Exit16):
+INDIRECT_JUMP_ENTRY(Exit16)
movdqu (%rsi), %xmm0
movdqu %xmm0, (%rdi)
# ifdef USE_AS_STPCPY
@@ -772,7 +772,7 @@ L(Exit16):
ret
.p2align 4
-L(Exit17):
+INDIRECT_JUMP_ENTRY(Exit17)
movdqu (%rsi), %xmm0
movdqu %xmm0, (%rdi)
mov %dh, 16(%rdi)
@@ -787,7 +787,7 @@ L(Exit17):
ret
.p2align 4
-L(Exit18):
+INDIRECT_JUMP_ENTRY(Exit18)
movdqu (%rsi), %xmm0
mov 16(%rsi), %cx
movdqu %xmm0, (%rdi)
@@ -803,7 +803,7 @@ L(Exit18):
ret
.p2align 4
-L(Exit19):
+INDIRECT_JUMP_ENTRY(Exit19)
movdqu (%rsi), %xmm0
mov 15(%rsi), %ecx
movdqu %xmm0, (%rdi)
@@ -819,7 +819,7 @@ L(Exit19):
ret
.p2align 4
-L(Exit20):
+INDIRECT_JUMP_ENTRY(Exit20)
movdqu (%rsi), %xmm0
mov 16(%rsi), %ecx
movdqu %xmm0, (%rdi)
@@ -835,7 +835,7 @@ L(Exit20):
ret
.p2align 4
-L(Exit21):
+INDIRECT_JUMP_ENTRY(Exit21)
movdqu (%rsi), %xmm0
mov 16(%rsi), %ecx
movdqu %xmm0, (%rdi)
@@ -852,7 +852,7 @@ L(Exit21):
ret
.p2align 4
-L(Exit22):
+INDIRECT_JUMP_ENTRY(Exit22)
movdqu (%rsi), %xmm0
mov 14(%rsi), %rcx
movdqu %xmm0, (%rdi)
@@ -868,7 +868,7 @@ L(Exit22):
ret
.p2align 4
-L(Exit23):
+INDIRECT_JUMP_ENTRY(Exit23)
movdqu (%rsi), %xmm0
mov 15(%rsi), %rcx
movdqu %xmm0, (%rdi)
@@ -884,7 +884,7 @@ L(Exit23):
ret
.p2align 4
-L(Exit24):
+INDIRECT_JUMP_ENTRY(Exit24)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rcx
movdqu %xmm0, (%rdi)
@@ -900,7 +900,7 @@ L(Exit24):
ret
.p2align 4
-L(Exit25):
+INDIRECT_JUMP_ENTRY(Exit25)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rcx
movdqu %xmm0, (%rdi)
@@ -917,7 +917,7 @@ L(Exit25):
ret
.p2align 4
-L(Exit26):
+INDIRECT_JUMP_ENTRY(Exit26)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rdx
mov 24(%rsi), %cx
@@ -935,7 +935,7 @@ L(Exit26):
ret
.p2align 4
-L(Exit27):
+INDIRECT_JUMP_ENTRY(Exit27)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rdx
mov 23(%rsi), %ecx
@@ -953,7 +953,7 @@ L(Exit27):
ret
.p2align 4
-L(Exit28):
+INDIRECT_JUMP_ENTRY(Exit28)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rdx
mov 24(%rsi), %ecx
@@ -971,7 +971,7 @@ L(Exit28):
ret
.p2align 4
-L(Exit29):
+INDIRECT_JUMP_ENTRY(Exit29)
movdqu (%rsi), %xmm0
movdqu 13(%rsi), %xmm2
movdqu %xmm0, (%rdi)
@@ -987,7 +987,7 @@ L(Exit29):
ret
.p2align 4
-L(Exit30):
+INDIRECT_JUMP_ENTRY(Exit30)
movdqu (%rsi), %xmm0
movdqu 14(%rsi), %xmm2
movdqu %xmm0, (%rdi)
@@ -1003,7 +1003,7 @@ L(Exit30):
ret
.p2align 4
-L(Exit31):
+INDIRECT_JUMP_ENTRY(Exit31)
movdqu (%rsi), %xmm0
movdqu 15(%rsi), %xmm2
movdqu %xmm0, (%rdi)
@@ -1019,7 +1019,7 @@ L(Exit31):
ret
.p2align 4
-L(Exit32):
+INDIRECT_JUMP_ENTRY(Exit32)
movdqu (%rsi), %xmm0
movdqu 16(%rsi), %xmm2
movdqu %xmm0, (%rdi)
@@ -1037,7 +1037,7 @@ L(Exit32):
# ifdef USE_AS_STRNCPY
.p2align 4
-L(StrncpyExit0):
+INDIRECT_JUMP_ENTRY(StrncpyExit0)
# ifdef USE_AS_STPCPY
mov %rdi, %rax
# endif
@@ -1048,7 +1048,7 @@ L(StrncpyExit0):
ret
.p2align 4
-L(StrncpyExit1):
+INDIRECT_JUMP_ENTRY(StrncpyExit1)
mov (%rsi), %dl
mov %dl, (%rdi)
# ifdef USE_AS_STPCPY
@@ -1061,7 +1061,7 @@ L(StrncpyExit1):
ret
.p2align 4
-L(StrncpyExit2):
+INDIRECT_JUMP_ENTRY(StrncpyExit2)
mov (%rsi), %dx
mov %dx, (%rdi)
# ifdef USE_AS_STPCPY
@@ -1074,7 +1074,7 @@ L(StrncpyExit2):
ret
.p2align 4
-L(StrncpyExit3):
+INDIRECT_JUMP_ENTRY(StrncpyExit3)
mov (%rsi), %cx
mov 2(%rsi), %dl
mov %cx, (%rdi)
@@ -1089,7 +1089,7 @@ L(StrncpyExit3):
ret
.p2align 4
-L(StrncpyExit4):
+INDIRECT_JUMP_ENTRY(StrncpyExit4)
mov (%rsi), %edx
mov %edx, (%rdi)
# ifdef USE_AS_STPCPY
@@ -1102,7 +1102,7 @@ L(StrncpyExit4):
ret
.p2align 4
-L(StrncpyExit5):
+INDIRECT_JUMP_ENTRY(StrncpyExit5)
mov (%rsi), %ecx
mov 4(%rsi), %dl
mov %ecx, (%rdi)
@@ -1117,7 +1117,7 @@ L(StrncpyExit5):
ret
.p2align 4
-L(StrncpyExit6):
+INDIRECT_JUMP_ENTRY(StrncpyExit6)
mov (%rsi), %ecx
mov 4(%rsi), %dx
mov %ecx, (%rdi)
@@ -1132,7 +1132,7 @@ L(StrncpyExit6):
ret
.p2align 4
-L(StrncpyExit7):
+INDIRECT_JUMP_ENTRY(StrncpyExit7)
mov (%rsi), %ecx
mov 3(%rsi), %edx
mov %ecx, (%rdi)
@@ -1147,7 +1147,7 @@ L(StrncpyExit7):
ret
.p2align 4
-L(StrncpyExit8):
+INDIRECT_JUMP_ENTRY(StrncpyExit8)
mov (%rsi), %rdx
mov %rdx, (%rdi)
# ifdef USE_AS_STPCPY
@@ -1160,7 +1160,7 @@ L(StrncpyExit8):
ret
.p2align 4
-L(StrncpyExit9):
+INDIRECT_JUMP_ENTRY(StrncpyExit9)
mov (%rsi), %rcx
mov 8(%rsi), %dl
mov %rcx, (%rdi)
@@ -1175,7 +1175,7 @@ L(StrncpyExit9):
ret
.p2align 4
-L(StrncpyExit10):
+INDIRECT_JUMP_ENTRY(StrncpyExit10)
mov (%rsi), %rcx
mov 8(%rsi), %dx
mov %rcx, (%rdi)
@@ -1190,7 +1190,7 @@ L(StrncpyExit10):
ret
.p2align 4
-L(StrncpyExit11):
+INDIRECT_JUMP_ENTRY(StrncpyExit11)
mov (%rsi), %rcx
mov 7(%rsi), %edx
mov %rcx, (%rdi)
@@ -1205,7 +1205,7 @@ L(StrncpyExit11):
ret
.p2align 4
-L(StrncpyExit12):
+INDIRECT_JUMP_ENTRY(StrncpyExit12)
mov (%rsi), %rcx
mov 8(%rsi), %edx
mov %rcx, (%rdi)
@@ -1220,7 +1220,7 @@ L(StrncpyExit12):
ret
.p2align 4
-L(StrncpyExit13):
+INDIRECT_JUMP_ENTRY(StrncpyExit13)
mov (%rsi), %rcx
mov 5(%rsi), %rdx
mov %rcx, (%rdi)
@@ -1235,7 +1235,7 @@ L(StrncpyExit13):
ret
.p2align 4
-L(StrncpyExit14):
+INDIRECT_JUMP_ENTRY(StrncpyExit14)
mov (%rsi), %rcx
mov 6(%rsi), %rdx
mov %rcx, (%rdi)
@@ -1250,7 +1250,7 @@ L(StrncpyExit14):
ret
.p2align 4
-L(StrncpyExit15):
+INDIRECT_JUMP_ENTRY(StrncpyExit15)
mov (%rsi), %rcx
mov 7(%rsi), %rdx
mov %rcx, (%rdi)
@@ -1265,7 +1265,7 @@ L(StrncpyExit15):
ret
.p2align 4
-L(StrncpyExit16):
+INDIRECT_JUMP_ENTRY(StrncpyExit16)
movdqu (%rsi), %xmm0
movdqu %xmm0, (%rdi)
# ifdef USE_AS_STPCPY
@@ -1278,7 +1278,7 @@ L(StrncpyExit16):
ret
.p2align 4
-L(StrncpyExit17):
+INDIRECT_JUMP_ENTRY(StrncpyExit17)
movdqu (%rsi), %xmm0
mov 16(%rsi), %cl
movdqu %xmm0, (%rdi)
@@ -1293,7 +1293,7 @@ L(StrncpyExit17):
ret
.p2align 4
-L(StrncpyExit18):
+INDIRECT_JUMP_ENTRY(StrncpyExit18)
movdqu (%rsi), %xmm0
mov 16(%rsi), %cx
movdqu %xmm0, (%rdi)
@@ -1308,7 +1308,7 @@ L(StrncpyExit18):
ret
.p2align 4
-L(StrncpyExit19):
+INDIRECT_JUMP_ENTRY(StrncpyExit19)
movdqu (%rsi), %xmm0
mov 15(%rsi), %ecx
movdqu %xmm0, (%rdi)
@@ -1323,7 +1323,7 @@ L(StrncpyExit19):
ret
.p2align 4
-L(StrncpyExit20):
+INDIRECT_JUMP_ENTRY(StrncpyExit20)
movdqu (%rsi), %xmm0
mov 16(%rsi), %ecx
movdqu %xmm0, (%rdi)
@@ -1338,7 +1338,7 @@ L(StrncpyExit20):
ret
.p2align 4
-L(StrncpyExit21):
+INDIRECT_JUMP_ENTRY(StrncpyExit21)
movdqu (%rsi), %xmm0
mov 16(%rsi), %ecx
mov 20(%rsi), %dl
@@ -1355,7 +1355,7 @@ L(StrncpyExit21):
ret
.p2align 4
-L(StrncpyExit22):
+INDIRECT_JUMP_ENTRY(StrncpyExit22)
movdqu (%rsi), %xmm0
mov 14(%rsi), %rcx
movdqu %xmm0, (%rdi)
@@ -1370,7 +1370,7 @@ L(StrncpyExit22):
ret
.p2align 4
-L(StrncpyExit23):
+INDIRECT_JUMP_ENTRY(StrncpyExit23)
movdqu (%rsi), %xmm0
mov 15(%rsi), %rcx
movdqu %xmm0, (%rdi)
@@ -1385,7 +1385,7 @@ L(StrncpyExit23):
ret
.p2align 4
-L(StrncpyExit24):
+INDIRECT_JUMP_ENTRY(StrncpyExit24)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rcx
movdqu %xmm0, (%rdi)
@@ -1400,7 +1400,7 @@ L(StrncpyExit24):
ret
.p2align 4
-L(StrncpyExit25):
+INDIRECT_JUMP_ENTRY(StrncpyExit25)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rdx
mov 24(%rsi), %cl
@@ -1417,7 +1417,7 @@ L(StrncpyExit25):
ret
.p2align 4
-L(StrncpyExit26):
+INDIRECT_JUMP_ENTRY(StrncpyExit26)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rdx
mov 24(%rsi), %cx
@@ -1434,7 +1434,7 @@ L(StrncpyExit26):
ret
.p2align 4
-L(StrncpyExit27):
+INDIRECT_JUMP_ENTRY(StrncpyExit27)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rdx
mov 23(%rsi), %ecx
@@ -1451,7 +1451,7 @@ L(StrncpyExit27):
ret
.p2align 4
-L(StrncpyExit28):
+INDIRECT_JUMP_ENTRY(StrncpyExit28)
movdqu (%rsi), %xmm0
mov 16(%rsi), %rdx
mov 24(%rsi), %ecx
@@ -1468,7 +1468,7 @@ L(StrncpyExit28):
ret
.p2align 4
-L(StrncpyExit29):
+INDIRECT_JUMP_ENTRY(StrncpyExit29)
movdqu (%rsi), %xmm0
movdqu 13(%rsi), %xmm2
movdqu %xmm0, (%rdi)
@@ -1483,7 +1483,7 @@ L(StrncpyExit29):
ret
.p2align 4
-L(StrncpyExit30):
+INDIRECT_JUMP_ENTRY(StrncpyExit30)
movdqu (%rsi), %xmm0
movdqu 14(%rsi), %xmm2
movdqu %xmm0, (%rdi)
@@ -1498,7 +1498,7 @@ L(StrncpyExit30):
ret
.p2align 4
-L(StrncpyExit31):
+INDIRECT_JUMP_ENTRY(StrncpyExit31)
movdqu (%rsi), %xmm0
movdqu 15(%rsi), %xmm2
movdqu %xmm0, (%rdi)
@@ -1513,7 +1513,7 @@ L(StrncpyExit31):
ret
.p2align 4
-L(StrncpyExit32):
+INDIRECT_JUMP_ENTRY(StrncpyExit32)
movdqu (%rsi), %xmm0
movdqu 16(%rsi), %xmm2
movdqu %xmm0, (%rdi)
@@ -1528,7 +1528,7 @@ L(StrncpyExit32):
ret
.p2align 4
-L(StrncpyExit33):
+INDIRECT_JUMP_ENTRY(StrncpyExit33)
movdqu (%rsi), %xmm0
movdqu 16(%rsi), %xmm2
mov 32(%rsi), %cl
@@ -1544,94 +1544,94 @@ L(StrncpyExit33):
# ifndef USE_AS_STRCAT
.p2align 4
-L(Fill0):
+INDIRECT_JUMP_ENTRY(Fill0)
ret
.p2align 4
-L(Fill1):
+INDIRECT_JUMP_ENTRY(Fill1)
mov %dl, (%rdi)
ret
.p2align 4
-L(Fill2):
+INDIRECT_JUMP_ENTRY(Fill2)
mov %dx, (%rdi)
ret
.p2align 4
-L(Fill3):
+INDIRECT_JUMP_ENTRY(Fill3)
mov %edx, -1(%rdi)
ret
.p2align 4
-L(Fill4):
+INDIRECT_JUMP_ENTRY(Fill4)
mov %edx, (%rdi)
ret
.p2align 4
-L(Fill5):
+INDIRECT_JUMP_ENTRY(Fill5)
mov %edx, (%rdi)
mov %dl, 4(%rdi)
ret
.p2align 4
-L(Fill6):
+INDIRECT_JUMP_ENTRY(Fill6)
mov %edx, (%rdi)
mov %dx, 4(%rdi)
ret
.p2align 4
-L(Fill7):
+INDIRECT_JUMP_ENTRY(Fill7)
mov %rdx, -1(%rdi)
ret
.p2align 4
-L(Fill8):
+INDIRECT_JUMP_ENTRY(Fill8)
mov %rdx, (%rdi)
ret
.p2align 4
-L(Fill9):
+INDIRECT_JUMP_ENTRY(Fill9)
mov %rdx, (%rdi)
mov %dl, 8(%rdi)
ret
.p2align 4
-L(Fill10):
+INDIRECT_JUMP_ENTRY(Fill10)
mov %rdx, (%rdi)
mov %dx, 8(%rdi)
ret
.p2align 4
-L(Fill11):
+INDIRECT_JUMP_ENTRY(Fill11)
mov %rdx, (%rdi)
mov %edx, 7(%rdi)
ret
.p2align 4
-L(Fill12):
+INDIRECT_JUMP_ENTRY(Fill12)
mov %rdx, (%rdi)
mov %edx, 8(%rdi)
ret
.p2align 4
-L(Fill13):
+INDIRECT_JUMP_ENTRY(Fill13)
mov %rdx, (%rdi)
mov %rdx, 5(%rdi)
ret
.p2align 4
-L(Fill14):
+INDIRECT_JUMP_ENTRY(Fill14)
mov %rdx, (%rdi)
mov %rdx, 6(%rdi)
ret
.p2align 4
-L(Fill15):
+INDIRECT_JUMP_ENTRY(Fill15)
movdqu %xmm0, -1(%rdi)
ret
.p2align 4
-L(Fill16):
+INDIRECT_JUMP_ENTRY(Fill16)
movdqu %xmm0, (%rdi)
ret
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8bebd1b14c28b21fa63ab754582e27d303e88d27
commit 8bebd1b14c28b21fa63ab754582e27d303e88d27
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jan 9 05:45:42 2018 -0800
x86_64: Use INDIRECT_JUMP_ENTRY in strcmp.S
* sysdeps/x86_64/strcmp.S: Use INDIRECT_JUMP_ENTRY with indirect
jump targets to add _CET_ENDBR.
diff --git a/sysdeps/x86_64/strcmp.S b/sysdeps/x86_64/strcmp.S
index de54fce..03b15e8 100644
--- a/sysdeps/x86_64/strcmp.S
+++ b/sysdeps/x86_64/strcmp.S
@@ -241,7 +241,7 @@ LABEL(bigger):
* n(0~15) n(0~15) 15(15+ n-n) ashr_0
*/
.p2align 4
-LABEL(ashr_0):
+INDIRECT_JUMP_ENTRY(ashr_0)
movdqa (%rsi), %xmm1
pxor %xmm0, %xmm0 /* clear %xmm0 for null char check */
@@ -313,7 +313,7 @@ LABEL(loop_ashr_0):
* n(15) n -15 0(15 +(n-15) - n) ashr_1
*/
.p2align 4
-LABEL(ashr_1):
+INDIRECT_JUMP_ENTRY(ashr_1)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -443,7 +443,7 @@ LABEL(ashr_1_exittail):
* n(14~15) n -14 1(15 +(n-14) - n) ashr_2
*/
.p2align 4
-LABEL(ashr_2):
+INDIRECT_JUMP_ENTRY(ashr_2)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -567,7 +567,7 @@ LABEL(ashr_2_exittail):
* n(13~15) n -13 2(15 +(n-13) - n) ashr_3
*/
.p2align 4
-LABEL(ashr_3):
+INDIRECT_JUMP_ENTRY(ashr_3)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -692,7 +692,7 @@ LABEL(ashr_3_exittail):
* n(12~15) n -12 3(15 +(n-12) - n) ashr_4
*/
.p2align 4
-LABEL(ashr_4):
+INDIRECT_JUMP_ENTRY(ashr_4)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -817,7 +817,7 @@ LABEL(ashr_4_exittail):
* n(11~15) n - 11 4(15 +(n-11) - n) ashr_5
*/
.p2align 4
-LABEL(ashr_5):
+INDIRECT_JUMP_ENTRY(ashr_5)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -942,7 +942,7 @@ LABEL(ashr_5_exittail):
* n(10~15) n - 10 5(15 +(n-10) - n) ashr_6
*/
.p2align 4
-LABEL(ashr_6):
+INDIRECT_JUMP_ENTRY(ashr_6)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -1067,7 +1067,7 @@ LABEL(ashr_6_exittail):
* n(9~15) n - 9 6(15 +(n - 9) - n) ashr_7
*/
.p2align 4
-LABEL(ashr_7):
+INDIRECT_JUMP_ENTRY(ashr_7)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -1192,7 +1192,7 @@ LABEL(ashr_7_exittail):
* n(8~15) n - 8 7(15 +(n - 8) - n) ashr_8
*/
.p2align 4
-LABEL(ashr_8):
+INDIRECT_JUMP_ENTRY(ashr_8)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -1317,7 +1317,7 @@ LABEL(ashr_8_exittail):
* n(7~15) n - 7 8(15 +(n - 7) - n) ashr_9
*/
.p2align 4
-LABEL(ashr_9):
+INDIRECT_JUMP_ENTRY(ashr_9)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -1442,7 +1442,7 @@ LABEL(ashr_9_exittail):
* n(6~15) n - 6 9(15 +(n - 6) - n) ashr_10
*/
.p2align 4
-LABEL(ashr_10):
+INDIRECT_JUMP_ENTRY(ashr_10)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -1567,7 +1567,7 @@ LABEL(ashr_10_exittail):
* n(5~15) n - 5 10(15 +(n - 5) - n) ashr_11
*/
.p2align 4
-LABEL(ashr_11):
+INDIRECT_JUMP_ENTRY(ashr_11)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -1692,7 +1692,7 @@ LABEL(ashr_11_exittail):
* n(4~15) n - 4 11(15 +(n - 4) - n) ashr_12
*/
.p2align 4
-LABEL(ashr_12):
+INDIRECT_JUMP_ENTRY(ashr_12)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -1817,7 +1817,7 @@ LABEL(ashr_12_exittail):
* n(3~15) n - 3 12(15 +(n - 3) - n) ashr_13
*/
.p2align 4
-LABEL(ashr_13):
+INDIRECT_JUMP_ENTRY(ashr_13)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -1942,7 +1942,7 @@ LABEL(ashr_13_exittail):
* n(2~15) n - 2 13(15 +(n - 2) - n) ashr_14
*/
.p2align 4
-LABEL(ashr_14):
+INDIRECT_JUMP_ENTRY(ashr_14)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
@@ -2067,7 +2067,7 @@ LABEL(ashr_14_exittail):
* n(1~15) n - 1 14(15 +(n - 1) - n) ashr_15
*/
.p2align 4
-LABEL(ashr_15):
+INDIRECT_JUMP_ENTRY(ashr_15)
pxor %xmm0, %xmm0
movdqa (%rdi), %xmm2
movdqa (%rsi), %xmm1
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2fd8bd4a3b52e8e7bb4a3e1c451b5e5a3c57e9d9
commit 2fd8bd4a3b52e8e7bb4a3e1c451b5e5a3c57e9d9
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 10:29:44 2018 -0800
x86: Add INDIRECT_JUMP_ENTRY
Add INDIRECT_JUMP_ENTRY to define a label with _CET_ENDBR for indirect
jump target to support IBT.
* sysdeps/x86/sysdep.h (INDIRECT_JUMP_ENTRY): New.
diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h
index 9bc9b00..3929ad4 100644
--- a/sysdeps/x86/sysdep.h
+++ b/sysdeps/x86/sysdep.h
@@ -51,6 +51,10 @@
#define ENTRY_CHK(name) ENTRY (name)
#define END_CHK(name) END (name)
+/* Define a label for indirect jump target. */
+#undef INDIRECT_JUMP_ENTRY
+#define INDIRECT_JUMP_ENTRY(name) L(name): _CET_ENDBR
+
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=774b7ae083de37109db6c538a737ef8da147d27d
commit 774b7ae083de37109db6c538a737ef8da147d27d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jan 8 10:42:34 2018 -0800
x86: Add _CET_ENDBR to functions in dl-tlsdesc.S
Add _CET_ENDBR to functions in dl-tlsdesc.S, which are called indirectly,
to support IBT.
Tested on i686 and x86-64.
* sysdeps/i386/dl-tlsdesc.S (_dl_tlsdesc_return): Add
_CET_ENDBR.
(_dl_tlsdesc_undefweak): Likewise.
(_dl_tlsdesc_dynamic): Likewise.
(_dl_tlsdesc_resolve_abs_plus_addend): Likewise.
(_dl_tlsdesc_resolve_rel): Likewise.
(_dl_tlsdesc_resolve_rela): Likewise.
(_dl_tlsdesc_resolve_hold): Likewise.
* sysdeps/x86_64/dl-tlsdesc.S (_dl_tlsdesc_return): Likewise.
(_dl_tlsdesc_undefweak): Likewise.
(_dl_tlsdesc_dynamic): Likewise.
(_dl_tlsdesc_resolve_rela): Likewise.
(_dl_tlsdesc_resolve_hold): Likewise.
diff --git a/sysdeps/i386/dl-tlsdesc.S b/sysdeps/i386/dl-tlsdesc.S
index 2c4764d..128f0af 100644
--- a/sysdeps/i386/dl-tlsdesc.S
+++ b/sysdeps/i386/dl-tlsdesc.S
@@ -37,6 +37,7 @@
cfi_startproc
.align 16
_dl_tlsdesc_return:
+ _CET_ENDBR
movl 4(%eax), %eax
ret
cfi_endproc
@@ -58,6 +59,7 @@ _dl_tlsdesc_return:
cfi_startproc
.align 16
_dl_tlsdesc_undefweak:
+ _CET_ENDBR
movl 4(%eax), %eax
subl %gs:0, %eax
ret
@@ -99,6 +101,7 @@ _dl_tlsdesc_dynamic (struct tlsdesc *tdp)
cfi_startproc
.align 16
_dl_tlsdesc_dynamic:
+ _CET_ENDBR
/* Like all TLS resolvers, preserve call-clobbered registers.
We need two scratch regs anyway. */
subl $28, %esp
@@ -154,6 +157,7 @@ _dl_tlsdesc_dynamic:
.align 16
_dl_tlsdesc_resolve_abs_plus_addend:
0:
+ _CET_ENDBR
pushl %eax
cfi_adjust_cfa_offset (4)
pushl %ecx
@@ -192,6 +196,7 @@ _dl_tlsdesc_resolve_abs_plus_addend:
.align 16
_dl_tlsdesc_resolve_rel:
0:
+ _CET_ENDBR
pushl %eax
cfi_adjust_cfa_offset (4)
pushl %ecx
@@ -230,6 +235,7 @@ _dl_tlsdesc_resolve_rel:
.align 16
_dl_tlsdesc_resolve_rela:
0:
+ _CET_ENDBR
pushl %eax
cfi_adjust_cfa_offset (4)
pushl %ecx
@@ -268,6 +274,7 @@ _dl_tlsdesc_resolve_rela:
.align 16
_dl_tlsdesc_resolve_hold:
0:
+ _CET_ENDBR
pushl %eax
cfi_adjust_cfa_offset (4)
pushl %ecx
diff --git a/sysdeps/x86_64/dl-tlsdesc.S b/sysdeps/x86_64/dl-tlsdesc.S
index 437bd8c..80d771c 100644
--- a/sysdeps/x86_64/dl-tlsdesc.S
+++ b/sysdeps/x86_64/dl-tlsdesc.S
@@ -37,6 +37,7 @@
cfi_startproc
.align 16
_dl_tlsdesc_return:
+ _CET_ENDBR
movq 8(%rax), %rax
ret
cfi_endproc
@@ -58,6 +59,7 @@ _dl_tlsdesc_return:
cfi_startproc
.align 16
_dl_tlsdesc_undefweak:
+ _CET_ENDBR
movq 8(%rax), %rax
subq %fs:0, %rax
ret
@@ -96,6 +98,7 @@ _dl_tlsdesc_dynamic (register struct tlsdesc *tdp asm ("%rax"))
cfi_startproc
.align 16
_dl_tlsdesc_dynamic:
+ _CET_ENDBR
/* Preserve call-clobbered registers that we modify.
We need two scratch regs anyway. */
movq %rsi, -16(%rsp)
@@ -166,6 +169,7 @@ _dl_tlsdesc_dynamic:
.align 16
/* The PLT entry will have pushed the link_map pointer. */
_dl_tlsdesc_resolve_rela:
+ _CET_ENDBR
cfi_adjust_cfa_offset (8)
/* Save all call-clobbered registers. Add 8 bytes for push in
the PLT entry to align the stack. */
@@ -216,6 +220,7 @@ _dl_tlsdesc_resolve_rela:
.align 16
_dl_tlsdesc_resolve_hold:
0:
+ _CET_ENDBR
/* Save all call-clobbered registers. */
subq $72, %rsp
cfi_adjust_cfa_offset (72)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=71b414a746690a7fc39e7d99027bb5bd4ac9ad69
commit 71b414a746690a7fc39e7d99027bb5bd4ac9ad69
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jun 22 04:15:39 2017 -0700
x86: Support IBT and SHSTK in Intel CET [BZ #21598]
Intel Control-flow Enforcement Technology (CET) instructions:
https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-en
forcement-technology-preview.pdf
includes Indirect Branch Tracking (IBT) and Shadow Stack (SHSTK).
GNU_PROPERTY_X86_FEATURE_1_IBT is added to GNU program property to
indicate that all executable sections are compatible with IBT when
ENDBR instruction starts each valid target where an indirect branch
instruction can land. Linker sets GNU_PROPERTY_X86_FEATURE_1_IBT on
output only if it is set on all relocatable inputs.
On an IBT capable processor, the following steps should be taken:
1. When loading an executable without an interpreter, enable IBT and
lock IBT if GNU_PROPERTY_X86_FEATURE_1_IBT is set on the executable.
2. When loading an executable with an interpreter, enable IBT if
GNU_PROPERTY_X86_FEATURE_1_IBT is set on the interpreter.
a. If GNU_PROPERTY_X86_FEATURE_1_IBT isn't set on the executable,
disable IBT.
b. Lock IBT.
3. If IBT is enabled, when loading a shared object without
GNU_PROPERTY_X86_FEATURE_1_IBT:
a. If legacy interwork is allowed, then mark all pages in executable
PT_LOAD segments in legacy code page bitmap. Failure of legacy code
page bitmap allocation causes an error.
b. If legacy interwork isn't allowed, it causes an error.
GNU_PROPERTY_X86_FEATURE_1_SHSTK is added to GNU program property to
indicate that all executable sections are compatible with SHSTK where
return address popped from shadow stack always matches return address
popped from normal stack. Linker sets GNU_PROPERTY_X86_FEATURE_1_SHSTK
on output only if it is set on all relocatable inputs.
On a SHSTK capable processor, the following steps should be taken:
1. When loading an executable without an interpreter, enable SHSTK if
GNU_PROPERTY_X86_FEATURE_1_SHSTK is set on the executable.
2. When loading an executable with an interpreter, enable SHSTK if
GNU_PROPERTY_X86_FEATURE_1_SHSTK is set on interpreter.
a. If GNU_PROPERTY_X86_FEATURE_1_SHSTK isn't set on the executable
or any shared objects loaded via the DT_NEEDED tag, disable SHSTK.
b. Otherwise lock SHSTK.
3. After SHSTK is enabled, it is an error to load a shared object
without GNU_PROPERTY_X86_FEATURE_1_SHSTK.
To enable CET support in glibc, --enable-cet is required to configure
glibc. When CET is enabled, both compiler and assembler must support
CET. Otherwise, it is a configure-time error.
To support CET run-time control,
1. _dl_x86_feature_1 is added to the writable ld.so namespace to indicate
if IBT or SHSTK are enabled at run-time. It should be initialized by
init_cpu_features.
2. For dynamic executables:
a. A l_cet field is added to struct link_map to indicate if IBT or
SHSTK is enabled in an ELF module. The optional DL_PROCESS_PT_NOTE
is called to process PT_NOTE segment for GNU program property and
set l_cet.
b. _dl_start_user calls _dl_cet_init, instead of _dl_init, which sets
up IBT and SHSTK.
c. DL_OPEN_CHECK is added to check IBT and SHSTK compatibilty when
dlopening a shared object.
3. Replace i386 _dl_runtime_resolve and _dl_runtime_profile with
_dl_runtime_resolve_shstk and _dl_runtime_profile_shstk, respectively if
SHSTK is enabled.
<cet.h> from CET-enabled GCC is automatically included by assembly codes
to add GNU_PROPERTY_X86_FEATURE_1_IBT and GNU_PROPERTY_X86_FEATURE_1_SHSTK
to GNU program property. _CET_ENDBR is added at the entrance of all
assembly functions whose address may be taken.
[BZ #21598]
* config.h.in (ENABLE_CET): New #undef.
* configure.ac: Add --enable-cet.
* configure: Regenerated.
* elf/dl-load.c (filebuf): Moved before "dynamic-link.h".
(_dl_map_object_from_fd): Call DL_PROCESS_PT_NOTE on PT_NOTE
segment if DL_PROCESS_PT_NOTE is defined.
* elf/rtld.c (dl_main): Likewise.
* elf/dl-open.c (dl_open_worker): Call DL_OPEN_CHECK if it is
defined.
* sysdeps/unix/sysv/linux/i386/dl-cet.c: New file.
* sysdeps/unix/sysv/linux/i386/dl-machine.h: Likewise.
* sysdeps/unix/sysv/linux/x86/check-cet.awk: Likewise.
* sysdeps/unix/sysv/linux/x86/configure: Likewise.
* sysdeps/unix/sysv/linux/x86/configure.ac: Likewise.
* sysdeps/unix/sysv/linux/x86/dl-cet.c: Likewise.
* sysdeps/unix/sysv/linux/x86/dl-cet.h: Likewise.
* sysdeps/unix/sysv/linux/x86/dl-procruntime.c: Likewise.
* sysdeps/unix/sysv/linux/x86/ldsodefs.h: Likewise.
* sysdeps/unix/sysv/linux/x86/link_map.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/dl-machine.h: Likewise.
* sysdeps/i386/dl-machine.h (DL_INIT): New.
(_dl_start_user): Replace _dl_init with DL_INIT.
* sysdeps/i386/dl-trampoline.S (_dl_runtime_resolve): Add
_CET_ENDBR.
(_dl_runtime_profile): Likewise.
(_dl_runtime_resolve_shstk): New.
(_dl_runtime_profile_shstk): Likewise.
* sysdeps/unix/sysv/linux/x86/Makefile (sysdep-dl-routines): Add
dl-cet if CET is enabled.
(CFLAGS-.o): Add -fcf-protection -mcet if CET is enabled.
(CFLAGS-.os): Likewise.
(CFLAGS-.op): Likewise.
(CFLAGS-.oS): Likewise.
(asm-CPPFLAGS): Add -fcf-protection -mcet -include cet.h if CET
is enabled.
(tests-special): Add $(objpfx)check-cet.out.
(cet-built-dso): New.
(+$(cet-built-dso:=.note)): Likewise.
(common-generated): Add $(cet-built-dso:$(common-objpfx)%=%.note).
($(objpfx)check-cet.out): New.
(generated): Add check-cet.out.
* sysdeps/x86/sysdep.h (_CET_ENDBR): Define if not defined.
(ENTRY): Add _CET_ENDBR.
* sysdeps/x86_64/dl-machine.h (DL_INIT): New.
(_dl_start_user): Replace _dl_init with DL_INIT.
* sysdeps/x86_64/x32/dl-machine.h (_dl_start_user): Likewise.
* sysdeps/x86_64/dl-trampoline.h (_dl_runtime_resolve): Add
_CET_ENDBR.
(_dl_runtime_profile): Likewise.
diff --git a/config.h.in b/config.h.in
index d928e7d..06f3958 100644
--- a/config.h.in
+++ b/config.h.in
@@ -131,6 +131,10 @@
/* Define if __stack_chk_guard canary should be randomized at program startup. */
#undef ENABLE_STACKGUARD_RANDOMIZE
+/* Define if Intel Control-flow Enforcement Technology (CET) should be
+ enabled. */
+#undef ENABLE_CET
+
/* Package description. */
#undef PKGVERSION
diff --git a/configure b/configure
index 7a8bd3f..f512c40 100755
--- a/configure
+++ b/configure
@@ -788,6 +788,7 @@ enable_nscd
enable_pt_chown
enable_tunables
enable_mathvec
+enable_cet
with_cpu
'
ac_precious_vars='build_alias
@@ -1461,6 +1462,8 @@ Optional Features:
'no' and 'valstring'
--enable-mathvec Enable building and installing mathvec [default
depends on architecture]
+ --enable-cet enable Intel Control-flow Enforcement Technology
+ (CET), x86 only
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -3741,6 +3744,14 @@ else
fi
+# Check whether --enable-cet was given.
+if test "${enable_cet+set}" = set; then :
+ enableval=$enable_cet; enable_cet=$enableval
+else
+ enable_cet=no
+fi
+
+
# We keep the original values in `$config_*' and never modify them, so we
# can write them unchanged into config.make. Everything else uses
# $machine, $vendor, and $os, and changes them whenever convenient.
diff --git a/configure.ac b/configure.ac
index ca1282a..d342227 100644
--- a/configure.ac
+++ b/configure.ac
@@ -453,6 +453,12 @@ AC_ARG_ENABLE([mathvec],
[build_mathvec=$enableval],
[build_mathvec=notset])
+AC_ARG_ENABLE([cet],
+ AC_HELP_STRING([--enable-cet],
+ [enable Intel Control-flow Enforcement Technology (CET), x86 only]),
+ [enable_cet=$enableval],
+ [enable_cet=no])
+
# We keep the original values in `$config_*' and never modify them, so we
# can write them unchanged into config.make. Everything else uses
# $machine, $vendor, and $os, and changes them whenever convenient.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 7554a99..5611005 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -30,6 +30,32 @@
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
+
+/* Type for the buffer we put the ELF header and hopefully the program
+ header. This buffer does not really have to be too large. In most
+ cases the program header follows the ELF header directly. If this
+ is not the case all bets are off and we can make the header
+ arbitrarily large and still won't get it read. This means the only
+ question is how large are the ELF and program header combined. The
+ ELF header 32-bit files is 52 bytes long and in 64-bit files is 64
+ bytes long. Each program header entry is again 32 and 56 bytes
+ long respectively. I.e., even with a file which has 10 program
+ header entries we only have to read 372B/624B respectively. Add to
+ this a bit of margin for program notes and reading 512B and 832B
+ for 32-bit and 64-bit files respecitvely is enough. If this
+ heuristic should really fail for some file the code in
+ `_dl_map_object_from_fd' knows how to recover. */
+struct filebuf
+{
+ ssize_t len;
+#if __WORDSIZE == 32
+# define FILEBUF_SIZE 512
+#else
+# define FILEBUF_SIZE 832
+#endif
+ char buf[FILEBUF_SIZE] __attribute__ ((aligned (__alignof (ElfW(Ehdr)))));
+};
+
#include "dynamic-link.h"
#include <abi-tag.h>
#include <stackinfo.h>
@@ -70,31 +96,6 @@ int __stack_prot attribute_hidden attribute_relro
#endif
-/* Type for the buffer we put the ELF header and hopefully the program
- header. This buffer does not really have to be too large. In most
- cases the program header follows the ELF header directly. If this
- is not the case all bets are off and we can make the header
- arbitrarily large and still won't get it read. This means the only
- question is how large are the ELF and program header combined. The
- ELF header 32-bit files is 52 bytes long and in 64-bit files is 64
- bytes long. Each program header entry is again 32 and 56 bytes
- long respectively. I.e., even with a file which has 10 program
- header entries we only have to read 372B/624B respectively. Add to
- this a bit of margin for program notes and reading 512B and 832B
- for 32-bit and 64-bit files respecitvely is enough. If this
- heuristic should really fail for some file the code in
- `_dl_map_object_from_fd' knows how to recover. */
-struct filebuf
-{
- ssize_t len;
-#if __WORDSIZE == 32
-# define FILEBUF_SIZE 512
-#else
-# define FILEBUF_SIZE 832
-#endif
- char buf[FILEBUF_SIZE] __attribute__ ((aligned (__alignof (ElfW(Ehdr)))));
-};
-
/* This is the decomposed LD_LIBRARY_PATH search path. */
static struct r_search_path_struct env_path_list attribute_relro;
@@ -1096,6 +1097,16 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
l->l_relro_addr = ph->p_vaddr;
l->l_relro_size = ph->p_memsz;
break;
+
+#ifdef DL_PROCESS_PT_NOTE
+ case PT_NOTE:
+ if (DL_PROCESS_PT_NOTE (l, ph, fd, fbp))
+ {
+ errstring = N_("cannot process note segment");
+ goto call_lose;
+ }
+ break;
+#endif
}
if (__glibc_unlikely (nloadcmds == 0))
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 0e37dd7..1ae8b58 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -299,6 +299,10 @@ dl_open_worker (void *a)
_dl_debug_state ();
LIBC_PROBE (map_complete, 3, args->nsid, r, new);
+#ifdef DL_OPEN_CHECK
+ DL_OPEN_CHECK (new);
+#endif
+
/* Print scope information. */
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
_dl_show_scope (new, 0);
diff --git a/elf/rtld.c b/elf/rtld.c
index 453f56e..e43b362 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1241,6 +1241,14 @@ of this helper program; chances are you did not intend to run this program.\n\
main_map->l_relro_addr = ph->p_vaddr;
main_map->l_relro_size = ph->p_memsz;
break;
+
+#ifdef DL_PROCESS_PT_NOTE
+ case PT_NOTE:
+ if (DL_PROCESS_PT_NOTE (main_map, ph))
+ _dl_error_printf ("\
+ERROR: '%s': cannot process note segment.\n", _dl_argv[0]);
+ break;
+#endif
}
/* Adjust the address of the TLS initialization image in case
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 5171499..4ce93f3 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -137,6 +137,10 @@ extern ElfW(Addr) _dl_profile_fixup (struct link_map *l,
where the dynamic linker should not map anything. */
#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
+#ifndef DL_INIT
+# define DL_INIT "_dl_init"
+#endif
+
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
@@ -194,7 +198,7 @@ _dl_start_user:\n\
# Clear %ebp, so that even constructors have terminated backchain.\n\
xorl %ebp, %ebp\n\
# Call the function to run the initializers.\n\
- call _dl_init\n\
+ call " DL_INIT "\n\
# Pass our finalizer function to the user in %edx, as per ELF ABI.\n\
leal _dl_fini@GOTOFF(%ebx), %edx\n\
# Restore %esp _start expects.\n\
diff --git a/sysdeps/i386/dl-trampoline.S b/sysdeps/i386/dl-trampoline.S
index 8bf86f8..6dc0319 100644
--- a/sysdeps/i386/dl-trampoline.S
+++ b/sysdeps/i386/dl-trampoline.S
@@ -32,6 +32,7 @@
.align 16
_dl_runtime_resolve:
cfi_adjust_cfa_offset (8)
+ _CET_ENDBR
pushl %eax # Preserve registers otherwise clobbered.
cfi_adjust_cfa_offset (4)
pushl %ecx
@@ -50,14 +51,85 @@ _dl_runtime_resolve:
cfi_endproc
.size _dl_runtime_resolve, .-_dl_runtime_resolve
+# The SHSTK compatible version.
+ .text
+ .globl _dl_runtime_resolve_shstk
+ .type _dl_runtime_resolve_shstk, @function
+ cfi_startproc
+ .align 16
+_dl_runtime_resolve_shstk:
+ cfi_adjust_cfa_offset (8)
+ _CET_ENDBR
+ pushl %eax # Preserve registers otherwise clobbered.
+ cfi_adjust_cfa_offset (4)
+ pushl %edx
+ cfi_adjust_cfa_offset (4)
+ movl 12(%esp), %edx # Copy args pushed by PLT in register. Note
+ movl 8(%esp), %eax # that `fixup' takes its parameters in regs.
+ call _dl_fixup # Call resolver.
+ movl (%esp), %edx # Get register content back.
+ movl %eax, %ecx # Store the function address.
+ movl 4(%esp), %eax # Get register content back.
+ addl $16, %esp # Adjust stack: PLT1 + PLT2 + %eax + %edx
+ cfi_adjust_cfa_offset (-16)
+ jmp *%ecx # Jump to function address.
+ cfi_endproc
+ .size _dl_runtime_resolve_shstk, .-_dl_runtime_resolve_shstk
#ifndef PROF
+# The SHSTK compatible version.
+ .globl _dl_runtime_profile_shstk
+ .type _dl_runtime_profile_shstk, @function
+ cfi_startproc
+ .align 16
+_dl_runtime_profile_shstk:
+ cfi_adjust_cfa_offset (8)
+ _CET_ENDBR
+ pushl %esp
+ cfi_adjust_cfa_offset (4)
+ addl $8, (%esp) # Account for the pushed PLT data
+ pushl %ebp
+ cfi_adjust_cfa_offset (4)
+ pushl %eax # Preserve registers otherwise clobbered.
+ cfi_adjust_cfa_offset (4)
+ pushl %ecx
+ cfi_adjust_cfa_offset (4)
+ pushl %edx
+ cfi_adjust_cfa_offset (4)
+ movl %esp, %ecx
+ subl $8, %esp
+ cfi_adjust_cfa_offset (8)
+ movl $-1, 4(%esp)
+ leal 4(%esp), %edx
+ movl %edx, (%esp)
+ pushl %ecx # Address of the register structure
+ cfi_adjust_cfa_offset (4)
+ movl 40(%esp), %ecx # Load return address
+ movl 36(%esp), %edx # Copy args pushed by PLT in register. Note
+ movl 32(%esp), %eax # that `fixup' takes its parameters in regs.
+ call _dl_profile_fixup # Call resolver.
+ cfi_adjust_cfa_offset (-8)
+ movl (%esp), %edx
+ testl %edx, %edx
+ jns 1f
+ movl 4(%esp), %edx # Get register content back.
+ movl %eax, %ecx # Store the function address.
+ movl 12(%esp), %eax # Get register content back.
+ # Adjust stack: PLT1 + PLT2 + %esp + %ebp + %eax + %ecx + %edx
+ # + free.
+ addl $32, %esp
+ cfi_adjust_cfa_offset (-32)
+ jmp *%ecx # Jump to function address.
+ cfi_endproc
+ .size _dl_runtime_profile_shstk, .-_dl_runtime_profile_shstk
+
.globl _dl_runtime_profile
.type _dl_runtime_profile, @function
cfi_startproc
.align 16
_dl_runtime_profile:
cfi_adjust_cfa_offset (8)
+ _CET_ENDBR
pushl %esp
cfi_adjust_cfa_offset (4)
addl $8, (%esp) # Account for the pushed PLT data
diff --git a/sysdeps/unix/sysv/linux/i386/dl-cet.c b/sysdeps/unix/sysv/linux/i386/dl-cet.c
new file mode 100644
index 0000000..11d9010
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/i386/dl-cet.c
@@ -0,0 +1,66 @@
+/* Linux/i386 CET initializers function.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifdef SHARED
+# define LINKAGE static inline
+# define _dl_cet_init cet_init
+# include <sysdeps/unix/sysv/linux/x86/dl-cet.c>
+# undef _dl_cet_init
+
+void
+_dl_cet_init (struct link_map *main_map, int argc, char **argv, char **env)
+{
+ cet_init (main_map, argc, argv, env);
+
+ if ((GL(dl_x86_feature_1) & GNU_PROPERTY_X86_FEATURE_1_SHSTK))
+ {
+ /* Replace _dl_runtime_resolve and _dl_runtime_profile with
+ _dl_runtime_resolve_shstk and _dl_runtime_profile_shstk,
+ respectively if SHSTK is enabled. */
+ extern void _dl_runtime_resolve (Elf32_Word) attribute_hidden;
+ extern void _dl_runtime_resolve_shstk (Elf32_Word) attribute_hidden;
+ extern void _dl_runtime_profile (Elf32_Word) attribute_hidden;
+ extern void _dl_runtime_profile_shstk (Elf32_Word) attribute_hidden;
+ unsigned int i;
+ struct link_map *l;
+ Elf32_Addr *got;
+
+ if (main_map->l_info[DT_JMPREL])
+ {
+ got = (Elf32_Addr *) D_PTR (main_map, l_info[DT_PLTGOT]);
+ if (got[2] == (Elf32_Addr) &_dl_runtime_resolve)
+ got[2] = (Elf32_Addr) &_dl_runtime_resolve_shstk;
+ else if (got[2] == (Elf32_Addr) &_dl_runtime_profile)
+ got[2] = (Elf32_Addr) &_dl_runtime_profile_shstk;
+ }
+
+ i = main_map->l_searchlist.r_nlist;
+ while (i-- > 0)
+ {
+ l = main_map->l_initfini[i];
+ if (l->l_info[DT_JMPREL])
+ {
+ got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
+ if (got[2] == (Elf32_Addr) &_dl_runtime_resolve)
+ got[2] = (Elf32_Addr) &_dl_runtime_resolve_shstk;
+ else if (got[2] == (Elf32_Addr) &_dl_runtime_profile)
+ got[2] = (Elf32_Addr) &_dl_runtime_profile_shstk;
+ }
+ }
+ }
+}
+#endif
diff --git a/sysdeps/unix/sysv/linux/i386/dl-machine.h b/sysdeps/unix/sysv/linux/i386/dl-machine.h
new file mode 100644
index 0000000..303358f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/i386/dl-machine.h
@@ -0,0 +1,23 @@
+/* Machine-dependent ELF dynamic relocation inline functions.
+ Linux/i386 version.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifdef ENABLE_CET
+# include <sysdeps/unix/sysv/linux/x86/dl-cet.h>
+#endif
+#include <sysdeps/i386/dl-machine.h>
diff --git a/sysdeps/unix/sysv/linux/x86/Makefile b/sysdeps/unix/sysv/linux/x86/Makefile
index 111ff9f..f78ee91 100644
--- a/sysdeps/unix/sysv/linux/x86/Makefile
+++ b/sysdeps/unix/sysv/linux/x86/Makefile
@@ -23,3 +23,45 @@ endif
ifeq ($(subdir),setjmp)
tests += tst-saved_mask-1
endif
+
+ifeq ($(enable-cet),yes)
+ifeq ($(subdir),elf)
+sysdep-dl-routines += dl-cet
+endif
+
+# Add -fcf-protection -mcet to CFLAGS when CET is enabled.
+CFLAGS-.o += -fcf-protection -mcet
+CFLAGS-.os += -fcf-protection -mcet
+CFLAGS-.op += -fcf-protection -mcet
+CFLAGS-.oS += -fcf-protection -mcet
+
+# Compile assembly codes with <cet.h> when CET is enabled.
+asm-CPPFLAGS += -fcf-protection -mcet -include cet.h
+
+ifeq ($(subdir),elf)
+ifeq (yes,$(build-shared))
+tests-special += $(objpfx)check-cet.out
+endif
+
+# FIXME: Can't use all-built-dso in elf/Makefile since this file is
+# processed before elf/Makefile. Duplicate it here.
+cet-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \
+ $(filter-out $(common-objpfx)linkobj/libc.so, \
+ $(sort $(wildcard $(addprefix $(common-objpfx), \
+ */lib*.so \
+ iconvdata/*.so))))
+
+$(cet-built-dso:=.note): %.note: %
+ @rm -f $@T
+ LC_ALL=C $(READELF) -n $< > $@T
+ test -s $@T
+ mv -f $@T $@
+common-generated += $(cet-built-dso:$(common-objpfx)%=%.note)
+
+$(objpfx)check-cet.out: $(..)sysdeps/unix/sysv/linux/x86/check-cet.awk \
+ $(cet-built-dso:=.note)
+ LC_ALL=C $(AWK) -f $^ > $@; \
+ $(evaluate-test)
+generated += check-cet.out
+endif
+endif
diff --git a/sysdeps/unix/sysv/linux/x86/check-cet.awk b/sysdeps/unix/sysv/linux/x86/check-cet.awk
new file mode 100644
index 0000000..a20254b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/check-cet.awk
@@ -0,0 +1,53 @@
+# Verify that all shared objects contain the CET property.
+# Copyright (C) 2017 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+# This awk script expects to get command-line files that are each
+# the output of 'readelf -n' on a single shared object.
+# It exits successfully (0) if all of them contained the CET property.
+# It fails (1) if any didn't contain the CET property
+# It fails (2) if the input did not take the expected form.
+
+BEGIN { result = cet = sanity = 0 }
+
+function check_one(name) {
+ if (!sanity) {
+ print name ": *** input did not look like readelf -n output";
+ result = 2;
+ } else if (cet) {
+ print name ": OK";
+ } else {
+ print name ": *** no CET property found";
+ result = result ? result : 1;
+ }
+
+ cet = sanity = 0;
+}
+
+FILENAME != lastfile {
+ if (lastfile)
+ check_one(lastfile);
+ lastfile = FILENAME;
+}
+
+index ($0, "Displaying notes") != 0 { sanity = 1 }
+index ($0, "IBT") != 0 && index ($0, "SHSTK") != 0 { cet = 1 }
+
+END {
+ check_one(lastfile);
+ exit(result);
+}
diff --git a/sysdeps/unix/sysv/linux/x86/configure b/sysdeps/unix/sysv/linux/x86/configure
new file mode 100644
index 0000000..cd0e1d6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/configure
@@ -0,0 +1,72 @@
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/x86.
+
+if test x"$enable_cet" = xyes; then
+ # Check if CET can be enabled.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CET can be enabled" >&5
+$as_echo_n "checking whether CET can be enabled... " >&6; }
+if ${libc_cv_x86_cet_available+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#if !defined __IBT__ || !defined __SHSTK__
+# error CET isn't available.
+#endif
+EOF
+ if { ac_try='${CC-cc} -c $CFLAGS -fcf-protection -mcet -include cet.h conftest.c 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_x86_cet_available=yes
+ else
+ libc_cv_x86_cet_available=no
+ fi
+ rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_cet_available" >&5
+$as_echo "$libc_cv_x86_cet_available" >&6; }
+ if test $libc_cv_x86_cet_available = yes; then
+ enable_cet=yes
+ else
+ if test x"$enable_cet" = xdefault; then
+ enable_cet=no
+ else
+ as_fn_error $? "$CC doesn't support CET" "$LINENO" 5
+ fi
+ fi
+fi
+if test $enable_cet = yes; then
+ # Check if assembler supports CET.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS supports CET" >&5
+$as_echo_n "checking whether $AS supports CET... " >&6; }
+if ${libc_cv_x86_cet_as+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.s <<EOF
+ incsspd %ecx
+EOF
+ if { ac_try='${CC-cc} -c $CFLAGS conftest.s -o conftest.o 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_x86_cet_as=yes
+ else
+ libc_cv_x86_cet_as=no
+ fi
+ rm -rf conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_cet_as" >&5
+$as_echo "$libc_cv_x86_cet_as" >&6; }
+ if test $libc_cv_x86_cet_as = no; then
+ as_fn_error $? "$AS doesn't support CET" "$LINENO" 5
+ fi
+
+$as_echo "#define ENABLE_CET 1" >>confdefs.h
+
+fi
+config_vars="$config_vars
+enable-cet = $enable_cet"
diff --git a/sysdeps/unix/sysv/linux/x86/configure.ac b/sysdeps/unix/sysv/linux/x86/configure.ac
new file mode 100644
index 0000000..05caed6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/configure.ac
@@ -0,0 +1,48 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/x86.
+
+if test x"$enable_cet" = xyes; then
+ # Check if CET can be enabled.
+ AC_CACHE_CHECK(whether CET can be enabled,
+ libc_cv_x86_cet_available, [dnl
+cat > conftest.c <<EOF
+#if !defined __IBT__ || !defined __SHSTK__
+# error CET isn't available.
+#endif
+EOF
+ if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS -fcf-protection -mcet -include cet.h conftest.c 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_x86_cet_available=yes
+ else
+ libc_cv_x86_cet_available=no
+ fi
+ rm -rf conftest*])
+ if test $libc_cv_x86_cet_available = yes; then
+ enable_cet=yes
+ else
+ if test x"$enable_cet" = xdefault; then
+ enable_cet=no
+ else
+ AC_MSG_ERROR([$CC doesn't support CET])
+ fi
+ fi
+fi
+if test $enable_cet = yes; then
+ # Check if assembler supports CET.
+ AC_CACHE_CHECK(whether $AS supports CET,
+ libc_cv_x86_cet_as, [dnl
+cat > conftest.s <<EOF
+ incsspd %ecx
+EOF
+ if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s -o conftest.o 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_x86_cet_as=yes
+ else
+ libc_cv_x86_cet_as=no
+ fi
+ rm -rf conftest*])
+ if test $libc_cv_x86_cet_as = no; then
+ AC_MSG_ERROR([$AS doesn't support CET])
+ fi
+ AC_DEFINE(ENABLE_CET, 1,
+ [Enable Intel Control-flow Enforcement Technology (CET)])
+fi
+LIBC_CONFIG_VAR([enable-cet], [$enable_cet])
diff --git a/sysdeps/unix/sysv/linux/x86/dl-cet.c b/sysdeps/unix/sysv/linux/x86/dl-cet.c
new file mode 100644
index 0000000..e8b12d0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/dl-cet.c
@@ -0,0 +1,88 @@
+/* Linux/x86 CET initializers function.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifdef SHARED
+# include <ldsodefs.h>
+
+# ifndef LINKAGE
+# define LINKAGE
+# endif
+
+LINKAGE
+void
+_dl_cet_init (struct link_map *main_map, int argc, char **argv, char **env)
+{
+ /* Check if IBT is enabled in executable. */
+ bool enable_ibt
+ = ((GL(dl_x86_feature_1) & GNU_PROPERTY_X86_FEATURE_1_IBT)
+ && (main_map->l_cet & lc_ibt));
+
+ /* Check if SHSTK is enabled in executable. */
+ bool enable_shstk
+ = ((GL(dl_x86_feature_1) & GNU_PROPERTY_X86_FEATURE_1_SHSTK)
+ && (main_map->l_cet & lc_shstk));
+
+ if (enable_ibt || enable_shstk)
+ {
+ unsigned int i;
+ struct link_map *l;
+
+ i = main_map->l_searchlist.r_nlist;
+ while (i-- > 0)
+ {
+ /* Check each shared object to see if IBT and SHSTK are
+ enabled. */
+ l = main_map->l_initfini[i];
+
+ /* Skip CET check for ld.so since ld.so is CET-enabled. */
+ if (l == &GL(dl_rtld_map))
+ continue;
+
+ if (enable_ibt && !(l->l_cet & lc_ibt))
+ {
+ /* If IBT is enabled in executable and IBT isn't enabled in
+ this shard object, put all executable PT_LOAD segments
+ in legacy code page bitmap. */
+
+ /* FIXME: Mark legacy region */
+ }
+
+ /* SHSTK is enabled only if it is enabled in executable as
+ well as all shared objects. */
+ enable_shstk = !!(l->l_cet & lc_shstk);
+
+ /* Stop if both IBT and SHSTCK are disabled. */
+ if (!enable_ibt && !enable_shstk)
+ break;
+ }
+ }
+
+ if (!enable_ibt || !enable_shstk)
+ {
+ /* FIXME: Disable IBT and/or SHSTK. */
+ ;
+ }
+
+ if (enable_ibt || enable_shstk)
+ {
+ /* FIXME: Lock CET if IBT or SHSTK is enabled. */
+ ;
+ }
+
+ _dl_init (main_map, argc, argv, env);
+}
+#endif
diff --git a/sysdeps/unix/sysv/linux/x86/dl-cet.h b/sysdeps/unix/sysv/linux/x86/dl-cet.h
new file mode 100644
index 0000000..5758cdf
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/dl-cet.h
@@ -0,0 +1,125 @@
+/* Linux/x86 CET inline functions.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _dl_cet_h
+#define _dl_cet_h
+
+extern void _dl_cet_init (struct link_map *, int, char **, char **)
+ attribute_hidden;
+
+#define DL_INIT "_dl_cet_init"
+
+#ifdef ElfW
+static inline void __attribute__ ((unused))
+dl_process_cet_property_note (struct link_map *l,
+ const ElfW(Nhdr) *note,
+ const ElfW(Addr) size,
+ const ElfW(Addr) align)
+{
+ /* The NT_GNU_PROPERTY_TYPE_0 note must be aliged to 4 bytes in
+ 32-bit objects and to 8 bytes in 64-bit objects. Skip notes
+ with incorrect alignment. */
+ if (align != (__ELF_NATIVE_CLASS / 8))
+ return;
+
+ const ElfW(Addr) start = (ElfW(Addr)) note;
+
+ while ((ElfW(Addr)) (note + 1) - start < size)
+ {
+ /* Find the NT_GNU_PROPERTY_TYPE_0 note. */
+ if (note->n_namesz == 4
+ && note->n_type == NT_GNU_PROPERTY_TYPE_0
+ && memcmp (note + 1, "GNU", 4) == 0)
+ {
+ /* Check for invalid property. */
+ if (note->n_descsz < 8
+ || (note->n_descsz % sizeof (ElfW(Addr))) != 0)
+ break;
+
+ /* Start and end of property array. */
+ unsigned char *ptr = (unsigned char *) (note + 1) + 4;
+ unsigned char *ptr_end = ptr + note->n_descsz;
+
+ while (1)
+ {
+ unsigned int type = *(unsigned int *) ptr;
+ unsigned int datasz = *(unsigned int *) (ptr + 4);
+
+ ptr += 8;
+ if ((ptr + datasz) > ptr_end)
+ break;
+
+ if (type == GNU_PROPERTY_X86_FEATURE_1_AND
+ && datasz == 4)
+ {
+ unsigned int feature_1 = *(unsigned int *) ptr;
+ if ((feature_1 & GNU_PROPERTY_X86_FEATURE_1_IBT))
+ l->l_cet |= lc_ibt;
+ if ((feature_1 & GNU_PROPERTY_X86_FEATURE_1_SHSTK))
+ l->l_cet |= lc_shstk;
+ break;
+ }
+ }
+ }
+
+ /* NB: Note sections like .note.ABI-tag and .note.gnu.build-id are
+ aligned to 4 bytes in 64-bit ELF objects. */
+ note = ((const void *) note
+ + ELF_NOTE_NEXT_OFFSET (note->n_namesz, note->n_descsz,
+ align));
+ }
+}
+
+# ifdef FILEBUF_SIZE
+# define DL_PROCESS_PT_NOTE(l, ph, fd, fbp) \
+ dl_process_pt_note ((l), (ph), (fd), (fbp))
+
+static inline int __attribute__ ((unused))
+dl_process_pt_note (struct link_map *l, const ElfW(Phdr) *ph,
+ int fd, struct filebuf *fbp)
+{
+ const ElfW(Nhdr) *note;
+ ElfW(Addr) size = ph->p_filesz;
+
+ if (ph->p_offset + size <= (size_t) fbp->len)
+ note = (const void *) (fbp->buf + ph->p_offset);
+ else
+ {
+ note = alloca (size);
+ __lseek (fd, ph->p_offset, SEEK_SET);
+ if (__libc_read (fd, (void *) note, size) != size)
+ return -1;
+ }
+
+ dl_process_cet_property_note (l, note, size, ph->p_align);
+ return 0;
+}
+# else
+# define DL_PROCESS_PT_NOTE(l, ph) dl_process_pt_note ((l), (ph))
+
+static inline int __attribute__ ((unused))
+dl_process_pt_note (struct link_map *l, const ElfW(Phdr) *ph)
+{
+ const ElfW(Nhdr) *note = (const void *) (ph->p_vaddr + l->l_addr);
+ dl_process_cet_property_note (l, note, ph->p_memsz, ph->p_align);
+ return 0;
+}
+# endif
+#endif
+
+#endif /* _dl_cet_h */
diff --git a/sysdeps/unix/sysv/linux/x86/dl-procruntime.c b/sysdeps/unix/sysv/linux/x86/dl-procruntime.c
new file mode 100644
index 0000000..17c3546
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/dl-procruntime.c
@@ -0,0 +1,57 @@
+/* Data for processor runtime information. Linux/x86 version.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* This information must be kept in sync with the _DL_HWCAP_COUNT,
+ HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT definitions in
+ dl-hwcap.h.
+
+ If anything should be added here check whether the size of each string
+ is still ok with the given array size.
+
+ All the #ifdefs in the definitions are quite irritating but
+ necessary if we want to avoid duplicating the information. There
+ are three different modes:
+
+ - PROCINFO_DECL is defined. This means we are only interested in
+ declarations.
+
+ - PROCINFO_DECL is not defined:
+
+ + if SHARED is defined the file is included in an array
+ initializer. The .element = { ... } syntax is needed.
+
+ + if SHARED is not defined a normal array initialization is
+ needed.
+ */
+
+#ifndef PROCINFO_CLASS
+# define PROCINFO_CLASS
+#endif
+
+#if !IS_IN (ldconfig)
+# if !defined PROCINFO_DECL && defined SHARED
+ ._dl_x86_feature_1
+# else
+PROCINFO_CLASS unsigned int _dl_x86_feature_1
+# endif
+# if !defined SHARED || defined PROCINFO_DECL
+;
+# else
+,
+# endif
+#endif
diff --git a/sysdeps/unix/sysv/linux/x86/ldsodefs.h b/sysdeps/unix/sysv/linux/x86/ldsodefs.h
new file mode 100644
index 0000000..0c40edd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/ldsodefs.h
@@ -0,0 +1,60 @@
+/* Run-time dynamic linker data structures for x86 loaded ELF shared objects.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _LDSODEFS_H
+
+/* Get the real definitions. */
+#include_next <ldsodefs.h>
+
+#if defined ENABLE_CET && defined N_ && !IS_IN (ldconfig)
+# include <errno.h>
+
+# define DL_OPEN_CHECK dl_cet_open_check
+
+static inline void __attribute__ ((unused))
+dl_cet_open_check (struct link_map *l)
+{
+ int res;
+
+ /* Check IBT and SHSTK when called from dlopen. */
+ if ((GL(dl_x86_feature_1) & GNU_PROPERTY_X86_FEATURE_1_IBT)
+ && !(l->l_cet & lc_ibt))
+ {
+ /* If IBT is enabled in executable and IBT isn't enabled in
+ this shared object, put all executable PT_LOAD segments in
+ legacy code page bitmap. */
+ /* FIXME: Mark legacy region. */
+ res = -EINVAL;
+ goto cet_check_failure;
+ }
+
+ /* If SHSTK is enabled in executable and SHSTK isn't enabled in
+ this shared object, we can't load this shared object. */
+ if ((GL(dl_x86_feature_1) & GNU_PROPERTY_X86_FEATURE_1_SHSTK)
+ && !(l->l_cet & lc_shstk))
+ {
+ res = -EINVAL;
+
+cet_check_failure:
+ _dl_signal_error (-res, "dlopen", NULL,
+ N_("dl_cet_open_check failed"));
+ }
+}
+#endif
+
+#endif /* ldsodefs.h */
diff --git a/sysdeps/unix/sysv/linux/x86/link_map.h b/sysdeps/unix/sysv/linux/x86/link_map.h
new file mode 100644
index 0000000..86e098e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/link_map.h
@@ -0,0 +1,26 @@
+/* Additional fields in struct link_map. Linux/x86 version.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* If this object is enabled with CET. */
+enum
+ {
+ lc_none = 0, /* Not enabled with CET. */
+ lc_ibt = 1 << 0, /* Enabled with IBT. */
+ lc_shstk = 1 << 1, /* Enabled with STSHK. */
+ lc_ibt_and_shstk = lc_ibt | lc_shstk /* Enabled with both. */
+ } l_cet:2;
diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-machine.h b/sysdeps/unix/sysv/linux/x86_64/dl-machine.h
new file mode 100644
index 0000000..add79e9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/dl-machine.h
@@ -0,0 +1,27 @@
+/* Machine-dependent ELF dynamic relocation inline functions.
+ Linux/x86-64 version.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifdef ENABLE_CET
+# include <sysdeps/unix/sysv/linux/x86/dl-cet.h>
+#endif
+#ifdef __ILP32__
+# include <sysdeps/x86_64/x32/dl-machine.h>
+#else
+# include <sysdeps/x86_64/dl-machine.h>
+#endif
diff --git a/sysdeps/x86/cpu-features.h b/sysdeps/x86/cpu-features.h
index c60c2e4..d4db17a 100644
--- a/sysdeps/x86/cpu-features.h
+++ b/sysdeps/x86/cpu-features.h
@@ -158,6 +158,11 @@ struct cpu_features
extern const struct cpu_features *__get_cpu_features (void)
__attribute__ ((const));
+# ifdef ElfW
+extern void _dl_setup_cet (const ElfW(Phdr) *, size_t, const ElfW(Addr))
+ attribute_hidden;
+# endif
+
# if defined (_LIBC) && !IS_IN (nonlib)
/* Unused for x86. */
# define INIT_ARCH()
diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h
index afcb7cf..9bc9b00 100644
--- a/sysdeps/x86/sysdep.h
+++ b/sysdeps/x86/sysdep.h
@@ -25,6 +25,10 @@
/* Syntactic details of assembler. */
+#ifndef _CET_ENDBR
+# define _CET_ENDBR
+#endif
+
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
@@ -36,6 +40,7 @@
.align ALIGNARG(4); \
C_LABEL(name) \
cfi_startproc; \
+ _CET_ENDBR; \
CALL_MCOUNT
#undef END
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index f525600..50bf379 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -135,6 +135,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
return lazy;
}
+#ifndef DL_INIT
+# define DL_INIT "_dl_init"
+#endif
+
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
@@ -176,7 +180,7 @@ _dl_start_user:\n\
# Clear %rbp to mark outermost frame obviously even for constructors.\n\
xorl %ebp, %ebp\n\
# Call the function to run the initializers.\n\
- call _dl_init\n\
+ call " DL_INIT "\n\
# Pass our finalizer function to the user in %rdx, as per ELF ABI.\n\
leaq _dl_fini(%rip), %rdx\n\
# And make sure %rsp points to argc stored on the stack.\n\
diff --git a/sysdeps/x86_64/dl-trampoline.h b/sysdeps/x86_64/dl-trampoline.h
index 15edf49..e84e6ec 100644
--- a/sysdeps/x86_64/dl-trampoline.h
+++ b/sysdeps/x86_64/dl-trampoline.h
@@ -64,6 +64,7 @@
cfi_startproc
_dl_runtime_resolve:
cfi_adjust_cfa_offset(16) # Incorporate PLT
+ _CET_ENDBR
# if DL_RUNTIME_RESOLVE_REALIGN_STACK
# if LOCAL_STORAGE_AREA != 8
# error LOCAL_STORAGE_AREA must be 8
@@ -168,6 +169,7 @@ _dl_runtime_resolve:
_dl_runtime_profile:
cfi_startproc
cfi_adjust_cfa_offset(16) # Incorporate PLT
+ _CET_ENDBR
/* The La_x86_64_regs data structure pointed to by the
fourth paramater must be VEC_SIZE-byte aligned. This must
be explicitly enforced. We have the set up a dynamically
diff --git a/sysdeps/x86_64/x32/dl-machine.h b/sysdeps/x86_64/x32/dl-machine.h
index 2a61291..be32c44 100644
--- a/sysdeps/x86_64/x32/dl-machine.h
+++ b/sysdeps/x86_64/x32/dl-machine.h
@@ -73,7 +73,7 @@ _dl_start_user:\n\
# Clear %rbp to mark outermost frame obviously even for constructors.\n\
xorl %ebp, %ebp\n\
# Call the function to run the initializers.\n\
- call _dl_init\n\
+ call " DL_INIT "\n\
# Pass our finalizer function to the user in %rdx, as per ELF ABI.\n\
lea _dl_fini(%rip), %edx\n\
# And make sure %rsp points to argc stored on the stack.\n\
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1db1152a5b87dde103083b5f09fdd2d130514745
commit 1db1152a5b87dde103083b5f09fdd2d130514745
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Dec 5 11:58:23 2017 -0800
x86: Support shadow stack pointer in setjmp/longjmp
Save and restore shadow stack pointer in setjmp and longjmp to support
shadow stack in Intel CET. Use feature_1 in tcbhead_t to check if
shadow stack is enabled before saving and restoring shadow stack
pointer so that it works with the old smaller cancel_jmp_buf which
doesn't have space for shadow stack pointer.
2017-12-07 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/i386/__longjmp.S: Include <jmp_buf-ssp.h>. Restore
shadow stack pointer if shadow stack is enabled and
SHADOW_STACK_POINTER_OFFSET is defined.
* sysdeps/i386/bsd-_setjmp.S: Likewise.
* sysdeps/i386/bsd-setjmp.S: Likewise.
* sysdeps/i386/setjmp.S: Likewise.
* sysdeps/x86_64/__longjmp.S: Likewise.
* sysdeps/x86_64/setjmp.S: Likewise.
* sysdeps/unix/sysv/linux/i386/____longjmp_chk.S: Include
shadow stack pointer if shadow stack is enabled.
* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S: Likewise.
* sysdeps/unix/sysv/linux/x86/Makefile (gen-as-const-headers):
Remove jmp_buf-ssp.sym.
* sysdeps/x86/Makefile (gen-as-const-headers): Add
jmp_buf-ssp.sym.
* sysdeps/x86/jmp_buf-ssp.sym: New dummy file.
diff --git a/sysdeps/i386/__longjmp.S b/sysdeps/i386/__longjmp.S
index b38333b..fe38a4d 100644
--- a/sysdeps/i386/__longjmp.S
+++ b/sysdeps/i386/__longjmp.S
@@ -18,6 +18,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
+#include <jmp_buf-ssp.h>
#include <asm-syntax.h>
#include <stap-probe.h>
@@ -26,6 +27,40 @@ ENTRY (__longjmp)
#ifdef PTR_DEMANGLE
movl 4(%esp), %eax /* User's jmp_buf in %eax. */
+# if defined __SHSTK__ && defined SHADOW_STACK_POINTER_OFFSET
+# if IS_IN (libc) && defined SHARED && defined FEATURE_1_OFFSET
+ /* Check if Shadow Stack is enabled. */
+ testl $(1 << 1), %gs:FEATURE_1_OFFSET
+ jz .Lnoadj
+# endif
+ /* Check and adjust the Shadow-Stack-Pointer. */
+ xorl %edx, %edx
+ /* Get the current ssp. */
+ rdsspd %edx
+ /* And compare it with the saved ssp value. */
+ subl SHADOW_STACK_POINTER_OFFSET(%eax), %edx
+ je .Lnoadj
+ /* Count the number of frames to adjust and adjust it
+ with incssp instruction. The instruction can adjust
+ the ssp by [0..255] value only thus use a loop if
+ the number of frames is bigger than 255. */
+ negl %edx
+ shrl $2, %edx
+ /* NB: We saved Shadow-Stack-Pointer of setjmp. Since we are
+ restoring Shadow-Stack-Pointer of setjmp's caller, we
+ need to unwind shadow stack by one more frame. */
+ addl $1, %edx
+ cmpl $255, %edx
+ jbe .Lonetime
+.Loopadj:
+ incsspd %edx
+ subl $255, %edx
+ cmpl $255, %edx
+ ja .Loopadj
+.Lonetime:
+ incsspd %edx
+.Lnoadj:
+# endif
/* Save the return address now. */
movl (JB_PC*4)(%eax), %edx
/* Get the stack pointer. */
@@ -56,6 +91,40 @@ ENTRY (__longjmp)
#else
movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */
movl 8(%esp), %eax /* Second argument is return value. */
+# if defined __SHSTK__ && defined SHADOW_STACK_POINTER_OFFSET
+# if IS_IN (libc) && defined SHARED && defined FEATURE_1_OFFSET
+ /* Check if Shadow Stack is enabled. */
+ testl $(1 << 1), %gs:FEATURE_1_OFFSET
+ jz .Lnoadj
+# endif
+ /* Check and adjust the Shadow-Stack-Pointer. */
+ xorl %edx, %edx
+ /* Get the current ssp. */
+ rdsspd %edx
+ /* And compare it with the saved ssp value. */
+ subl SHADOW_STACK_POINTER_OFFSET(%ecx), %edx
+ je .Lnoadj
+ /* Count the number of frames to adjust and adjust it
+ with incssp instruction. The instruction can adjust
+ the ssp by [0..255] value only thus use a loop if
+ the number of frames is bigger than 255. */
+ negl %edx
+ shrl $2, %edx
+ /* NB: We saved Shadow-Stack-Pointer of setjmp. Since we are
+ restoring Shadow-Stack-Pointer of setjmp's caller, we
+ need to unwind shadow stack by one more frame. */
+ addl $1, %edx
+ cmpl $255, %edx
+ jbe .Lonetime
+.Loopadj:
+ incsspd %edx
+ subl $255, %edx
+ cmpl $255, %edx
+ ja .Loopadj
+.Lonetime:
+ incsspd %edx
+.Lnoadj:
+# endif
/* Save the return address now. */
movl (JB_PC*4)(%ecx), %edx
LIBC_PROBE (longjmp, 3, 4@%ecx, -4@%eax, 4@%edx)
diff --git a/sysdeps/i386/bsd-_setjmp.S b/sysdeps/i386/bsd-_setjmp.S
index a626cc6..aae5205 100644
--- a/sysdeps/i386/bsd-_setjmp.S
+++ b/sysdeps/i386/bsd-_setjmp.S
@@ -22,6 +22,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
+#include <jmp_buf-ssp.h>
#include <stap-probe.h>
#define PARMS 4 /* no space for saved regs */
@@ -51,6 +52,20 @@ ENTRY (_setjmp)
movl %ebp, (JB_BP*4)(%edx) /* Save caller's frame pointer. */
movl %eax, JB_SIZE(%edx) /* No signal mask set. */
+#if defined __SHSTK__ && defined SHADOW_STACK_POINTER_OFFSET
+# if IS_IN (libc) && defined SHARED && defined FEATURE_1_OFFSET
+ /* Check if Shadow Stack is enabled. */
+ testl $(1 << 1), %gs:FEATURE_1_OFFSET
+ jz .Lskip_ssp
+# endif
+ /* Get the current Shadow-Stack-Pointer and save it. */
+ xorl %ecx, %ecx
+ rdsspd %ecx
+ movl %ecx, SHADOW_STACK_POINTER_OFFSET(%edx)
+# if IS_IN (libc) && defined SHARED
+.Lskip_ssp:
+# endif
+#endif
ret
END (_setjmp)
libc_hidden_def (_setjmp)
diff --git a/sysdeps/i386/bsd-setjmp.S b/sysdeps/i386/bsd-setjmp.S
index 2da8b73..3ebe507 100644
--- a/sysdeps/i386/bsd-setjmp.S
+++ b/sysdeps/i386/bsd-setjmp.S
@@ -22,6 +22,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
+#include <jmp_buf-ssp.h>
#include <stap-probe.h>
#define PARMS 4 /* no space for saved regs */
@@ -51,6 +52,20 @@ ENTRY (setjmp)
#endif
movl %ecx, (JB_PC*4)(%eax)
movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */
+#if defined __SHSTK__ && defined SHADOW_STACK_POINTER_OFFSET
+# if IS_IN (libc) && defined SHARED && defined FEATURE_1_OFFSET
+ /* Check if Shadow Stack is enabled. */
+ testl $(1 << 1), %gs:FEATURE_1_OFFSET
+ jz .Lskip_ssp
+# endif
+ /* Get the current Shadow-Stack-Pointer and save it. */
+ xorl %ecx, %ecx
+ rdsspd %ecx
+ movl %ecx, SHADOW_STACK_POINTER_OFFSET(%eax)
+# if IS_IN (libc) && defined SHARED
+.Lskip_ssp:
+# endif
+#endif
/* Call __sigjmp_save. */
pushl $1
diff --git a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S
index 6a08701..2c62748 100644
--- a/sysdeps/i386/setjmp.S
+++ b/sysdeps/i386/setjmp.S
@@ -18,6 +18,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
+#include <jmp_buf-ssp.h>
#include <asm-syntax.h>
#include <stap-probe.h>
@@ -46,6 +47,20 @@ ENTRY (__sigsetjmp)
movl %ecx, (JB_PC*4)(%eax)
movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */
+#if defined __SHSTK__ && defined SHADOW_STACK_POINTER_OFFSET
+# if IS_IN (libc) && defined SHARED && defined FEATURE_1_OFFSET
+ /* Check if Shadow Stack is enabled. */
+ testl $(1 << 1), %gs:FEATURE_1_OFFSET
+ jz .Lskip_ssp
+# endif
+ /* Get the current Shadow-Stack-Pointer and save it. */
+ xorl %ecx, %ecx
+ rdsspd %ecx
+ movl %ecx, SHADOW_STACK_POINTER_OFFSET(%eax)
+# if IS_IN (libc) && defined SHARED
+.Lskip_ssp:
+# endif
+#endif
#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
xorl %eax, %eax
diff --git a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
index 3452433..ceab5ab 100644
--- a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
@@ -17,6 +17,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
+#include <jmp_buf-ssp.h>
#include <asm-syntax.h>
#include <stap-probe.h>
@@ -46,6 +47,40 @@ longjmp_msg:
ENTRY (____longjmp_chk)
movl 4(%esp), %ecx /* User's jmp_buf in %ecx. */
+#ifdef __SHSTK__
+# if IS_IN (libc) && defined SHARED
+ /* Check if Shadow Stack is enabled. */
+ testl $(1 << 1), %gs:FEATURE_1_OFFSET
+ jz .Lnoadj
+# endif
+ /* Check and adjust the Shadow-Stack-Pointer. */
+ xorl %edx, %edx
+ /* Get the current ssp. */
+ rdsspd %edx
+ /* And compare it with the saved ssp value. */
+ subl SHADOW_STACK_POINTER_OFFSET(%ecx), %edx
+ je .Lnoadj
+ /* Count the number of frames to adjust and adjust it
+ with incssp instruction. The instruction can adjust
+ the ssp by [0..255] value only thus use a loop if
+ the number of frames is bigger than 255. */
+ negl %edx
+ shrl $2, %edx
+ /* NB: We saved Shadow-Stack-Pointer of setjmp. Since we are
+ restoring Shadow-Stack-Pointer of setjmp's caller, we
+ need to unwind shadow stack by one more frame. */
+ addl $1, %edx
+ cmpl $255, %edx
+ jbe .Lonetime
+.Loopadj:
+ incsspd %edx
+ subl $255, %edx
+ cmpl $255, %edx
+ ja .Loopadj
+.Lonetime:
+ incsspd %edx
+.Lnoadj:
+#endif
/* Save the return address now. */
movl (JB_PC*4)(%ecx), %edx
/* Get the stack pointer. */
diff --git a/sysdeps/unix/sysv/linux/x86/Makefile b/sysdeps/unix/sysv/linux/x86/Makefile
index c55a43e..111ff9f 100644
--- a/sysdeps/unix/sysv/linux/x86/Makefile
+++ b/sysdeps/unix/sysv/linux/x86/Makefile
@@ -21,6 +21,5 @@ sysdep_routines += dl-vdso
endif
ifeq ($(subdir),setjmp)
-gen-as-const-headers += jmp_buf-ssp.sym
tests += tst-saved_mask-1
endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
index 8a9f2e1..963bee6 100644
--- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
@@ -21,6 +21,7 @@
#include <stap-probe.h>
#include <sigaltstack-offsets.h>
+#include <jmp_buf-ssp.h>
.section .rodata.str1.1,"aMS",@progbits,1
.type longjmp_msg,@object
@@ -105,6 +106,40 @@ ENTRY(____longjmp_chk)
cfi_restore (%rsi)
.Lok:
+#ifdef __SHSTK__
+# if IS_IN (libc) && defined SHARED
+ /* Check if Shadow Stack is enabled. */
+ testl $(1 << 1), %fs:FEATURE_1_OFFSET
+ jz .Lnoadj
+# endif
+ /* Check and adjust the Shadow-Stack-Pointer. */
+ xorq %rax, %rax
+ /* Get the current ssp. */
+ rdsspq %rax
+ /* And compare it with the saved ssp value. */
+ subq SHADOW_STACK_POINTER_OFFSET(%rdi), %rax
+ je .Lnoadj
+ /* Count the number of frames to adjust and adjust it
+ with incssp instruction. The instruction can adjust
+ the ssp by [0..255] value only thus use a loop if
+ the number of frames is bigger than 255. */
+ negq %rax
+ shrq $3, %rax
+ /* NB: We saved Shadow-Stack-Pointer of setjmp. Since we are
+ restoring Shadow-Stack-Pointer of setjmp's caller, we
+ need to unwind shadow stack by one more frame. */
+ addq $1, %rax
+ cmpq $255, %rax
+ jbe .Lonetime
+.Loopadj:
+ incsspq %rax
+ subq $255, %rax
+ cmpq $255, %rax
+ ja .Loopadj
+.Lonetime:
+ incsspq %rax
+.Lnoadj:
+#endif
LIBC_PROBE (longjmp, 3, LP_SIZE@%RDI_LP, -4@%esi, LP_SIZE@%RDX_LP)
/* We add unwind information for the target here. */
cfi_def_cfa(%rdi, 0)
diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile
index 0d0326c..638f12d 100644
--- a/sysdeps/x86/Makefile
+++ b/sysdeps/x86/Makefile
@@ -8,3 +8,7 @@ sysdep-dl-routines += dl-get-cpu-features
tests += tst-get-cpu-features
tests-static += tst-get-cpu-features-static
endif
+
+ifeq ($(subdir),setjmp)
+gen-as-const-headers += jmp_buf-ssp.sym
+endif
diff --git a/sysdeps/x86/jmp_buf-ssp.sym b/sysdeps/x86/jmp_buf-ssp.sym
new file mode 100644
index 0000000..1c643d4
--- /dev/null
+++ b/sysdeps/x86/jmp_buf-ssp.sym
@@ -0,0 +1 @@
+/* FIXME: Define SHADOW_STACK_POINTER_OFFSET to support shadow stack. */
diff --git a/sysdeps/x86_64/__longjmp.S b/sysdeps/x86_64/__longjmp.S
index a487e0e..d1aa889 100644
--- a/sysdeps/x86_64/__longjmp.S
+++ b/sysdeps/x86_64/__longjmp.S
@@ -17,6 +17,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
+#include <jmp_buf-ssp.h>
#include <asm-syntax.h>
#include <stap-probe.h>
@@ -42,6 +43,40 @@ ENTRY(__longjmp)
orq %rax, %r9
# endif
#endif
+#if defined __SHSTK__ && defined SHADOW_STACK_POINTER_OFFSET
+# if IS_IN (libc) && defined SHARED && defined FEATURE_1_OFFSET
+ /* Check if Shadow Stack is enabled. */
+ testl $(1 << 1), %fs:FEATURE_1_OFFSET
+ jz .Lnoadj
+# endif
+ /* Check and adjust the Shadow-Stack-Pointer. */
+ xorl %eax, %eax
+ /* Get the current ssp. */
+ rdsspq %rax
+ /* And compare it with the saved ssp value. */
+ subq SHADOW_STACK_POINTER_OFFSET(%rdi), %rax
+ je .Lnoadj
+ /* Count the number of frames to adjust and adjust it
+ with incssp instruction. The instruction can adjust
+ the ssp by [0..255] value only thus use a loop if
+ the number of frames is bigger than 255. */
+ negq %rax
+ shrq $3, %rax
+ /* NB: We saved Shadow-Stack-Pointer of setjmp. Since we are
+ restoring Shadow-Stack-Pointer of setjmp's caller, we
+ need to unwind shadow stack by one more frame. */
+ addq $1, %rax
+ cmpq $255, %rax
+ jbe .Lonetime
+.Loopadj:
+ incsspq %rax
+ subq $255, %rax
+ cmpq $255, %rax
+ ja .Loopadj
+.Lonetime:
+ incsspq %rax
+.Lnoadj:
+#endif
LIBC_PROBE (longjmp, 3, LP_SIZE@%RDI_LP, -4@%esi, LP_SIZE@%RDX_LP)
/* We add unwind information for the target here. */
cfi_def_cfa(%rdi, 0)
diff --git a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S
index e0a648e..71ca951 100644
--- a/sysdeps/x86_64/setjmp.S
+++ b/sysdeps/x86_64/setjmp.S
@@ -18,6 +18,7 @@
#include <sysdep.h>
#include <jmpbuf-offsets.h>
+#include <jmp_buf-ssp.h>
#include <asm-syntax.h>
#include <stap-probe.h>
@@ -54,6 +55,20 @@ ENTRY (__sigsetjmp)
#endif
movq %rax, (JB_PC*8)(%rdi)
+#if defined __SHSTK__ && defined SHADOW_STACK_POINTER_OFFSET
+# if IS_IN (libc) && defined SHARED && defined FEATURE_1_OFFSET
+ /* Check if Shadow Stack is enabled. */
+ testl $(1 << 1), %fs:FEATURE_1_OFFSET
+ jz .Lskip_ssp
+# endif
+ /* Get the current Shadow-Stack-Pointer and save it. */
+ xorl %eax, %eax
+ rdsspq %rax
+ movq %rax, SHADOW_STACK_POINTER_OFFSET(%rdi)
+# if IS_IN (libc) && defined SHARED
+.Lskip_ssp:
+# endif
+#endif
#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
xorl %eax, %eax
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources