Affix

 view release on metacpan or  search on metacpan

dyncall/CMakeLists.txt  view on Meta::CPAN

include(CheckCCompilerFlag)
check_c_compiler_flag("-fPIC -Werror" COMPILER_HAS_FPIC)


add_custom_target(show-compiler-predefs COMMAND ${CMAKE_C_COMPILER_PREDEFINES_COMMAND})


# compile_asm(TARGET target ASM_FILES file1 [file2 ...] OUTPUT_OBJECTS [variableName])
# CMake does not support the ARM or ARM64 assemblers on Windows when using the
# MSBuild generator.
# credit to dotnet/runtime:
#    https://github.com/dotnet/runtime/blob/e98fb61d8b4bb6687ccddead861d8b140751647b/eng/native/functions.cmake#L173-L207
function(compile_asm)
  set(options "")
  set(oneValueArgs TARGET OUTPUT_OBJECTS)
  set(multiValueArgs ASM_FILES)
  cmake_parse_arguments(COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})

  set (ASSEMBLED_OBJECTS "")

  foreach(ASM_FILE ${COMPILE_ASM_ASM_FILES})

dyncall/doc/disas_examples/x86.plan9call.disas  view on Meta::CPAN

; }
;
; int main()
; {
;   nonleaf_call(0,1,2,3,4,5,6);
;   return 0;
; }



; output from plan9-4th_edition-x86 w/ 8c x.c && 8l -a x.8

001020                        (1) TEXT leaf_call+0(SB),$0
001020    c3                  (3)       RET                         ,

001021                        (5) TEXT nonleaf_call+0(SB),$28
001021    83ec1c              (5)       SUBL                        $28,SP             ; prolog (note, there is no register save area at all)
001024    8b442424            (7)       MOVL                        b+36(FP),AX        ; |
001028    890424              (7)       MOVL                        AX,(SP)            ; |
00102b    8b442428            (7)       MOVL                        c+40(FP),AX        ; |
00102f    89442404            (7)       MOVL                        AX,4(SP)           ; |

dyncall/doc/disas_examples/x86.plan9call.disas  view on Meta::CPAN

; }
;
; int main()
; {
;     nonleaf_call(0, 1, 2, 3, 4, (struct A){5, 6, 7ll}, 8, 9);
;     return 0;
; }



; output from plan9-4th_edition-x86 w/ 8c x.c && 8l -a x.8

001020                        (3)  TEXT    leaf_call+0(SB),$0
001020   c3                   (5)       RET                         ,

001021                        (7)  TEXT    nonleaf_call+0(SB),$148
001021   81ec94000000         (7)       SUBL                        $148,SP            ; prolog (note, there is no register save area at all)
001027   8d842494000000       (10)      LEAL                        l+148(SP),AX       ; |
00102e   89442430             (10)      MOVL                        AX,l+48(SP)        ; |                            loop's write ptr (stored at beginning of char[100] space)
001032   83442430fc           (10)      ADDL                        $-4,l+48(SP)       ; |                              decr loop ptr in memory
001037   8b442430             (10)      MOVL                        l+48(SP),AX        ; |                              ptr -> eax

dyncall/doc/disas_examples/x86.plan9call.disas  view on Meta::CPAN

; }
;
; int main()
; {
;     nonleaf_call(0, 1, (struct A){2, 3, 4.f}, (struct B){5., 6ll}, 7, 8, (struct A){9, 10, 11.f}, (struct B){12., 13ll}, 14, 15);
;     return 0;
; }



; output from plan9-4th_edition-x86 w/ 8c x.c && 8l -a x.8

001020                        (4)       TEXT leaf_call+0(SB),$0
001020 c3                     (6)       RET                         ,

001021                        (8)       TEXT nonleaf_call+0(SB),$184
001021 81ecb8000000           (8)       SUBL                        $184,SP
001027 8d8424b8000000         (11)      LEAL                        l+184(SP),AX
00102e 89442454               (11)      MOVL                        AX,l+84(SP)
001032 83442454fc             (11)      ADDL                        $-4,l+84(SP)
001037 8b442454               (11)      MOVL                        l+84(SP),AX

dyncall/doc/disas_examples/x86.plan9call.disas  view on Meta::CPAN

;     return 7171LL;
; }
;
; int main()
; {
;     return (int)f();
; }



; output from plan9-4th_edition-x86 w/ 8c x.c && 8l -a x.8

001020                  (2)     TEXT f1+0(SB),$0
001020 8b442404         (4)     MOVL                 .ret+4(FP),AX   ; ptr to retval space -> eax
001024 c700031c0000     (4)     MOVL                 $7171,(AX)      ; |
00102a c7400400000000   (4)     MOVL                 $0,4(AX)        ; | return value
001031 c3               (4)     RET                  ,

001032                  (7)     TEXT main+0(SB),$16
001032 83ec10           (7)     SUBL                 $16,SP          ; prolog
001035 8d4c2408         (9)     LEAL                 .safe+8(SP),CX  ; | ptr to space for return value ...

dyncall/doc/disas_examples/x86.plan9call.disas  view on Meta::CPAN

;
; int main()
; {
;     struct Small s = f0();
;     struct Big b = f1();
;     return b.j + s.x;
; }



; output from plan9-4th_edition-x86 w/ 8c x.c && 8l -a x.8

001020                  (5)     TEXT f0+0 (SB),$16
001020 83ec08           (5)     SUBL                $8,SP          ; prolog
001023 c644240484       (7)     MOVB                $-124,s+4(SP)  ; struct data in  local area (s.x)
001028 8b7c240c         (8)     MOVL                .ret+12(FP),DI ; \
00102c 8d742404         (8)     LEAL                s+4(SP),SI     ; |
001030 b901000000       (8)     MOVL                $1,CX          ; | copy struct in local area to return
001035 fc               (8)     CLD                 ,              ; | value (pointed to by implicit first arg)
001036 f3               (8)     REP                 ,              ; |
001037 a5               (8)     MOVSL               ,              ; /

dyncall/doc/manual/dyncall_logo.svg  view on Meta::CPAN

     height="1052.3622px"
     showguides="true"
     inkscape:guide-bbox="true"
     inkscape:zoom="0.39434801"
     inkscape:cx="616.83582"
     inkscape:cy="397.87537"
     inkscape:window-x="186"
     inkscape:window-y="80"
     inkscape:current-layer="g6" />
  <title
     id="title4">generated by pstoedit version:3.45 from dyncall_logo.eps</title>
  <g
     xml:space="preserve"
     id="g6"
     transform="matrix(2.2965446,0,0,2.2965446,-189.23706,135.3048)"
     style="fill:#000000">
<g
   stroke-miterlimit="10"
   id="g8"
   style="fill:#000000;fill-rule:evenodd;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10">
	<path

dyncall/doc/manual/dyncall_watermark.svg  view on Meta::CPAN

<svg
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   version="1.0"
   width="744.09448"
   height="1052.3622"
   id="svg2">
  <defs
     id="defs57" />
  <title
     id="title4">generated by pstoedit version:3.45 from dyncall_logo.eps</title>
  <g
     transform="matrix(2.2965446,0,0,2.2965446,-189.23706,135.3048)"
     id="g6"
     xml:space="preserve"
     style="fill:#000000">

<g
   transform="matrix(0.7802343,0,0,0.7802343,-63.142369,43.042016)"
   id="g20"
   style="fill:#e6e6e6;stroke:#e6e6e6;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10">

dyncall/doc/manual/manual_bindings.tex  view on Meta::CPAN

\sigchar{A} & aggregate (struct, union) by-value \\
\end{tabular*}
\caption{Type signature encoding for function call data types}
\label{sigchar}
\end{center}
\end{table}

Please note that using a \sigchar{(} at the beginning of a signature string is possible,
although not required. The character doesn't have any meaning and will simply be
ignored. However, using it prevents annoying syntax highlighting problems with some code
editors.

\pagebreak

Calling convention modes can be switched using the signature string, as well. A
'\_' in the signature string is followed by a character specifying what
calling convention to use, as this affects how arguments are passed. This makes
only sense if there are multiple co-existing calling conventions on a single platform.
Usually, this is done at the beginning of the string, except in special cases, like
specifying where the varargs part of a variadic function begins.
The following signature characters exist:

dyncall/test/callback_suite/README.txt  view on Meta::CPAN

Callback Test Suite
-------------------


CONFIGURE SUITE

  needs lua: edit config.lua and run "make config".


DESCRIPTION

Generates a set of callback invokers in C using lua as a preprocessor.

The invokers pass random arguments to the callback to test, from a set of
reference values which are argument type- and position-specific.


dyncall/test/ellipsis/README.txt  view on Meta::CPAN

WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.



requirements:
  python (for preprocessing)

configuration:
  edit "nargs" in mkcase.py and run
  
    make distclean 
    make 
    
  on shell.
  

usage:

  ellipsis         	        - run full range

dyncall/test/suite/README.txt  view on Meta::CPAN

MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

requirements:
  python (for preprocessing)

configuration:
  edit "nargs" in mkcase.py and run
  
    make distclean 
    make 
    
  on shell.
  

usage:

  suite         	        - run full range

dyncall/test/suite3/README.txt  view on Meta::CPAN

MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

requirements:
  python (for preprocessing)

configuration:
  edit "nargs" in mkcase.py and run
  
    make distclean 
    make 
    
  on shell.
  

usage:

  suite         	        - run full range

dyncall/test/suite_floats/README.txt  view on Meta::CPAN

MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

requirements:
  python (for preprocessing)

configuration:
  edit "nargs" in mkcase.py and run
  
    make distclean 
    make 
    
  on shell.
  

usage:

  suite_floats         	        - run full range

dyncall/test/suite_x86win32fast/README.txt  view on Meta::CPAN

ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


requirements:
  python (for preprocessing)

configuration:
  edit "nargs" in mkcase.py and run
  
    make distclean 
    make 
    
  on shell.
  

usage:

  suite         	        - run full range

dyncall/test/suite_x86win32std/README.txt  view on Meta::CPAN

MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

requirements:
  python (for preprocessing)

configuration:
  edit "nargs" in mkcase.py and run
  
    make distclean 
    make 
    
  on shell.
  

usage:

  suite         	        - run full range

t/src/85_affix_mangle_rust/Cargo.toml  view on Meta::CPAN

[package]
name = "affix_rust"
version = "0.1.0"
edition = "2021"
authors = ["Sanko Robinson"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

[lib]
crate-type = ["dylib"]
#crate-type = ["cdylib"]



( run in 0.539 second using v1.01-cache-2.11-cpan-de7293f3b23 )