Add support for &global_variable

This commit is contained in:
Jeremiah Orians 2021-01-28 22:22:08 -05:00
parent 2043a574c9
commit c5068b227a
No known key found for this signature in database
GPG Key ID: 6B3A3F198708F894
3 changed files with 14 additions and 14 deletions

View File

@ -399,14 +399,14 @@ void global_load(struct token_list* a)
emit_out("\n");
require(NULL != global_token, "unterminated global load\n");
if(!match("=", global_token->s))
{
if((KNIGHT_POSIX == Architecture) || (KNIGHT_NATIVE == Architecture)) emit_out("LOAD R0 R0 0\n");
else if(X86 == Architecture) emit_out("LOAD_INTEGER\n");
else if(AMD64 == Architecture) emit_out("LOAD_INTEGER\n");
else if(ARMV7L == Architecture) emit_out("!0 R0 LOAD32 R0 MEMORY\n");
else if(AARCH64 == Architecture) emit_out("DEREF_X0\n");
}
if(TRUE == Address_of) return;
if(match("=", global_token->s)) return;
if((KNIGHT_POSIX == Architecture) || (KNIGHT_NATIVE == Architecture)) emit_out("LOAD R0 R0 0\n");
else if(X86 == Architecture) emit_out("LOAD_INTEGER\n");
else if(AMD64 == Architecture) emit_out("LOAD_INTEGER\n");
else if(ARMV7L == Architecture) emit_out("!0 R0 LOAD32 R0 MEMORY\n");
else if(AARCH64 == Architecture) emit_out("DEREF_X0\n");
}
/*

View File

@ -179,8 +179,8 @@ ba2e2e1bbe66fea15d5984678175229fcb0adc6faa394be2cfde8bea1d3026de test/results/t
698853b79efb30865a663c4863c050639eb21c7400008f7840830503928973d4 test/results/test0106-knight-native-binary
44d0b9e0433f12b5567ecddc9285b6a7d41ea646a7134e6fc3c394b4a973f6ba test/results/test0106-knight-posix-binary
1f83e1cbac44aabd9f87eae601e020b584b572e7edb738d6274972d6d100fa3c test/results/test0106-x86-binary
2acc8a2f5317cb809e0d523cb997e8ab91f90ac95881288d874ed9156a3dcfb4 test/results/test1000-aarch64-binary
abac486fb04c067876058e16782f42e202f56cc8a013362e8a57743869f20aac test/results/test1000-amd64-binary
e575170b6ebf2c3c2fd130943f7c3b28c52c77e9c2a65dde13b471f92286f64f test/results/test1000-armv7l-binary
092ff610f2dc8d643545643d7d2a7423c37b8a88c4ffecd0f4df91e2210115a3 test/results/test1000-knight-posix-binary
1893b8088334aa54a06a4c90ff384b9f499684055e6911843651c2f14d8aacb0 test/results/test1000-x86-binary
50366dc84533f1a5f087abfe41995f5c308163ab905595f307b4a01273a27348 test/results/test1000-aarch64-binary
72f71f9ae18ba3f867ce3a2644a400ae6f2cb2138112c252b321094dc253eac3 test/results/test1000-amd64-binary
83a83816fc76d41d6b731d61461d73ff3390860a45218eb3236f7fa3bdf59eb0 test/results/test1000-armv7l-binary
4a3f310fda59dbf364ae80f633b24dd9c2931c573b9a40219a201a9d4f0a02b4 test/results/test1000-knight-posix-binary
ef370c3e31728e5494ac7fcc41c2f9b3f8c83e84b2e60da8a481521ecb4530cb test/results/test1000-x86-binary

View File

@ -1 +1 @@
612c951c26337ca96dfcf50ccf79b9e94e9f3b083500d5897b4b7cdc66acbb6e test/test1000/proof
c7b2fa47fb9d938c5ec08b3d6182495bba14d31e7001345711bb257cd54e2b54 test/test1000/proof