authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-11-10 11:32:10-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2021-11-10 11:32:10-05:00
logb521510cd4e68407226dd95c9e87cc97ca5a0796
treea98e2b155833d3c0f245d7dbca8b0fe6bb52f193
parente89e3735f3faead04e7b2e443a1795213c927ec8
parentd7a5b12f94b0c8c4ee9d28af16b14fcc62bef9e7
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #9853 from koachan/sparc64-unittests

SPARCv9: make more tests pass

3 files changed, 198 insertions(+), 53 deletions(-)

lib/std/Thread.zig+2-3
...@@ -813,12 +813,11 @@ const LinuxThreadImpl = struct {...@@ -813,12 +813,11 @@ const LinuxThreadImpl = struct {
813 \\ # force-deactivate it by running `restore` until813 \\ # force-deactivate it by running `restore` until
814 \\ # all frames are cleared.814 \\ # all frames are cleared.
815 \\ 1:815 \\ 1:
816 \\ cmp %%sp, 0816 \\ cmp %%fp, 0
817 \\ beq 2f817 \\ beq 2f
818 \\ nop818 \\ nop
819 \\ ba 1b
819 \\ restore820 \\ restore
820 \\ ba 1f
821 \\ nop
822 \\ 2:821 \\ 2:
823 \\ mov 73, %%g1822 \\ mov 73, %%g1
824 \\ mov %[ptr], %%o0823 \\ mov %[ptr], %%o0
lib/std/os/linux.zig+195-49
...@@ -2022,8 +2022,8 @@ pub const SOCK = struct {...@@ -2022,8 +2022,8 @@ pub const SOCK = struct {
2022 pub const SEQPACKET = 5;2022 pub const SEQPACKET = 5;
2023 pub const DCCP = 6;2023 pub const DCCP = 6;
2024 pub const PACKET = 10;2024 pub const PACKET = 10;
2025 pub const CLOEXEC = 0o2000000;2025 pub const CLOEXEC = if (is_sparc) 0o20000000 else 0o2000000;
2026 pub const NONBLOCK = if (is_mips) 0o200 else 0o4000;2026 pub const NONBLOCK = if (is_mips) 0o200 else if (is_sparc) 0o40000 else 0o4000;
2027};2027};
20282028
2029pub const TCP = struct {2029pub const TCP = struct {
...@@ -2235,6 +2235,47 @@ pub const SO = struct {...@@ -2235,6 +2235,47 @@ pub const SO = struct {
2235 pub const PEERSEC = 30;2235 pub const PEERSEC = 30;
2236 pub const SNDBUFFORCE = 31;2236 pub const SNDBUFFORCE = 31;
2237 pub const RCVBUFFORCE = 33;2237 pub const RCVBUFFORCE = 33;
2238 pub const SECURITY_AUTHENTICATION = 22;
2239 pub const SECURITY_ENCRYPTION_TRANSPORT = 23;
2240 pub const SECURITY_ENCRYPTION_NETWORK = 24;
2241 pub const BINDTODEVICE = 25;
2242 pub const ATTACH_FILTER = 26;
2243 pub const DETACH_FILTER = 27;
2244 pub const GET_FILTER = ATTACH_FILTER;
2245 pub const PEERNAME = 28;
2246 pub const TIMESTAMP_OLD = 29;
2247 pub const PASSSEC = 34;
2248 pub const TIMESTAMPNS_OLD = 35;
2249 pub const MARK = 36;
2250 pub const TIMESTAMPING_OLD = 37;
2251 pub const RXQ_OVFL = 40;
2252 pub const WIFI_STATUS = 41;
2253 pub const PEEK_OFF = 42;
2254 pub const NOFCS = 43;
2255 pub const LOCK_FILTER = 44;
2256 pub const SELECT_ERR_QUEUE = 45;
2257 pub const BUSY_POLL = 46;
2258 pub const MAX_PACING_RATE = 47;
2259 pub const BPF_EXTENSIONS = 48;
2260 pub const INCOMING_CPU = 49;
2261 pub const ATTACH_BPF = 50;
2262 pub const DETACH_BPF = DETACH_FILTER;
2263 pub const ATTACH_REUSEPORT_CBPF = 51;
2264 pub const ATTACH_REUSEPORT_EBPF = 52;
2265 pub const CNX_ADVICE = 53;
2266 pub const MEMINFO = 55;
2267 pub const INCOMING_NAPI_ID = 56;
2268 pub const COOKIE = 57;
2269 pub const PEERGROUPS = 59;
2270 pub const ZEROCOPY = 60;
2271 pub const TXTIME = 61;
2272 pub const BINDTOIFINDEX = 62;
2273 pub const TIMESTAMP_NEW = 63;
2274 pub const TIMESTAMPNS_NEW = 64;
2275 pub const TIMESTAMPING_NEW = 65;
2276 pub const RCVTIMEO_NEW = 66;
2277 pub const SNDTIMEO_NEW = 67;
2278 pub const DETACH_REUSEPORT_BPF = 68;
2238 } else if (is_ppc or is_ppc64) struct {2279 } else if (is_ppc or is_ppc64) struct {
2239 pub const DEBUG = 1;2280 pub const DEBUG = 1;
2240 pub const REUSEADDR = 2;2281 pub const REUSEADDR = 2;
...@@ -2263,6 +2304,116 @@ pub const SO = struct {...@@ -2263,6 +2304,116 @@ pub const SO = struct {
2263 pub const RCVBUFFORCE = 33;2304 pub const RCVBUFFORCE = 33;
2264 pub const PROTOCOL = 38;2305 pub const PROTOCOL = 38;
2265 pub const DOMAIN = 39;2306 pub const DOMAIN = 39;
2307 pub const SECURITY_AUTHENTICATION = 22;
2308 pub const SECURITY_ENCRYPTION_TRANSPORT = 23;
2309 pub const SECURITY_ENCRYPTION_NETWORK = 24;
2310 pub const BINDTODEVICE = 25;
2311 pub const ATTACH_FILTER = 26;
2312 pub const DETACH_FILTER = 27;
2313 pub const GET_FILTER = ATTACH_FILTER;
2314 pub const PEERNAME = 28;
2315 pub const TIMESTAMP_OLD = 29;
2316 pub const PASSSEC = 34;
2317 pub const TIMESTAMPNS_OLD = 35;
2318 pub const MARK = 36;
2319 pub const TIMESTAMPING_OLD = 37;
2320 pub const RXQ_OVFL = 40;
2321 pub const WIFI_STATUS = 41;
2322 pub const PEEK_OFF = 42;
2323 pub const NOFCS = 43;
2324 pub const LOCK_FILTER = 44;
2325 pub const SELECT_ERR_QUEUE = 45;
2326 pub const BUSY_POLL = 46;
2327 pub const MAX_PACING_RATE = 47;
2328 pub const BPF_EXTENSIONS = 48;
2329 pub const INCOMING_CPU = 49;
2330 pub const ATTACH_BPF = 50;
2331 pub const DETACH_BPF = DETACH_FILTER;
2332 pub const ATTACH_REUSEPORT_CBPF = 51;
2333 pub const ATTACH_REUSEPORT_EBPF = 52;
2334 pub const CNX_ADVICE = 53;
2335 pub const MEMINFO = 55;
2336 pub const INCOMING_NAPI_ID = 56;
2337 pub const COOKIE = 57;
2338 pub const PEERGROUPS = 59;
2339 pub const ZEROCOPY = 60;
2340 pub const TXTIME = 61;
2341 pub const BINDTOIFINDEX = 62;
2342 pub const TIMESTAMP_NEW = 63;
2343 pub const TIMESTAMPNS_NEW = 64;
2344 pub const TIMESTAMPING_NEW = 65;
2345 pub const RCVTIMEO_NEW = 66;
2346 pub const SNDTIMEO_NEW = 67;
2347 pub const DETACH_REUSEPORT_BPF = 68;
2348 } else if (is_sparc) struct {
2349 pub const DEBUG = 1;
2350 pub const REUSEADDR = 4;
2351 pub const TYPE = 4104;
2352 pub const ERROR = 4103;
2353 pub const DONTROUTE = 16;
2354 pub const BROADCAST = 32;
2355 pub const SNDBUF = 4097;
2356 pub const RCVBUF = 4098;
2357 pub const KEEPALIVE = 8;
2358 pub const OOBINLINE = 256;
2359 pub const NO_CHECK = 11;
2360 pub const PRIORITY = 12;
2361 pub const LINGER = 128;
2362 pub const BSDCOMPAT = 1024;
2363 pub const REUSEPORT = 512;
2364 pub const PASSCRED = 2;
2365 pub const PEERCRED = 64;
2366 pub const RCVLOWAT = 2048;
2367 pub const SNDLOWAT = 4096;
2368 pub const RCVTIMEO = 8192;
2369 pub const SNDTIMEO = 16384;
2370 pub const ACCEPTCONN = 32768;
2371 pub const PEERSEC = 30;
2372 pub const SNDBUFFORCE = 4106;
2373 pub const RCVBUFFORCE = 4107;
2374 pub const PROTOCOL = 4136;
2375 pub const DOMAIN = 4137;
2376 pub const SECURITY_AUTHENTICATION = 20481;
2377 pub const SECURITY_ENCRYPTION_TRANSPORT = 20482;
2378 pub const SECURITY_ENCRYPTION_NETWORK = 20484;
2379 pub const BINDTODEVICE = 13;
2380 pub const ATTACH_FILTER = 26;
2381 pub const DETACH_FILTER = 27;
2382 pub const GET_FILTER = 26;
2383 pub const PEERNAME = 28;
2384 pub const TIMESTAMP_OLD = 29;
2385 pub const PASSSEC = 31;
2386 pub const TIMESTAMPNS_OLD = 33;
2387 pub const MARK = 34;
2388 pub const TIMESTAMPING_OLD = 35;
2389 pub const RXQ_OVFL = 36;
2390 pub const WIFI_STATUS = 37;
2391 pub const PEEK_OFF = 38;
2392 pub const NOFCS = 39;
2393 pub const LOCK_FILTER = 40;
2394 pub const SELECT_ERR_QUEUE = 41;
2395 pub const BUSY_POLL = 48;
2396 pub const MAX_PACING_RATE = 49;
2397 pub const BPF_EXTENSIONS = 50;
2398 pub const INCOMING_CPU = 51;
2399 pub const ATTACH_BPF = 52;
2400 pub const DETACH_BPF = 27;
2401 pub const ATTACH_REUSEPORT_CBPF = 53;
2402 pub const ATTACH_REUSEPORT_EBPF = 54;
2403 pub const CNX_ADVICE = 55;
2404 pub const MEMINFO = 57;
2405 pub const INCOMING_NAPI_ID = 58;
2406 pub const COOKIE = 59;
2407 pub const PEERGROUPS = 61;
2408 pub const ZEROCOPY = 62;
2409 pub const TXTIME = 63;
2410 pub const BINDTOIFINDEX = 65;
2411 pub const TIMESTAMP_NEW = 70;
2412 pub const TIMESTAMPNS_NEW = 66;
2413 pub const TIMESTAMPING_NEW = 67;
2414 pub const RCVTIMEO_NEW = 68;
2415 pub const SNDTIMEO_NEW = 69;
2416 pub const DETACH_REUSEPORT_BPF = 71;
2266 } else struct {2417 } else struct {
2267 pub const DEBUG = 1;2418 pub const DEBUG = 1;
2268 pub const REUSEADDR = 2;2419 pub const REUSEADDR = 2;
...@@ -2291,53 +2442,48 @@ pub const SO = struct {...@@ -2291,53 +2442,48 @@ pub const SO = struct {
2291 pub const RCVBUFFORCE = 33;2442 pub const RCVBUFFORCE = 33;
2292 pub const PROTOCOL = 38;2443 pub const PROTOCOL = 38;
2293 pub const DOMAIN = 39;2444 pub const DOMAIN = 39;
2445 pub const SECURITY_AUTHENTICATION = 22;
2446 pub const SECURITY_ENCRYPTION_TRANSPORT = 23;
2447 pub const SECURITY_ENCRYPTION_NETWORK = 24;
2448 pub const BINDTODEVICE = 25;
2449 pub const ATTACH_FILTER = 26;
2450 pub const DETACH_FILTER = 27;
2451 pub const GET_FILTER = ATTACH_FILTER;
2452 pub const PEERNAME = 28;
2453 pub const TIMESTAMP_OLD = 29;
2454 pub const PASSSEC = 34;
2455 pub const TIMESTAMPNS_OLD = 35;
2456 pub const MARK = 36;
2457 pub const TIMESTAMPING_OLD = 37;
2458 pub const RXQ_OVFL = 40;
2459 pub const WIFI_STATUS = 41;
2460 pub const PEEK_OFF = 42;
2461 pub const NOFCS = 43;
2462 pub const LOCK_FILTER = 44;
2463 pub const SELECT_ERR_QUEUE = 45;
2464 pub const BUSY_POLL = 46;
2465 pub const MAX_PACING_RATE = 47;
2466 pub const BPF_EXTENSIONS = 48;
2467 pub const INCOMING_CPU = 49;
2468 pub const ATTACH_BPF = 50;
2469 pub const DETACH_BPF = DETACH_FILTER;
2470 pub const ATTACH_REUSEPORT_CBPF = 51;
2471 pub const ATTACH_REUSEPORT_EBPF = 52;
2472 pub const CNX_ADVICE = 53;
2473 pub const MEMINFO = 55;
2474 pub const INCOMING_NAPI_ID = 56;
2475 pub const COOKIE = 57;
2476 pub const PEERGROUPS = 59;
2477 pub const ZEROCOPY = 60;
2478 pub const TXTIME = 61;
2479 pub const BINDTOIFINDEX = 62;
2480 pub const TIMESTAMP_NEW = 63;
2481 pub const TIMESTAMPNS_NEW = 64;
2482 pub const TIMESTAMPING_NEW = 65;
2483 pub const RCVTIMEO_NEW = 66;
2484 pub const SNDTIMEO_NEW = 67;
2485 pub const DETACH_REUSEPORT_BPF = 68;
2294 };2486 };
2295
2296 pub const SECURITY_AUTHENTICATION = 22;
2297 pub const SECURITY_ENCRYPTION_TRANSPORT = 23;
2298 pub const SECURITY_ENCRYPTION_NETWORK = 24;
2299
2300 pub const BINDTODEVICE = 25;
2301
2302 pub const ATTACH_FILTER = 26;
2303 pub const DETACH_FILTER = 27;
2304 pub const GET_FILTER = ATTACH_FILTER;
2305
2306 pub const PEERNAME = 28;
2307 pub const TIMESTAMP_OLD = 29;
2308 pub const PASSSEC = 34;
2309 pub const TIMESTAMPNS_OLD = 35;
2310 pub const MARK = 36;
2311 pub const TIMESTAMPING_OLD = 37;
2312
2313 pub const RXQ_OVFL = 40;
2314 pub const WIFI_STATUS = 41;
2315 pub const PEEK_OFF = 42;
2316 pub const NOFCS = 43;
2317 pub const LOCK_FILTER = 44;
2318 pub const SELECT_ERR_QUEUE = 45;
2319 pub const BUSY_POLL = 46;
2320 pub const MAX_PACING_RATE = 47;
2321 pub const BPF_EXTENSIONS = 48;
2322 pub const INCOMING_CPU = 49;
2323 pub const ATTACH_BPF = 50;
2324 pub const DETACH_BPF = DETACH_FILTER;
2325 pub const ATTACH_REUSEPORT_CBPF = 51;
2326 pub const ATTACH_REUSEPORT_EBPF = 52;
2327 pub const CNX_ADVICE = 53;
2328 pub const MEMINFO = 55;
2329 pub const INCOMING_NAPI_ID = 56;
2330 pub const COOKIE = 57;
2331 pub const PEERGROUPS = 59;
2332 pub const ZEROCOPY = 60;
2333 pub const TXTIME = 61;
2334 pub const BINDTOIFINDEX = 62;
2335 pub const TIMESTAMP_NEW = 63;
2336 pub const TIMESTAMPNS_NEW = 64;
2337 pub const TIMESTAMPING_NEW = 65;
2338 pub const RCVTIMEO_NEW = 66;
2339 pub const SNDTIMEO_NEW = 67;
2340 pub const DETACH_REUSEPORT_BPF = 68;
2341};2487};
23422488
2343pub const SCM = struct {2489pub const SCM = struct {
...@@ -2348,7 +2494,7 @@ pub const SCM = struct {...@@ -2348,7 +2494,7 @@ pub const SCM = struct {
2348};2494};
23492495
2350pub const SOL = struct {2496pub const SOL = struct {
2351 pub const SOCKET = if (is_mips) 65535 else 1;2497 pub const SOCKET = if (is_mips or is_sparc) 65535 else 1;
23522498
2353 pub const IP = 0;2499 pub const IP = 0;
2354 pub const IPV6 = 41;2500 pub const IPV6 = 41;
lib/std/os/linux/sparc64.zig+1-1
...@@ -719,7 +719,7 @@ pub const Stat = extern struct {...@@ -719,7 +719,7 @@ pub const Stat = extern struct {
719719
720pub const timeval = extern struct {720pub const timeval = extern struct {
721 tv_sec: isize,721 tv_sec: isize,
722 tv_usec: isize,722 tv_usec: i32,
723};723};
724724
725pub const timezone = extern struct {725pub const timezone = extern struct {