https://bugs.kde.org/show_bug.cgi?id=423195

--- Comment #8 from Julian Seward <jsew...@acm.org> ---
(In reply to Carl Love from comment #3)
> Created attachment 130174 [details]
> Adds the support for prefix instructions
> 
> 0002-ISA-3.1-Instruction-Prefix-Support.patch
> 
> Adds the support for prefix instructions

 static Addr64 nextInsnAddr( void )
 {
-   return guest_CIA_curr_instr + 4;
+   return guest_CIA_curr_instr + WORD_INST_SIZE;
 }

Is this correct?  What if this insn is an 8-byte insn?

----

+#define ENABLE_PREFIX_CHECK  1
+
+#if ENABLE_PREFIX_CHECK
+#define PREFIX_CHECK { vassert( !prefix_instruction( prefixInstr ) ); }
+#else
+#define PREFIX_CHECK { }
+#endif

and then used (eg) in:

+static Bool dis_int_mult_add ( UInt prefixInstr, UInt theInstr )
 {
    /* VA-Form */
    UChar rD_addr = ifieldRegDS( theInstr );
@@ -5131,6 +5188,9 @@ static Bool dis_int_mult_add ( UInt theInstr )
    assign( rB, getIReg( rB_addr ) );
    assign( rC, getIReg( rC_addr ) );

+   /* There is no prefixed version of these instructions.  */
+   PREFIX_CHECK

I'm not sure whether you're intending to use PREFIX_CHECK just for debugging
the implementation
(meaning, it will fail if there are implementation bugs, but can't be made to
fail regardless of
the input) or whether it will fail if there is some kind of invalid input.  The
first use is OK,
but for the second use we need to generate SIGILL instead of asserting.  Can
you say which it is?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to