-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaarch64.c
46 lines (42 loc) · 1.56 KB
/
aarch64.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "aarch64.h"
#include "macos/mach-o.h"
#include "linux/elf.h"
#include "aarch64/codegen.h"
#include "aarch64/lower.h"
#include "target.h"
const struct target AARCH64_MACOS_TARGET = {
TARGET_LP_SZ_LP64,
// x0..x30 excluding x18
{
.gp_registers = {.num_volatile = 18,
.num_nonvolatile = 10,
.num_reserved = 2},
.fp_registers =
{
// FIXME: technically v8-15 are volatile top half
// but we don't suppport vectors yet
.num_volatile = 24,
.num_nonvolatile = 8,
.num_reserved = 0},
},
AARCH64_FUNCTION_ALIGNMENT, aarch64_mangle, aarch64_lower, aarch64_codegen,
aarch64_emit, write_macho, objdump_debug_disasm,
aarch64_debug_print_codegen};
const struct target AARCH64_LINUX_TARGET = {
TARGET_LP_SZ_LP64,
// x0..x30 excluding x18
{
.gp_registers = {.num_volatile = 18,
.num_nonvolatile = 10,
.num_reserved = 2},
.fp_registers =
{
// FIXME: technically v8-15 are volatile top half
// but we don't suppport vectors yet
.num_volatile = 24,
.num_nonvolatile = 8,
.num_reserved = 0},
},
AARCH64_FUNCTION_ALIGNMENT, aarch64_mangle, aarch64_lower, aarch64_codegen,
aarch64_emit, write_elf, objdump_debug_disasm,
aarch64_debug_print_codegen};