From: Ben Pfaff <blp@cs.stanford.edu>
Date: Sat, 11 Nov 2006 14:29:14 +0000 (+0000)
Subject: Adopt consistent style in asm statements.
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c765c09e567d3da51d5249932daa71f8a74ff9d;p=pintos-anon

Adopt consistent style in asm statements.
---

diff --git a/src/tests/userprog/sc-bad-arg.c b/src/tests/userprog/sc-bad-arg.c
index aee48b0..0b512a0 100644
--- a/src/tests/userprog/sc-bad-arg.c
+++ b/src/tests/userprog/sc-bad-arg.c
@@ -12,6 +12,6 @@ void
 test_main (void) 
 {
   asm volatile ("movl $0xbffffffc, %%esp; movl %0, (%%esp); int $0x30"
-                :: "i" (SYS_EXIT));
+                : : "i" (SYS_EXIT));
   fail ("should have called exit(-1)");
 }
diff --git a/src/tests/userprog/sc-boundary-2.c b/src/tests/userprog/sc-boundary-2.c
index 6dce992..8acf036 100644
--- a/src/tests/userprog/sc-boundary-2.c
+++ b/src/tests/userprog/sc-boundary-2.c
@@ -17,6 +17,6 @@ test_main (void)
   p[1] = 67;
 
   /* Invoke the system call. */
-  asm volatile ("movl %0, %%esp; int $0x30" :: "g" (p));
+  asm volatile ("movl %0, %%esp; int $0x30" : : "g" (p));
   fail ("should have called exit(67)");
 }
diff --git a/src/tests/userprog/sc-boundary.c b/src/tests/userprog/sc-boundary.c
index fd147bd..d889535 100644
--- a/src/tests/userprog/sc-boundary.c
+++ b/src/tests/userprog/sc-boundary.c
@@ -17,6 +17,6 @@ test_main (void)
   p[1] = 42;
 
   /* Invoke the system call. */
-  asm volatile ("movl %0, %%esp; int $0x30" :: "g" (p));
+  asm volatile ("movl %0, %%esp; int $0x30" : : "g" (p));
   fail ("should have called exit(42)");
 }
diff --git a/src/tests/vm/pt-grow-pusha.c b/src/tests/vm/pt-grow-pusha.c
index b6b165f..f9762a5 100644
--- a/src/tests/vm/pt-grow-pusha.c
+++ b/src/tests/vm/pt-grow-pusha.c
@@ -16,5 +16,5 @@ test_main (void)
      "andl $0xfffff000, %%esp;"  /* Move stack pointer to bottom of page. */
      "pushal;"                   /* Push 32 bytes on stack at once. */
      "movl %%eax, %%esp"         /* Restore copied stack pointer. */
-     ::: "eax");                 /* Tell GCC we destroyed eax. */
+     : : : "eax");               /* Tell GCC we destroyed eax. */
 }
diff --git a/src/threads/init.c b/src/threads/init.c
index 5961deb..016c24d 100644
--- a/src/threads/init.c
+++ b/src/threads/init.c
@@ -189,7 +189,7 @@ paging_init (void)
      new page tables immediately.  See [IA32-v2a] "MOV--Move
      to/from Control Registers" and [IA32-v3a] 3.7.5 "Base Address
      of the Page Directory". */
-  asm volatile ("movl %0, %%cr3" :: "r" (vtop (base_page_dir)));
+  asm volatile ("movl %0, %%cr3" : : "r" (vtop (base_page_dir)));
 }
 
 /* Breaks the kernel command line into words and returns them as
diff --git a/src/threads/interrupt.c b/src/threads/interrupt.c
index 3e37213..075962f 100644
--- a/src/threads/interrupt.c
+++ b/src/threads/interrupt.c
@@ -118,7 +118,7 @@ intr_init (void)
      See [IA32-v2a] "LIDT" and [IA32-v3a] 5.10 "Interrupt
      Descriptor Table (IDT)". */
   idtr_operand = make_idtr_operand (sizeof idt - 1, idt);
-  asm volatile ("lidt %0" :: "m" (idtr_operand));
+  asm volatile ("lidt %0" : : "m" (idtr_operand));
 
   /* Initialize intr_names. */
   for (i = 0; i < INTR_CNT; i++)
diff --git a/src/userprog/gdt.c b/src/userprog/gdt.c
index bed5d58..a7423b7 100644
--- a/src/userprog/gdt.c
+++ b/src/userprog/gdt.c
@@ -49,8 +49,8 @@ gdt_init (void)
      Table Register (GDTR)", 2.4.4 "Task Register (TR)", and
      6.2.4 "Task Register".  */
   gdtr_operand = make_gdtr_operand (sizeof gdt - 1, gdt);
-  asm volatile ("lgdt %0" :: "m" (gdtr_operand));
-  asm volatile ("ltr %w0" :: "r" (SEL_TSS));
+  asm volatile ("lgdt %0" : : "m" (gdtr_operand));
+  asm volatile ("ltr %w0" : : "r" (SEL_TSS));
 }
 
 /* System segment or code/data segment? */