aarch64: recognize the new AArch64 target architecture
Now, aarch64 is valid for --architecture on the command-line. Accordingly, the global variable Architecture is set to the new AARCH64 constant. Manual page updated. Register size is configured to 8 bytes.
This commit is contained in:
parent
086cb326b9
commit
0bded017b9
4
cc.c
4
cc.c
|
@ -1,4 +1,5 @@
|
||||||
/* Copyright (C) 2016 Jeremiah Orians
|
/* Copyright (C) 2016 Jeremiah Orians
|
||||||
|
* Copyright (C) 2020 deesix <deesix@tuta.io>
|
||||||
* This file is part of M2-Planet.
|
* This file is part of M2-Planet.
|
||||||
*
|
*
|
||||||
* M2-Planet is free software: you can redistribute it and/or modify
|
* M2-Planet is free software: you can redistribute it and/or modify
|
||||||
|
@ -77,11 +78,12 @@ int main(int argc, char** argv)
|
||||||
else if(match("x86", arch)) Architecture = X86;
|
else if(match("x86", arch)) Architecture = X86;
|
||||||
else if(match("amd64", arch)) Architecture = AMD64;
|
else if(match("amd64", arch)) Architecture = AMD64;
|
||||||
else if(match("armv7l", arch)) Architecture = ARMV7L;
|
else if(match("armv7l", arch)) Architecture = ARMV7L;
|
||||||
|
else if(match("aarch64", arch)) Architecture = AARCH64;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
file_print("Unknown architecture: ", stderr);
|
file_print("Unknown architecture: ", stderr);
|
||||||
file_print(arch, stderr);
|
file_print(arch, stderr);
|
||||||
file_print(" know values are: knight-native, knight-posix, x86, amd64 and armv7l", stderr);
|
file_print(" know values are: knight-native, knight-posix, x86, amd64, armv7l and aarch64", stderr);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
i = i + 2;
|
i = i + 2;
|
||||||
|
|
3
cc.h
3
cc.h
|
@ -1,4 +1,5 @@
|
||||||
/* Copyright (C) 2016 Jeremiah Orians
|
/* Copyright (C) 2016 Jeremiah Orians
|
||||||
|
* Copyright (C) 2020 deesix <deesix@tuta.io>
|
||||||
* This file is part of M2-Planet.
|
* This file is part of M2-Planet.
|
||||||
*
|
*
|
||||||
* M2-Planet is free software: you can redistribute it and/or modify
|
* M2-Planet is free software: you can redistribute it and/or modify
|
||||||
|
@ -36,6 +37,8 @@
|
||||||
#define AMD64 3
|
#define AMD64 3
|
||||||
// CONSTANT ARMV7L 4
|
// CONSTANT ARMV7L 4
|
||||||
#define ARMV7L 4
|
#define ARMV7L 4
|
||||||
|
// CONSTANT AARCH64 5
|
||||||
|
#define AARCH64 5
|
||||||
|
|
||||||
|
|
||||||
char* copy_string(char* target, char* source);
|
char* copy_string(char* target, char* source);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* Copyright (C) 2016 Jeremiah Orians
|
/* Copyright (C) 2016 Jeremiah Orians
|
||||||
|
* Copyright (C) 2020 deesix <deesix@tuta.io>
|
||||||
* This file is part of M2-Planet.
|
* This file is part of M2-Planet.
|
||||||
*
|
*
|
||||||
* M2-Planet is free software: you can redistribute it and/or modify
|
* M2-Planet is free software: you can redistribute it and/or modify
|
||||||
|
@ -26,7 +27,7 @@ void require(int bool, char* error);
|
||||||
/* Initialize default types */
|
/* Initialize default types */
|
||||||
void initialize_types()
|
void initialize_types()
|
||||||
{
|
{
|
||||||
if(AMD64 == Architecture) register_size = 8;
|
if(AMD64 == Architecture || AARCH64 == Architecture) register_size = 8;
|
||||||
else register_size = 4;
|
else register_size = 4;
|
||||||
|
|
||||||
/* Define void */
|
/* Define void */
|
||||||
|
|
|
@ -23,8 +23,8 @@ break), asm, structs (with -> support) gotos (with labels) and return.
|
||||||
With do and for loops, arrays and function pointers as nice extras
|
With do and for loops, arrays and function pointers as nice extras
|
||||||
.br
|
.br
|
||||||
The supported ARCHITECTURES are as follows: knight-native,
|
The supported ARCHITECTURES are as follows: knight-native,
|
||||||
knight-posix, x86, amd64, armv7l.
|
knight-posix, x86, amd64, armv7l, aarch64.
|
||||||
(with planned ports to aarch64, z80 and 6502 planned)
|
(with planned ports to z80 and 6502)
|
||||||
If you fail to specify an architecture, the default of knight-native
|
If you fail to specify an architecture, the default of knight-native
|
||||||
will be used.
|
will be used.
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,10 @@ a0ae067746e7a2b01d33950da1cf640e12c3a70a045ab331ea2025af59dec9af test/results/t
|
||||||
e01b615db5df31392bd1054c45141dcff936b11dfb1cad270edc0aa67653f5a1 test/results/test10-knight-native-binary
|
e01b615db5df31392bd1054c45141dcff936b11dfb1cad270edc0aa67653f5a1 test/results/test10-knight-native-binary
|
||||||
c1b5a2a3cd46c5e95e5540e871c2a916e028684ca80f51c001ef489342e27625 test/results/test10-knight-posix-binary
|
c1b5a2a3cd46c5e95e5540e871c2a916e028684ca80f51c001ef489342e27625 test/results/test10-knight-posix-binary
|
||||||
b3e13d54aab689137628fb9c4487bfd8288f9bd18bef8fe756577c8d2dce1f1f test/results/test10-x86-binary
|
b3e13d54aab689137628fb9c4487bfd8288f9bd18bef8fe756577c8d2dce1f1f test/results/test10-x86-binary
|
||||||
b6d253f059689246224c32c6af850b62d5bc898bfcf82d411d914f68e46f2cc8 test/results/test100-amd64-binary
|
e637a8ed8d30248bc2093e36b58f67018219f27a7b051e6c069ed718b0d625c6 test/results/test100-amd64-binary
|
||||||
821ca37664ae245a3127e2be0ec60fe5a7aef9cf54cf13b70659ccb73ea9ef8c test/results/test100-armv7l-binary
|
c560cecfeb221cf76e24efdfa43cdaad627195f53812c5066cf4bdfddb1e314b test/results/test100-armv7l-binary
|
||||||
1b11bf81a2be91fb85620a801c65243f207edccc7919241e65c2bd05e0d8d813 test/results/test100-knight-posix-binary
|
a516649bb595fbb8906bb30182b1909d9e274208eff36e0ea6203df6ba0dbefd test/results/test100-knight-posix-binary
|
||||||
4cea33c07306fe641a70b4e25572846ba3906f94b00e3282339400288355fe77 test/results/test100-x86-binary
|
e3624643ff747252dd55e4a5165e9d60b3d7126e0edc6515cc2a14775e1b8919 test/results/test100-x86-binary
|
||||||
34e6d535e30ef8826a4ad1a4d08b76cfa370c54595599ad3be784b64c9cd8ec5 test/results/test11-amd64-binary
|
34e6d535e30ef8826a4ad1a4d08b76cfa370c54595599ad3be784b64c9cd8ec5 test/results/test11-amd64-binary
|
||||||
893695e6f300a0fe055fad935a56abd549bba70d1d39c535a680f41bbb73f117 test/results/test11-armv7l-binary
|
893695e6f300a0fe055fad935a56abd549bba70d1d39c535a680f41bbb73f117 test/results/test11-armv7l-binary
|
||||||
7115c4a552eb4b2c1a868ac3dca43be7d040c8e89b7b66851d0522d298429af9 test/results/test11-knight-native-binary
|
7115c4a552eb4b2c1a868ac3dca43be7d040c8e89b7b66851d0522d298429af9 test/results/test11-knight-native-binary
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
6f9fa3b156a89c4e4b52fe51a9792439d168b04d772c1dc99b6065aad512f5e9 test/test100/proof
|
ab19170f335226f182ef2371f91d17de8ea3a9f7316d48eceb8d0e99ec71b165 test/test100/proof
|
||||||
|
|
Loading…
Reference in New Issue