35 lines
1.2 KiB
ArmAsm
35 lines
1.2 KiB
ArmAsm
/* Copyright 2020-2022, Michele Santullo
|
|
* This file is part of wrenpp.
|
|
*
|
|
* Wrenpp is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Wrenpp 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 General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with wrenpp. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#as --march=generic64 -o dynafunc.o ~/dev/code/cpp/wrentest/src/dynafunc.asm
|
|
#objcopy -j .text -O binary dynafunc.o dynafunc.bin
|
|
#xxd -i dynafunc.bin
|
|
|
|
.global g_dynafunc
|
|
.global g_dynafunc_end
|
|
|
|
g_dynafunc:
|
|
ldr x0, .+20
|
|
ldr x1, .+24
|
|
ldr x2, .+28
|
|
ldr x9, .+32
|
|
br x9
|
|
.dword 0xdeadbeefdeadbeef //function VM& parameter
|
|
.dword 0x1badb0021badb002 //ModuleAndName parameter, string part
|
|
.dword 0xfee1deadfee1dead //ModuleAndName parameter, data part
|
|
.dword 0xbadc0ffee0ddf00d //function pointer
|
|
g_dynafunc_end:
|