[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Output many return values of some instruction

From: EricSong
Subject: [Qemu-discuss] Output many return values of some instruction
Date: Thu, 27 Nov 2014 10:47:22 +0800

Hi, Experts

   I try to implement an instruction(Getsec in x86 Arch) based on QEMU 2.1.0.

   Many instructions can output only one return value by cpu_T[0] parameter, and input parameter is cpu_T[0], there is no other parameter to use for output more return value. How can I do it?

   For example:

      Common instruction: ADD, the output return value is eax, so in QEMU the output return value is cpu_T[0], then move it to eax.

        tcg_gen_add_tl(cpu_T[0], cpu_T[0], cpu_T[1]);              // cpu_T[0] is return value

        gen_op_mov_reg_v(MO_64, R_EAX, cpu_T[0]);             // mov return value to eax

        gen_op_update2_cc();                                 // what means

        set_cc_op(s1, CC_OP_ADDB + ot);                       // what means

   After this sequence, it can finish “add” instruction for output to eax. But when my instruction “Getsec” want to output 3 return value to eax/ebx/ecx. And we have only one parameter cpu_T[0], how to finish it? And what means about the update_cc() and set_cc_op ?


Thank a lot

Best wishes


reply via email to

[Prev in Thread] Current Thread [Next in Thread]