AgeCommit message (Collapse)Author
2020-10-27resolve: fix copy-paste errorHEADmasterOri Bernstein
2020-10-27readability: '.port=port' isn't helpful, it's just 53Ori Bernstein
2020-10-27cleanup dns: private maxns, skip failed connnectionsOri Bernstein
The previous patches made maxns show up as exported API, when it shouldn't have been. We would also put failed connections into the server list and try to query them.
2020-10-25Let dnsconnect handle IPv6.Frank Smit
2020-10-25Add missing flowinfo to sockaddr_in6 struct.Frank Smit
2020-10-25Query nameservers in parallel.Frank Smit
2020-10-25Use Arch Linux instead of Alpine.Frank Smit
2020-10-25Build script for Alpine Linux.Frank Smit
2020-09-20Fix range checking for numbers.Ori Bernstein
2020-09-20Fix missing type in range tables.Ori Bernstein
2020-09-01infer: fix typo on range checkOri Bernstein
2020-08-30Fix IPv6 parsing.Frank Smit
2001:b88:1202::10 resulted in [32, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] while it should be [32, 1, 11, 136, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]
2020-08-30Type was not applied to pdst.Frank Smit
2020-08-28test/ipparse: put expected and parsed in different buffersOri Bernstein
2020-08-28Fix typoOri Bernstein
2020-08-28copy bytes to a dest buffer.Ori Bernstein
2020-08-11Fix botched mergeOri Bernstein
2020-08-09mergeOri Bernstein
2020-08-09Fix crypto keccak functions with multiple
2020-07-11Fix tests on BSDs and 9front, improve names.abiOri Bernstein
2020-06-24Add tests for abi conformity.S. Gilles
Tests 001 through 003 are specific errors, and 004 through 006 are batches of blanket fuzzing that uncovered at least one error each. The blanket fuzzers test function calls between all combinations of {myrddin, c} and {myrddin, c}, except for c functions calling c functions.
2020-06-24Allow runtest.{rc,sh} to handle subdirectories.S. Gilles
This allows tests consisting of multiple files, including .glue.c files, so we can check calling convention compliance.
2020-06-24Bump abi version.S. Gilles
2020-06-24Return small-aggregate values by the AMD64 abi.S. Gilles
Handling the returned value from a function call is now handled in four ways. - Functions that return void do nothing. - Functions that return in a single register are provided an extra argument by simpcall: the Node to which the return value should be stored. gencall handles moving %rax or %rxmm0d to that node as appropriate. - Functions that return large aggregates are provided an extra argument by simpcall: the address of the Node to which the return value should be stored. This is used as the hidden argument, as previously. - Functions that return small aggregates are also provided the address of the Node for the return value, but this is not used as a hidden argument. Instead, gencall uses this to know where to store the values in the return registers. Since gencall now handles the assignment of the returned value, gencall does not return a Loc *.
2020-06-20Pass small-aggregate arguments by the AMD64 abi.S. Gilles
Generally “aggregate types smaller than two eightbytes, such that each eightbyte is unambiguously integer or floating-point, are passed in registers”. Since things like structs are assumed to be on the stack (for addressing), this leads to inefficiencies in function calls: the code var foo : bar = [ .a = 123, .b = 4.567 ] baz(foo) will store foo on the stack, then load it into registers to call baz, and the prologue of baz will immediately push foo back onto the stack. Ah, well.
2020-06-11Add classification algorithm for small-struct passing.S. Gilles
This is meant to implement section 3.2.3 of the AMD64 abi draft. Types which are meant to inter-operate with C should be passed in ways that C will expect. - uint16, flt32, bool, &c. should map to the obvious things - myrddin structs should map to C structs - myrddin tuples could map to C structs, so are treated as structs with unnamed fields. - myrddin unions that are classified as enums are treated as ints. Slices and (non-enum) unions are always passed on the stack, regardless of size, and therefore do not inter-operate with C. - myrddin slices could map to struct { type *data; size_t len; } transparently. However, this would require a lot of work on the myrddin rt code, and would incur a minor performance penalty in the common case of simply passing a slice as an argument in myrddin-only code. Let's hold off on completely overhauling the rt code until a compelling use case for magical slice arguments appears. - myrddin (non-enum) unions are not mapped to anything right now. They could map to struct { union {...} data; int tag; }, though there are special cases to handle with std.option(@a#).
2020-06-11Factor out the code for placing/retrieving arguments.S. Gilles
2020-06-11Add isaggregate for later use with abi conformity.S. Gilles
2020-06-11Unify alignment for heterogeneous tuples.S. Gilles
This only appears to come into play when trying to match memory layout of tuples with structs, or when accessing deeply nested tuples.
2020-06-10Fix check for dumb moves (thanks sgilles)Ori Bernstein
We need to check if we have reg->reg moves.
2020-05-11add OSX recvfrom, fix UDP announce (thanks Int21h)Ori Bernstein
system call to libsys for OS X and also made a minor edit to announcesock so it would work with UDP.
2020-05-05Merge branch 'master' of git+ssh:// Bernstein
2020-05-05Remove useless codeMura Li
2020-05-05Remove unneeded checkMura Li
2020-05-05Use /**/ instead of //Mura Li
2020-05-05Remove unneeded changeMura Li
2020-05-05Simplify equality computationMura Li
2020-05-05Support or-patterns with wildcard variablesMura Li
2020-05-05Fix missing link of linked listMura Li
2020-05-05Fix wrong order of recursive callsMura Li
Also, improve slightly the error messages.
2020-05-05Support or-patternmural
2020-04-30Allow optional eol after the commas of function parametersMura Li
So we can break long parameters into lines without '\'. For example, ``` const foo = {a : byte[:], \ b : int } ``` becomes ``` const foo = {a : byte[:], b : int } ```
2020-04-28Remove useless codeMura Li
2020-04-23Remove unneeded checkMura Li
2020-04-22Use /**/ instead of //Mura Li
2020-04-22Remove unneeded changeMura Li
2020-04-22Simplify equality computationMura Li
2020-04-22Support or-patterns with wildcard variablesMura Li
2020-04-22Fix missing link of linked listMura Li
2020-04-22Fix wrong order of recursive callsMura Li
Also, improve slightly the error messages.