diff options
| author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-09 13:05:20 +0000 |
|---|---|---|
| committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-09 13:05:20 +0000 |
| commit | 671ec72e2703ac9c72c204ba6c4939eeea83d370 (patch) | |
| tree | e55077c3a482078b9438defd7ccf117a2797e152 /libjava | |
| parent | 87975961a71940d0740f928cf8d27843e5a6378d (diff) | |
| download | ppe42-gcc-671ec72e2703ac9c72c204ba6c4939eeea83d370.tar.gz ppe42-gcc-671ec72e2703ac9c72c204ba6c4939eeea83d370.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104094 138bc75d-0d04-0410-961f-82ee72b054a4
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 832028e6119..a167ac4c8c6 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 f7b0edae622..a5c8ae4bf54 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; \ |

