Files
TheRock/build_tools/third_party/implib/arch/i386/table.S.tpl
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

86 lines
2.0 KiB
Smarty
Vendored

/*
* Copyright 2019-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.section .note.GNU-stack,"",@progbits
.data
.globl _${lib_suffix}_tramp_table
.hidden _${lib_suffix}_tramp_table
.align 4
_${lib_suffix}_tramp_table:
.zero $table_size
.text
.globl _${lib_suffix}_tramp_resolve
.hidden _${lib_suffix}_tramp_resolve
.globl _${lib_suffix}_save_regs_and_resolve
.hidden _${lib_suffix}_save_regs_and_resolve
.type _${lib_suffix}_save_regs_and_resolve, %function
_${lib_suffix}_save_regs_and_resolve:
.cfi_startproc
#define PUSH_REG(reg) pushl %reg ; .cfi_adjust_cfa_offset 4; .cfi_rel_offset reg, 0
#define POP_REG(reg) popl %reg ; .cfi_adjust_cfa_offset -4; .cfi_restore reg
// Slow path which calls dlsym, taken only on first call.
// All registers except EAX are stored to handle arbitrary calling conventions
// (except XMM/x87 regs in hope they are not used in resolving code).
// For Dwarf directives, read https://www.imperialviolet.org/2017/01/18/cfi.html.
.cfi_def_cfa_offset 4 // Return address
PUSH_REG(ebx)
PUSH_REG(ebx)
PUSH_REG(ecx)
PUSH_REG(edx) // 16
PUSH_REG(ebp)
PUSH_REG(edi)
PUSH_REG(esi)
pushfl; .cfi_adjust_cfa_offset 4 // 16
subl $$8, %esp
.cfi_adjust_cfa_offset 8
PUSH_REG(eax)
// TODO: save vector regs
call _${lib_suffix}_tramp_resolve@PLT // Stack will be aligned at 16 in call
addl $$12, %esp
.cfi_adjust_cfa_offset -12
popfl; .cfi_adjust_cfa_offset -4
POP_REG(esi)
POP_REG(edi)
POP_REG(ebp)
POP_REG(edx)
POP_REG(ecx)
POP_REG(ebx)
POP_REG(ebx)
ret
.cfi_endproc
.section .text.__implib.x86.get_pc_thunk.ax,"axG",@progbits,__implib.x86.get_pc_thunk.ax,comdat
.globl __implib.x86.get_pc_thunk.ax
.hidden __implib.x86.get_pc_thunk.ax
.type __implib.x86.get_pc_thunk.ax, %function
__implib.x86.get_pc_thunk.ax:
.cfi_startproc
movl (%esp), %eax
ret
.cfi_endproc