diff options
author | Bob Wilson <bob.wilson@acm.org> | 2007-04-30 17:59:10 +0000 |
---|---|---|
committer | Bob Wilson <bwilson@gcc.gnu.org> | 2007-04-30 17:59:10 +0000 |
commit | 0a21c1d2bae57035c0f46cca64e85f228c6b4388 (patch) | |
tree | 5dcc80c69dfb0279ebc5b7971841ddabfc3f672f /gcc | |
parent | 143569a85c6f8e0972f7d4519c23bf58008b874d (diff) | |
download | gcc-0a21c1d2bae57035c0f46cca64e85f228c6b4388.zip gcc-0a21c1d2bae57035c0f46cca64e85f228c6b4388.tar.gz gcc-0a21c1d2bae57035c0f46cca64e85f228c6b4388.tar.bz2 |
lib1funcs.asm (__umodsi3, __modsi3): Rearrange so that DIV0 exception can fall through to a normal return.
* config/xtensa/lib1funcs.asm (__umodsi3, __modsi3): Rearrange so that
DIV0 exception can fall through to a normal return.
From-SVN: r124303
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/xtensa/lib1funcs.asm | 18 |
2 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 906135b..386d898 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-04-30 Bob Wilson <bob.wilson@acm.org> + + * config/xtensa/lib1funcs.asm (__umodsi3, __modsi3): Rearrange so that + DIV0 exception can fall through to a normal return. + 2007-04-30 Alexandre Oliva <aoliva@redhat.com> PR middle-end/22156 diff --git a/gcc/config/xtensa/lib1funcs.asm b/gcc/config/xtensa/lib1funcs.asm index 6db2a7d..7cb994d 100644 --- a/gcc/config/xtensa/lib1funcs.asm +++ b/gcc/config/xtensa/lib1funcs.asm @@ -654,16 +654,17 @@ __umodsi3: leaf_return .Lle_one: - beqz a3, .Lerror - movi a2, 0 - leaf_return + bnez a3, .Lreturn0 -.Lerror: /* Divide by zero: Use an illegal instruction to force an exception. The subsequent "DIV0" string can be recognized by the exception handler to identify the real cause of the exception. */ ill .ascii "DIV0" + +.Lreturn0: + movi a2, 0 + leaf_return .size __umodsi3,.-__umodsi3 #endif /* L_umodsi3 */ @@ -712,16 +713,17 @@ __modsi3: leaf_return .Lle_one: - beqz a3, .Lerror - movi a2, 0 - leaf_return + bnez a3, .Lreturn0 -.Lerror: /* Divide by zero: Use an illegal instruction to force an exception. The subsequent "DIV0" string can be recognized by the exception handler to identify the real cause of the exception. */ ill .ascii "DIV0" + +.Lreturn0: + movi a2, 0 + leaf_return .size __modsi3,.-__modsi3 #endif /* L_modsi3 */ |