| ... | ... | @@ -7457,20 +7457,20 @@ pub const STDOUT_FILENO = 1; |
| 7457 | 7457 | |
| 7458 | 7458 | pub fn syscall1(number: usize, arg1: usize) usize { |
| 7459 | 7459 | return asm volatile ("syscall" |
| 7460 | | : [ret] "={rax}" (-> usize) |
| 7460 | : [ret] "={rax}" (-> usize), |
| 7461 | 7461 | : [number] "{rax}" (number), |
| 7462 | | [arg1] "{rdi}" (arg1) |
| 7462 | [arg1] "{rdi}" (arg1), |
| 7463 | 7463 | : "rcx", "r11" |
| 7464 | 7464 | ); |
| 7465 | 7465 | } |
| 7466 | 7466 | |
| 7467 | 7467 | pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { |
| 7468 | 7468 | return asm volatile ("syscall" |
| 7469 | | : [ret] "={rax}" (-> usize) |
| 7469 | : [ret] "={rax}" (-> usize), |
| 7470 | 7470 | : [number] "{rax}" (number), |
| 7471 | 7471 | [arg1] "{rdi}" (arg1), |
| 7472 | 7472 | [arg2] "{rsi}" (arg2), |
| 7473 | | [arg3] "{rdx}" (arg3) |
| 7473 | [arg3] "{rdx}" (arg3), |
| 7474 | 7474 | : "rcx", "r11" |
| 7475 | 7475 | ); |
| 7476 | 7476 | } |
| ... | ... | @@ -7519,14 +7519,14 @@ pub fn syscall1(number: usize, arg1: usize) usize { |
| 7519 | 7519 | // type is the result type of the inline assembly expression. |
| 7520 | 7520 | // If it is a value binding, then `%[ret]` syntax would be used |
| 7521 | 7521 | // to refer to the register bound to the value. |
| 7522 | | (-> usize) |
| 7522 | (-> usize), |
| 7523 | 7523 | // Next is the list of inputs. |
| 7524 | 7524 | // The constraint for these inputs means, "when the assembly code is |
| 7525 | 7525 | // executed, $rax shall have the value of `number` and $rdi shall have |
| 7526 | 7526 | // the value of `arg1`". Any number of input parameters is allowed, |
| 7527 | 7527 | // including none. |
| 7528 | 7528 | : [number] "{rax}" (number), |
| 7529 | | [arg1] "{rdi}" (arg1) |
| 7529 | [arg1] "{rdi}" (arg1), |
| 7530 | 7530 | // Next is the list of clobbers. These declare a set of registers whose |
| 7531 | 7531 | // values will not be preserved by the execution of this assembly code. |
| 7532 | 7532 | // These do not include output or input registers. The special clobber |