Add support for aarch64
This commit is contained in:
parent
1a01a016f2
commit
7a821fcd2c
2 changed files with 34 additions and 0 deletions
|
@ -35,6 +35,9 @@ conf = configuration_data()
|
|||
if os == 'gnu' and arch == 'amd64'
|
||||
ptr_size = 8
|
||||
func_ptr_size = 8
|
||||
elif os == 'gnu' and arch == 'aarch64'
|
||||
ptr_size = 8
|
||||
func_ptr_size = 8
|
||||
endif
|
||||
|
||||
conf.set('POINTER_SIZE', ptr_size)
|
||||
|
|
31
src/dynafunc_aarch64_gnu.S
Normal file
31
src/dynafunc_aarch64_gnu.S
Normal file
|
@ -0,0 +1,31 @@
|
|||
/* Copyright 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, .+12
|
||||
ldr x9, .+16
|
||||
br x9
|
||||
.dword 0xdeadbeefdeadbeef //function parameter
|
||||
.dword 0xbadc0ffee0ddf00d //function pointer
|
||||
g_dynafunc_end:
|
Loading…
Reference in a new issue