Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: v850 simulator does not sign extend first operand to divh
Date: Thu, 03 Apr 2003 07:29:00 -0000	[thread overview]
Message-ID: <m3brzot4wq.fsf@workshop.nickc.cambridge.redhat.com> (raw)

Hi Guys,

  May I apply the patch below please ?  It makes the v850 simulator
  sign extend its first operand, which is how the instruction should
  behave.

Cheers
        Nick

2003-04-03  Nick Clifton  <nickc@redhat.com>

	* simops.c (OP_40): Make divh sign extend its first operand.

Index: sim/v850/simops.c
===================================================================
RCS file: /cvs/src/src/sim/v850/simops.c,v
retrieving revision 1.6
diff -c -3 -p -w -r1.6 simops.c
*** sim/v850/simops.c	30 Nov 2002 18:01:30 -0000	1.6
--- sim/v850/simops.c	3 Apr 2003 07:28:28 -0000
*************** OP_6E0 ()
*** 775,788 ****
  int
  OP_40 ()
  {
!   unsigned int op0, op1, result, ov, s, z;
!   int temp;
  
    trace_input ("divh", OP_REG_REG, 0);
  
    /* Compute the result.  */
!   temp = EXTEND16 (State.regs[ OP[0] ]);
!   op0 = temp;
    op1 = State.regs[OP[1]];
    
    if (op0 == 0xffffffff && op1 == 0x80000000)
--- 775,787 ----
  int
  OP_40 ()
  {
!   boolean ov, s, z;
!   signed long int op0, op1, result;
  
    trace_input ("divh", OP_REG_REG, 0);
  
    /* Compute the result.  */
!   op0 = EXTEND16 (State.regs[ OP[0] ]);
    op1 = State.regs[OP[1]];
    
    if (op0 == 0xffffffff && op1 == 0x80000000)


             reply	other threads:[~2003-04-03  7:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-03  7:29 Nick Clifton [this message]
2003-04-05 18:58 ` Andrew Cagney
2003-04-06  8:50   ` Nick Clifton
2003-04-06 14:21     ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3brzot4wq.fsf@workshop.nickc.cambridge.redhat.com \
    --to=nickc@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox