Mohammed Gamal wrote:
Add test for 'call near abolsute' instruction to the real mode test harness

+void test_call(struct regs *inregs, struct regs *outregs)
+{
+       MK_INSN(call1, "mov $0x4000, %eax \n\t"
+                      "call *%eax\n\t");
+
+       exec_in_big_real_mode(inregs, outregs,
+                             insn_call1,
+                             insn_call1_end - insn_call1);

Please test registers for damage (using regs_equal).

+}
+
+void line_out()
+{      
+       /* Just output a blank line */
+       asm(".org 0x4000 \n\t"
+           "mov $10, %al \n\t"
+           "out %al, $0xf1 \n\t");
+}

When the code grows and occupies address 0x4000, this will break.

I suggest:

void test_function(void);
asm ("test_function: mov $1234, %eax; ret");

This sets up a register to see that the call actually did something, and avoids the gcc function prologue/epilogue which may clobber registers.



--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to