Comment: | Add endbr32 / endbr64 |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | 1.0 |
Files: | files | file ages | folders |
SHA3-256: |
262baf76e7e66bc4e117ee90f8a1db52 |
User & Date: | js on 2024-02-24 20:57:50 |
Other Links: | branch diff | manifest | tags |
2024-02-24
| ||
21:08 | Add bti instructions check-in: d73a388eca user: js tags: 1.0 | |
20:57 | Add endbr32 / endbr64 check-in: 262baf76e7 user: js tags: 1.0 | |
20:50 | Add endbr32 / endbr64 check-in: 75d88e0f6e user: js tags: trunk | |
19:43 | runtime: Fix objc_getClassList not unlocking mutex check-in: 7a33596a17 user: js tags: 1.0 | |
Modified configure.ac from [a7a76345b3] to [ab9ba27d1a].
︙ | |||
839 840 841 842 843 844 845 846 847 848 849 850 851 852 | 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 | + + + + + + + + + + + + + + + + + + + + + + + + + + | ]) ], [ AC_DEFINE(HAVE_VFP2, 1, [Whether we have VFP2 or above]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ;; i?86) AC_MSG_CHECKING(for endbr32) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([], [ __asm__ __volatile__ ("endbr32"); ]) ], [ AC_DEFINE(HAVE_ENDBR32, 1, [Whether we have endbr32]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ;; x86_64) AC_MSG_CHECKING(for endbr64) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([], [ __asm__ __volatile__ ("endbr64"); ]) ], [ AC_DEFINE(HAVE_ENDBR64, 1, [Whether we have endbr64]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ]) ;; esac AC_CHECK_LIB(m, fmod, LIBS="$LIBS -lm") AC_CHECK_LIB(complex, creal, TESTS_LIBS="$TESTS_LIBS -lcomplex") AC_CHECK_FUNCS(strtof truncf) |
︙ |
Modified src/forwarding/apple-forwarding-amd64.S from [875ade227e] to [a6a790786d].
︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + + + + | .quad str_forwardingTargetForSelector_ .section __DATA, __objc_imageinfo, regular, no_dead_strip .long 0, 0 .section __TEXT, __text, regular, pure_instructions _OFForward: #ifdef HAVE_ENDBR64 endbr64 #endif pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0xC0, %rsp /* 16-byte alignment */ movq %rax, -0x8(%rbp) movq %rdi, -0x10(%rbp) |
︙ | |||
100 101 102 103 104 105 106 107 108 109 110 111 112 113 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | + + + + | movq %rbp, %rsp popq %rbp jmp _OFMethodNotFound _OFForward_stret: #ifdef HAVE_ENDBR64 endbr64 #endif pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0xC0, %rsp /* 16-byte alignment */ movq %rax, -0x8(%rbp) movq %rdi, -0x10(%rbp) |
︙ |
Modified src/forwarding/apple-forwarding-x86.S from [73d2321aa7] to [9691a2ccf3].
︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + + + + | .long str_forwardingTargetForSelector_ .section __OBJC, __image_info .long 0, 0 .section __TEXT, __text, regular, pure_instructions _OFForward: #ifdef HAVE_ENDBR32 endbr32 #endif pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp call get_eip |
︙ | |||
77 78 79 80 81 82 83 84 85 86 87 88 89 90 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | + + + + | addl $20, %esp popl %ebx popl %ebp jmp _OFMethodNotFound _OFForward_stret: #ifdef HAVE_ENDBR32 endbr32 #endif pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp call get_eip |
︙ |
Modified src/forwarding/forwarding-amd64-elf.S from [f03a05bc7d] to [51b886f131].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + + + | #include "platform.h" .globl OFForward .globl OFForward_stret .section .text OFForward: #ifdef HAVE_ENDBR64 endbr64 #endif pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0xC0, %rsp /* 16-byte alignment */ movq %rax, -0x8(%rbp) movq %rdi, -0x10(%rbp) |
︙ | |||
103 104 105 106 107 108 109 110 111 112 113 114 115 116 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | + + + + | popq %rbp jmp OFMethodNotFound@PLT .type OFForward, %function .size OFForward, .-OFForward OFForward_stret: #ifdef HAVE_ENDBR64 endbr64 #endif pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0xC0, %rsp /* 16-byte alignment */ movq %rax, -0x8(%rbp) movq %rdi, -0x10(%rbp) |
︙ | |||
190 191 192 193 194 195 196 197 198 199 200 201 202 203 | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | + + + + | popq %rbp jmp OFMethodNotFound_stret@PLT .type OFForward_stret, %function .size OFForward_stret, .-OFForward_stret init: #ifdef HAVE_ENDBR64 endbr64 #endif leaq module(%rip), %rdi jmp __objc_exec_class@PLT #ifdef OF_SOLARIS .section .init_array, "aw" #else .section .ctors, "aw", %progbits |
︙ |
Modified src/forwarding/forwarding-amd64-macho.S from [3777e458cc] to [d1ee87766e].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + + + | #include "platform.h" .globl _OFForward .globl _OFForward_stret .section __TEXT, __text, regular, pure_instructions _OFForward: #ifdef HAVE_ENDBR64 endbr64 #endif pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0xC0, %rsp /* 16-byte alignment */ movq %rax, -0x8(%rbp) movq %rdi, -0x10(%rbp) |
︙ | |||
101 102 103 104 105 106 107 108 109 110 111 112 113 114 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + + + + | movq %rbp, %rsp popq %rbp jmp _OFMethodNotFound _OFForward_stret: #ifdef HAVE_ENDBR64 endbr64 #endif pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0xC0, %rsp /* 16-byte alignment */ movq %rax, -0x8(%rbp) movq %rdi, -0x10(%rbp) |
︙ | |||
186 187 188 189 190 191 192 193 194 195 196 197 198 199 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | + + + + | movq %rbp, %rsp popq %rbp jmp _OFMethodNotFound_stret init: #ifdef HAVE_ENDBR64 endbr64 #endif leaq module(%rip), %rdi jmp ___objc_exec_class .section __DATA, __mod_init_func, mod_init_funcs .quad init .section __TEXT, __cstring, cstring_literals |
︙ |
Modified src/forwarding/forwarding-amd64-win64.S from [fa09f3b47b] to [1c68b17637].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + + + + | #include "config.h" .globl OFForward .globl OFForward_stret .section .text OFForward: #ifdef HAVE_ENDBR64 endbr64 #endif pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0x90, %rsp /* 16-byte alignment */ movq %rax, -0x28(%rbp) movq %rcx, -0x30(%rbp) |
︙ | |||
91 92 93 94 95 96 97 98 99 100 101 102 103 104 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | + + + + | jmp OFMethodNotFound .def OFForward .scl 2 .type 32 .endef OFForward_stret: #ifdef HAVE_ENDBR64 endbr64 #endif pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0x90, %rsp /* 16-byte alignment */ movq %rax, -0x28(%rbp) movq %rcx, -0x30(%rbp) |
︙ | |||
168 169 170 171 172 173 174 175 176 177 178 179 180 181 | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | + + + + | jmp OFMethodNotFound_stret .def OFForward_stret .scl 2 .type 32 .endef init: #ifdef HAVE_ENDBR64 endbr64 #endif leaq module(%rip), %rcx jmp __objc_exec_class .section .ctors, "aw" .quad init .section .rodata |
︙ |
Modified src/forwarding/forwarding-x86-elf.S from [997e1f3107] to [c03caf592c].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + + + | #include "platform.h" .globl OFForward .globl OFForward_stret .section .text OFForward: #ifdef HAVE_ENDBR32 endbr32 #endif pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp call getEIP |
︙ | |||
82 83 84 85 86 87 88 89 90 91 92 93 94 95 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | + + + + | popl %ebp jmp *%eax .type OFForward, %function .size OFForward, .-OFForward OFForward_stret: #ifdef HAVE_ENDBR32 endbr32 #endif pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp call getEIP |
︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | + + + + | popl %ebp jmp *%eax .type OFForward_stret, %function .size OFForward_stret, .-OFForward_stret init: #ifdef HAVE_ENDBR32 endbr32 #endif pushl %ebp movl %esp, %ebp pushl %ebx subl $4, %esp call getEIP |
︙ |
Modified src/forwarding/forwarding-x86-win32.S from [84cf0aee4b] to [c4fe9cb723].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + + + + | #include "config.h" .globl _OFForward .globl _OFForward_stret .section .text _OFForward: #ifdef HAVE_ENDBR32 endbr32 #endif pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp movl 8(%ebp), %eax |
︙ | |||
77 78 79 80 81 82 83 84 85 86 87 88 89 90 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | + + + + | jmp _OFMethodNotFound .def _OFForward .scl 2 .type 32 .endef _OFForward_stret: #ifdef HAVE_ENDBR32 endbr32 #endif pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp movl 12(%ebp), %eax |
︙ | |||
138 139 140 141 142 143 144 145 146 147 148 149 150 151 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | + + + + | jmp _OFMethodNotFound_stret .def _OFForward_stret .scl 2 .type 32 .endef init: #ifdef HAVE_ENDBR32 endbr32 #endif pushl %ebp movl %esp, %ebp pushl %ebx subl $4, %esp movl $module, %eax |
︙ |
Modified src/runtime/lookup-asm/lookup-asm-amd64-elf.S from [ac7f632beb] to [0aa1c677f8].
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + + + | .globl objc_msg_lookup_stret .globl objc_msg_lookup_super .globl objc_msg_lookup_super_stret .section .text .macro GENERATE_LOOKUP name notFound \name: #ifdef HAVE_ENDBR64 endbr64 #endif testq %rdi, %rdi jz returnNilMethod testb $1, %dil jnz .LtaggedPointer_\name movq (%rdi), %r8 |
︙ | |||
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | + + + + | jmp .Lmain_\name .type \name, %function .size \name, .-\name .endm .macro GENERATE_LOOKUP_SUPER name lookup \name: #ifdef HAVE_ENDBR64 endbr64 #endif movq %rdi, %r8 movq (%rdi), %rdi testq %rdi, %rdi jz returnNilMethod movq 8(%r8), %r8 movq 64(%r8), %r8 |
︙ |
Modified src/runtime/lookup-asm/lookup-asm-amd64-win64.S from [d8069cc26e] to [a1a718f0ad].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + + | .globl objc_msg_lookup_stret .globl objc_msg_lookup_super .globl objc_msg_lookup_super_stret .section .text .macro GENERATE_LOOKUP name notFound \name: #ifdef HAVE_ENDBR64 endbr64 #endif testq %rcx, %rcx jz returnNilMethod testb $1, %cl jnz .LtaggedPointer_\name movq (%rcx), %r8 |
︙ | |||
71 72 73 74 75 76 77 78 79 80 81 82 83 84 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | + + + + | .scl 2 .type 32 .endef .endm .macro GENERATE_LOOKUP_SUPER name lookup \name: #ifdef HAVE_ENDBR64 endbr64 #endif movq %rcx, %r8 movq (%rcx), %rcx testq %rcx, %rcx jz returnNilMethod movq 8(%r8), %r8 movq 56(%r8), %r8 |
︙ |
Modified src/runtime/lookup-asm/lookup-asm-x86-elf.S from [0306652587] to [ff64827806].
︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + + + | .globl objc_msg_lookup_stret .globl objc_msg_lookup_super .globl objc_msg_lookup_super_stret .section .text .macro GENERATE_LOOKUP name notFound \name: #ifdef HAVE_ENDBR32 endbr32 #endif movl 4(%esp), %edx testl %edx, %edx jz returnNilMethod testb $1, %dl jnz .LtaggedPointer_\name |
︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | + + + + | jmp .Lmain_\name .type \name, %function .size \name, .-\name .endm .macro GENERATE_LOOKUP_SUPER name lookup \name: #ifdef HAVE_ENDBR32 endbr32 #endif movl 4(%esp), %edx movl (%edx), %eax testl %eax, %eax jz returnNilMethod movl %eax, 4(%esp) mov 4(%edx), %edx |
︙ |
Modified src/runtime/lookup-asm/lookup-asm-x86-win32.S from [0af0ed8322] to [ba2d9c7098].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + + | .globl _objc_msg_lookup_stret .globl _objc_msg_lookup_super .globl _objc_msg_lookup_super_stret .section .text .macro GENERATE_LOOKUP name notFound \name: #ifdef HAVE_ENDBR32 endbr32 #endif movl 4(%esp), %edx testl %edx, %edx jz returnNilMethod testb $1, %dl jnz .LtaggedPointer_\name |
︙ | |||
63 64 65 66 67 68 69 70 71 72 73 74 75 76 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | + + + + | .scl 2 .type 32 .endef .endm .macro GENERATE_LOOKUP_SUPER name lookup \name: #ifdef HAVE_ENDBR32 endbr32 #endif movl 4(%esp), %edx movl (%edx), %eax test %eax, %eax jz returnNilMethod movl %eax, 4(%esp) movl 4(%edx), %edx |
︙ |