@@ -360,10 +360,18 @@ const PR_TASK_PERF_EVENTS_ENABLE = Cint(32)
360
360
res = Base. llvmcall (""" %val = call i64 asm sideeffect "syscall", "={rax},{rax},{rdi},~{rcx},~{r11},~{memory}"(i64 %0, i64 %1)
361
361
ret i64 %val""" , Int64, Tuple{Int64, Int64}, SYS_prctl, Int64 (op))
362
362
return (res >= 0 ) ? nothing : throw (Base. SystemError (" prctl" , - res, nothing ))
363
+ elseif Sys. ARCH == :i686
364
+ res = Base. llvmcall (""" %val = call i32 asm sideeffect "int \$\$ 0x80", "={eax},{eax},{ebx},~{memory}"(i32 %0, i32 %1)
365
+ ret i32 %val""" , Int32, Tuple{Int32, Int32}, SYS_prctl, Int32 (op))
366
+ return (res >= 0 ) ? nothing : throw (Base. SystemError (" prctl" , - res, nothing ))
363
367
elseif Sys. ARCH == :aarch64
364
368
res = Base. llvmcall (""" %val = call i64 asm sideeffect "svc #0", "={x0},{x8},{x0},~{memory}"(i64 %0, i64 %1)
365
369
ret i64 %val""" , Int64, Tuple{Int64, Int64}, SYS_prctl, Int64 (op))
366
370
return (res >= 0 ) ? nothing : throw (Base. SystemError (" prctl" , - res, nothing ))
371
+ elseif Sys. ARCH == :arm
372
+ res = Base. llvmcall (""" %val = call i32 asm sideeffect "swi 0", "={r0},{r7},{r0},~{memory}"(i32 %0, i32 %1)
373
+ ret i32 %val""" , Int32, Tuple{Int32, Int32}, SYS_prctl, Int32 (op))
374
+ return (res >= 0 ) ? nothing : throw (Base. SystemError (" prctl" , - res, nothing ))
367
375
else
368
376
# syscall is lower overhead than calling libc's prctl
369
377
res = ccall (:syscall , Cint, (Clong, Clong... ), SYS_prctl, op)
0 commit comments