From dcef6abaf507eb9a29d837004460f2f15bb78b7c Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Wed, 5 Apr 2006 22:03:30 +0000 Subject: [PATCH] lib1funcs.asm (modsi): P1/P2 can be call-clobbered even if the calling function doesn't modify them. * config/bfin/lib1funcs.asm (modsi): P1/P2 can be call-clobbered even if the calling function doesn't modify them. From-SVN: r112720 --- gcc/ChangeLog | 3 +++ gcc/config/bfin/lib1funcs.asm | 15 +++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 460217491bf4..c630968caaf4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,9 @@ * config/bfin/bfin.c (bfin_legitimate_address_p): Disallow got-relative addressing for anything but SImode. + * config/bfin/lib1funcs.asm (modsi): P1/P2 can be call-clobbered + even if the calling function doesn't modify them. + 2006-04-05 Richard Guenther PR tree-optimization/26919 diff --git a/gcc/config/bfin/lib1funcs.asm b/gcc/config/bfin/lib1funcs.asm index 22e8a02a33ad..77d4fff069bf 100644 --- a/gcc/config/bfin/lib1funcs.asm +++ b/gcc/config/bfin/lib1funcs.asm @@ -64,17 +64,16 @@ ___divsi3: .type ___modsi3, STT_FUNC; ___modsi3: - [--SP] = RETS; - /* P1 and P2 are preserved by divsi3 and udivsi3. */ - P1 = R0; - P2 = R1; - CALL ___divsi3; - R1 = P1; - R2 = P2; + [--SP] = RETS; + [--SP] = R0; + [--SP] = R1; + CALL ___divsi3; + R2 = [SP++]; + R1 = [SP++]; R2 *= R0; R0 = R1 - R2; RETS = [SP++]; - RTS; + RTS; #endif #ifdef L_udivsi3