aboutsummaryrefslogtreecommitdiffstats
path: root/sys/test/csource.txt
Commit message (Collapse)AuthorAgeFilesLines
* pkg/csource: enforce the bit size of -1Aleksandr Nogikh2025-04-101-0/+1
| | | | | | | | | | | syscall() is a variadic function, so we need to be careful when passing const values in there without specifying their type. For -1, we did not specify it, and on 64 bit architectures the de facto passed value was 0xFFFFFFFF instead of 0xFFFFFFFFFFFFFFFF. Fix it and add a test. Closes #5921.
* pkg/csource: annotate syscall() args with their pretty-printed valuesFlorent Revest2024-02-011-0/+3
| | | | | | | This factorizes const arguments into the shortest flags OR bitmask possible so they are easy to read. E.g: /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul
* pkg/csource: annotate syscall() args with their namesFlorent Revest2023-06-091-7/+7
| | | | | | | | | This annotates syscall arguments so they are easier to read without having to pull out the syscall's man page. E.g: syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, ... Signed-off-by: Florent Revest <revest@chromium.org>
* pkg/compiler: optimize array[const] representationDmitry Vyukov2021-04-211-2/+3
| | | | | | | | | | | | | | Represent array[const[X, int8], N] as string["XX...X"]. This replaces potentially huge number of: NONFAILING(*(uint8_t*)0x2000126c = 0); NONFAILING(*(uint8_t*)0x2000126d = 0); NONFAILING(*(uint8_t*)0x2000126e = 0); with a single memcpy. In one reproducer we had 3991 such lines. Also replace memcpy's with memset's when possible. Update #1070
* pkg/csource: add resuling source testsDmitry Vyukov2021-04-211-0/+13
Add some tests that verify source we get for various programs. Update #1070