Browse Source

Fix invalid inline ASM

Jeremy Soller 6 years ago
parent
commit
1a8af993e6
2 changed files with 8 additions and 4 deletions
  1. 4 2
      src/header/signal/linux.rs
  2. 4 2
      src/header/signal/redox.rs

+ 4 - 2
src/header/signal/linux.rs

@@ -1,19 +1,21 @@
 // Needs to be defined in assembly because it can't have a function prologue
+// rax is register, 15 is RT_SIGRETURN
 #[cfg(target_arch = "x86_64")]
 global_asm!(
     "
     .global __restore_rt
     __restore_rt:
-        mov $15, %rax # <- rax is register, 15 is RT_SIGRETURN
+        mov $15, %rax
         syscall
 "
 );
+// x8 is register, 139 is RT_SIGRETURN
 #[cfg(target_arch = "aarch64")]
 global_asm!(
     "
     .global __restore_rt
     __restore_rt:
-        mov x8, #139 # <- x8 is register, 139 is RT_SIGRETURN
+        mov x8, #139
         svc 0
 "
 );

+ 4 - 2
src/header/signal/redox.rs

@@ -1,19 +1,21 @@
 // Needs to be defined in assembly because it can't have a function prologue
+// rax is register, 119 is SIGRETURN
 #[cfg(target_arch = "x86_64")]
 global_asm!(
     "
     .global __restore_rt
     __restore_rt:
-        mov $119, %rax # <- rax is register, 119 is SIGRETURN
+        mov $119, %rax
         int $0x80
 "
 );
+// x8 is register, 119 is SIGRETURN
 #[cfg(target_arch = "aarch64")]
 global_asm!(
     "
     .global __restore_rt
     __restore_rt:
-        mov x8, #119 # <- x8 is register, 119 is SIGRETURN
+        mov x8, #119
         svc 0
 "
 );