diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2022-08-31 21:29:15 +0200 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-10-03 10:41:26 +0200 |
commit | 79f3673d205617ac567f0566ebf8f450932d9976 (patch) | |
tree | 48ea32843eacd8ac33b4bbcdc975df5d8ab6356c /arm64/targ.c | |
parent | bda9f2833c39ea5f4266dbcb4506ed8895e22d3f (diff) | |
download | roux-79f3673d205617ac567f0566ebf8f450932d9976.tar.gz |
new arm64_apple target
Should make qbe work on apple arm-based hardware.
Diffstat (limited to 'arm64/targ.c')
-rw-r--r-- | arm64/targ.c | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/arm64/targ.c b/arm64/targ.c index 6079236..88c40f1 100644 --- a/arm64/targ.c +++ b/arm64/targ.c @@ -25,25 +25,39 @@ arm64_memargs(int op) return 0; } +#define ARM64_COMMON \ + .gpr0 = R0, \ + .ngpr = NGPR, \ + .fpr0 = V0, \ + .nfpr = NFPR, \ + .rglob = RGLOB, \ + .nrglob = 3, \ + .rsave = arm64_rsave, \ + .nrsave = {NGPS, NFPS}, \ + .retregs = arm64_retregs, \ + .argregs = arm64_argregs, \ + .memargs = arm64_memargs, \ + .isel = arm64_isel, \ + Target T_arm64 = { .name = "arm64", - .gpr0 = R0, - .ngpr = NGPR, - .fpr0 = V0, - .nfpr = NFPR, - .rglob = RGLOB, - .nrglob = 3, - .rsave = arm64_rsave, - .nrsave = {NGPS, NFPS}, - .retregs = arm64_retregs, - .argregs = arm64_argregs, - .memargs = arm64_memargs, .abi0 = elimsb, .abi1 = arm64_abi, - .isel = arm64_isel, .emitfn = arm64_emitfn, .emitfin = elf_emitfin, .asloc = ".L", + ARM64_COMMON +}; + +Target T_arm64_apple = { + .name = "arm64_apple", + .abi0 = apple_extsb, + .abi1 = apple_abi, + .emitfn = apple_emitfn, + .emitfin = macho_emitfin, + .asloc = "L", + .assym = "_", + ARM64_COMMON }; MAKESURE(globals_are_not_arguments, |