diff options
author | Andrew Haley <aph@redhat.com> | 2005-09-09 13:05:20 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2005-09-09 13:05:20 +0000 |
commit | ddef71730870b2c99da47b78acda77d5505c161e (patch) | |
tree | e55077c3a482078b9438defd7ccf117a2797e152 /libjava | |
parent | 7ce7896c390e4c3d4bfacf41bcfa6170e3c9adb8 (diff) | |
download | gcc-ddef71730870b2c99da47b78acda77d5505c161e.zip gcc-ddef71730870b2c99da47b78acda77d5505c161e.tar.gz gcc-ddef71730870b2c99da47b78acda77d5505c161e.tar.bz2 |
re PR libgcj/22084 (Divide_1 test case hangs)
2005-09-08 Andrew Haley <aph@redhat.com>
PR java/22084
* include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Bump IP by 1 if
R/M field in instruction is 100.
From-SVN: r104094
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/include/i386-signal.h | 17 |
2 files changed, 18 insertions, 5 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 832028e..a167ac4 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2005-09-08 Andrew Haley <aph@redhat.com> + + PR java/22084 + * include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Bump IP by 1 if + R/M field in instruction is 100. + 2005-09-08 Thomas Fitzsimmons <fitzsim@redhat.com> PR libgcj/23761 diff --git a/libjava/include/i386-signal.h b/libjava/include/i386-signal.h index f7b0eda..a5c8ae4 100644 --- a/libjava/include/i386-signal.h +++ b/libjava/include/i386-signal.h @@ -64,18 +64,25 @@ do \ if (_regs->eax == 0x80000000 \ && ((_modrm >> 3) & 7) == 7) /* Signed divide */ \ { \ + unsigned char _rm = _modrm & 7; \ _regs->edx = 0; /* the remainder is zero */ \ switch (_modrm >> 6) \ { \ - case 0: \ - if ((_modrm & 7) == 5) \ - _eip += 4; \ + case 0: /* register indirect */ \ + if (_rm == 5) /* 32-bit displacement */ \ + _eip += 4; \ + if (_rm == 4) /* A SIB byte follows the ModR/M byte */ \ + _eip += 1; \ break; \ - case 1: \ + case 1: /* register indirect + 8-bit displacement */ \ _eip += 1; \ + if (_rm == 4) /* A SIB byte follows the ModR/M byte */ \ + _eip += 1; \ break; \ - case 2: \ + case 2: /* register indirect + 32-bit displacement */ \ _eip += 4; \ + if (_rm == 4) /* A SIB byte follows the ModR/M byte */ \ + _eip += 1; \ break; \ case 3: \ break; \ |