diff mbox

[1/3] emulator: fix confused param list

Message ID 1372150291-31096-1-git-send-email-yzt356@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arthur Chunqi Li June 25, 2013, 8:51 a.m. UTC
Fix param list of test_mmx_movq_mf and test_movabs. The previous
version uses "insn_page" and "insn_ram" which are not used afterwards.
There are also two variants named "insn_page" and "insn_ram", which
has no relation with these two functions.

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
---
 x86/emulator.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
 mode change 100644 => 100755 x86/emulator.c

Comments

Arthur Chunqi Li June 25, 2013, 8:53 a.m. UTC | #1
These patches are some unfinished work and bug fixes related to
Paolo's exercise. I think I'd better finish these simple jobs.

Arthur

On Tue, Jun 25, 2013 at 4:51 PM, Arthur Chunqi Li <yzt356@gmail.com> wrote:
> Fix param list of test_mmx_movq_mf and test_movabs. The previous
> version uses "insn_page" and "insn_ram" which are not used afterwards.
> There are also two variants named "insn_page" and "insn_ram", which
> has no relation with these two functions.
>
> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
> ---
>  x86/emulator.c |   10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>  mode change 100644 => 100755 x86/emulator.c
>
> diff --git a/x86/emulator.c b/x86/emulator.c
> old mode 100644
> new mode 100755
> index 68d2b93..6972334
> --- a/x86/emulator.c
> +++ b/x86/emulator.c
> @@ -786,8 +786,7 @@ static void advance_rip_by_3_and_note_exception(struct ex_regs *regs)
>      regs->rip += 3;
>  }
>
> -static void test_mmx_movq_mf(uint64_t *mem, uint8_t *insn_page,
> -                            uint8_t *alt_insn_page, void *insn_ram)
> +static void test_mmx_movq_mf(uint64_t *mem, uint8_t *alt_insn_page)
>  {
>      uint16_t fcw = 0;  /* all exceptions unmasked */
>      /* movq %mm0, (%rax) */
> @@ -808,8 +807,7 @@ static void test_mmx_movq_mf(uint64_t *mem, uint8_t *insn_page,
>      handle_exception(MF_VECTOR, 0);
>  }
>
> -static void test_movabs(uint64_t *mem, uint8_t *insn_page,
> -                      uint8_t *alt_insn_page, void *insn_ram)
> +static void test_movabs(uint64_t *mem, uint8_t *alt_insn_page)
>  {
>      /* mov $0x9090909090909090, %rcx */
>      MK_INSN(movabs, "mov $0x9090909090909090, %rcx\n\t");
> @@ -1012,8 +1010,8 @@ int main()
>         test_lldt(mem);
>         test_ltr(mem);
>
> -       test_mmx_movq_mf(mem, insn_page, alt_insn_page, insn_ram);
> -       test_movabs(mem, insn_page, alt_insn_page, insn_ram);
> +       test_mmx_movq_mf(mem, alt_insn_page);
> +       test_movabs(mem, alt_insn_page);
>
>         test_crosspage_mmio(mem);
>
> --
> 1.7.9.5
>
diff mbox

Patch

diff --git a/x86/emulator.c b/x86/emulator.c
old mode 100644
new mode 100755
index 68d2b93..6972334
--- a/x86/emulator.c
+++ b/x86/emulator.c
@@ -786,8 +786,7 @@  static void advance_rip_by_3_and_note_exception(struct ex_regs *regs)
     regs->rip += 3;
 }
 
-static void test_mmx_movq_mf(uint64_t *mem, uint8_t *insn_page,
-			     uint8_t *alt_insn_page, void *insn_ram)
+static void test_mmx_movq_mf(uint64_t *mem, uint8_t *alt_insn_page)
 {
     uint16_t fcw = 0;  /* all exceptions unmasked */
     /* movq %mm0, (%rax) */
@@ -808,8 +807,7 @@  static void test_mmx_movq_mf(uint64_t *mem, uint8_t *insn_page,
     handle_exception(MF_VECTOR, 0);
 }
 
-static void test_movabs(uint64_t *mem, uint8_t *insn_page,
-		       uint8_t *alt_insn_page, void *insn_ram)
+static void test_movabs(uint64_t *mem, uint8_t *alt_insn_page)
 {
     /* mov $0x9090909090909090, %rcx */
     MK_INSN(movabs, "mov $0x9090909090909090, %rcx\n\t");
@@ -1012,8 +1010,8 @@  int main()
 	test_lldt(mem);
 	test_ltr(mem);
 
-	test_mmx_movq_mf(mem, insn_page, alt_insn_page, insn_ram);
-	test_movabs(mem, insn_page, alt_insn_page, insn_ram);
+	test_mmx_movq_mf(mem, alt_insn_page);
+	test_movabs(mem, alt_insn_page);
 
 	test_crosspage_mmio(mem);