diff options
author | Theodore A. Roth <troth@verinet.com> | 2002-09-28 14:14:12 +0000 |
---|---|---|
committer | Marek Michalkiewicz <marekm@gcc.gnu.org> | 2002-09-28 14:14:12 +0000 |
commit | 13e8651c8a52719e6e5a8b4b1a6552bffd7bcd79 (patch) | |
tree | 2b740552b9e38f4b75c8a1ffa365fa470bbea4af /gcc/config/avr | |
parent | 5831424ed72881751a20ab8948b1efc09dab241b (diff) | |
download | gcc-13e8651c8a52719e6e5a8b4b1a6552bffd7bcd79.zip gcc-13e8651c8a52719e6e5a8b4b1a6552bffd7bcd79.tar.gz gcc-13e8651c8a52719e6e5a8b4b1a6552bffd7bcd79.tar.bz2 |
avr.c: Eliminate use of _PC_ in pc relative insns.
* config/avr/avr.c: Eliminate use of _PC_ in pc relative insns.
* config/avr/avr.md: Ditto.
From-SVN: r57613
Diffstat (limited to 'gcc/config/avr')
-rw-r--r-- | gcc/config/avr/avr.c | 67 | ||||
-rw-r--r-- | gcc/config/avr/avr.md | 26 |
2 files changed, 46 insertions, 47 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 09ab9e0..1a06ed1 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -1313,60 +1313,60 @@ ret_cond_branch (x, len, reverse) { case GT: if (cc_prev_status.flags & CC_OVERFLOW_UNUSABLE) - return (len == 1 ? (AS1 (breq,_PC_+2) CR_TAB + return (len == 1 ? (AS1 (breq,.+2) CR_TAB AS1 (brpl,%0)) : - len == 2 ? (AS1 (breq,_PC_+4) CR_TAB - AS1 (brmi,_PC_+2) CR_TAB + len == 2 ? (AS1 (breq,.+4) CR_TAB + AS1 (brmi,.+2) CR_TAB AS1 (rjmp,%0)) : - (AS1 (breq,_PC_+6) CR_TAB - AS1 (brmi,_PC_+4) CR_TAB + (AS1 (breq,.+6) CR_TAB + AS1 (brmi,.+4) CR_TAB AS1 (jmp,%0))); else - return (len == 1 ? (AS1 (breq,_PC_+2) CR_TAB + return (len == 1 ? (AS1 (breq,.+2) CR_TAB AS1 (brge,%0)) : - len == 2 ? (AS1 (breq,_PC_+4) CR_TAB - AS1 (brlt,_PC_+2) CR_TAB + len == 2 ? (AS1 (breq,.+4) CR_TAB + AS1 (brlt,.+2) CR_TAB AS1 (rjmp,%0)) : - (AS1 (breq,_PC_+6) CR_TAB - AS1 (brlt,_PC_+4) CR_TAB + (AS1 (breq,.+6) CR_TAB + AS1 (brlt,.+4) CR_TAB AS1 (jmp,%0))); case GTU: - return (len == 1 ? (AS1 (breq,_PC_+2) CR_TAB + return (len == 1 ? (AS1 (breq,.+2) CR_TAB AS1 (brsh,%0)) : - len == 2 ? (AS1 (breq,_PC_+4) CR_TAB - AS1 (brlo,_PC_+2) CR_TAB + len == 2 ? (AS1 (breq,.+4) CR_TAB + AS1 (brlo,.+2) CR_TAB AS1 (rjmp,%0)) : - (AS1 (breq,_PC_+6) CR_TAB - AS1 (brlo,_PC_+4) CR_TAB + (AS1 (breq,.+6) CR_TAB + AS1 (brlo,.+4) CR_TAB AS1 (jmp,%0))); case LE: if (cc_prev_status.flags & CC_OVERFLOW_UNUSABLE) return (len == 1 ? (AS1 (breq,%0) CR_TAB AS1 (brmi,%0)) : - len == 2 ? (AS1 (breq,_PC_+2) CR_TAB - AS1 (brpl,_PC_+2) CR_TAB + len == 2 ? (AS1 (breq,.+2) CR_TAB + AS1 (brpl,.+2) CR_TAB AS1 (rjmp,%0)) : - (AS1 (breq,_PC_+2) CR_TAB - AS1 (brpl,_PC_+4) CR_TAB + (AS1 (breq,.+2) CR_TAB + AS1 (brpl,.+4) CR_TAB AS1 (jmp,%0))); else return (len == 1 ? (AS1 (breq,%0) CR_TAB AS1 (brlt,%0)) : - len == 2 ? (AS1 (breq,_PC_+2) CR_TAB - AS1 (brge,_PC_+2) CR_TAB + len == 2 ? (AS1 (breq,.+2) CR_TAB + AS1 (brge,.+2) CR_TAB AS1 (rjmp,%0)) : - (AS1 (breq,_PC_+2) CR_TAB - AS1 (brge,_PC_+4) CR_TAB + (AS1 (breq,.+2) CR_TAB + AS1 (brge,.+4) CR_TAB AS1 (jmp,%0))); case LEU: return (len == 1 ? (AS1 (breq,%0) CR_TAB AS1 (brlo,%0)) : - len == 2 ? (AS1 (breq,_PC_+2) CR_TAB - AS1 (brsh,_PC_+2) CR_TAB + len == 2 ? (AS1 (breq,.+2) CR_TAB + AS1 (brsh,.+2) CR_TAB AS1 (rjmp,%0)) : - (AS1 (breq,_PC_+2) CR_TAB - AS1 (brsh,_PC_+4) CR_TAB + (AS1 (breq,.+2) CR_TAB + AS1 (brsh,.+4) CR_TAB AS1 (jmp,%0))); default: if (reverse) @@ -1376,10 +1376,10 @@ ret_cond_branch (x, len, reverse) case 1: return AS1 (br%k1,%0); case 2: - return (AS1 (br%j1,_PC_+2) CR_TAB + return (AS1 (br%j1,.+2) CR_TAB AS1 (rjmp,%0)); default: - return (AS1 (br%j1,_PC_+4) CR_TAB + return (AS1 (br%j1,.+4) CR_TAB AS1 (jmp,%0)); } } @@ -1390,10 +1390,10 @@ ret_cond_branch (x, len, reverse) case 1: return AS1 (br%j1,%0); case 2: - return (AS1 (br%k1,_PC_+2) CR_TAB + return (AS1 (br%k1,.+2) CR_TAB AS1 (rjmp,%0)); default: - return (AS1 (br%k1,_PC_+4) CR_TAB + return (AS1 (br%k1,.+4) CR_TAB AS1 (jmp,%0)); } } @@ -4887,8 +4887,7 @@ asm_file_start (file) "__SP_L__ = 0x3d\n", file); fputs ("__tmp_reg__ = 0\n" - "__zero_reg__ = 1\n" - "_PC_ = 2\n", file); + "__zero_reg__ = 1\n", file); /* FIXME: output these only if there is anything in the .data / .bss sections - some code size could be saved by not linking in the @@ -5596,7 +5595,7 @@ avr_out_sbxx_branch (insn, operands) } if (long_jump) - return (AS1 (rjmp,_PC_+4) CR_TAB + return (AS1 (rjmp,.+4) CR_TAB AS1 (jmp,%3)); if (!reverse) return AS1 (rjmp,%3); diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 7534fc5..dd51f0e 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -387,7 +387,7 @@ "ld __tmp_reg__,%a1+ st %a0+,__tmp_reg__ dec %2 - brne _PC_-8" + brne .-8" [(set_attr "length" "4") (set_attr "cc" "clobber")]) @@ -405,13 +405,13 @@ return (AS2 (ld,__tmp_reg__,%a1+) CR_TAB AS2 (st,%a0+,__tmp_reg__) CR_TAB AS2 (sbiw,%A2,1) CR_TAB - AS1 (brne,_PC_-8)); + AS1 (brne,.-8)); else return (AS2 (ld,__tmp_reg__,%a1+) CR_TAB AS2 (st,%a0+,__tmp_reg__) CR_TAB AS2 (subi,%A2,1) CR_TAB AS2 (sbci,%B2,0) CR_TAB - AS1 (brne,_PC_-10)); + AS1 (brne,.-10)); }" [(set_attr "length" "4,5") (set_attr "cc" "clobber,clobber")]) @@ -457,7 +457,7 @@ "" "st %a0+,__zero_reg__ dec %1 - brne _PC_-6" + brne .-6" [(set_attr "length" "3") (set_attr "cc" "clobber")]) @@ -473,12 +473,12 @@ if (which_alternative==0) return (AS2 (st,%a0+,__zero_reg__) CR_TAB AS2 (sbiw,%A1,1) CR_TAB - AS1 (brne,_PC_-6)); + AS1 (brne,.-6)); else return (AS2 (st,%a0+,__zero_reg__) CR_TAB AS2 (subi,%A1,1) CR_TAB AS2 (sbci,%B1,0) CR_TAB - AS1 (brne,_PC_-8)); + AS1 (brne,.-8)); }" [(set_attr "length" "3,4") (set_attr "cc" "clobber,clobber")]) @@ -512,7 +512,7 @@ "" "ld __tmp_reg__,%a0+ tst __tmp_reg__ - brne _PC_-6" + brne .-6" [(set_attr "length" "3") (set_attr "cc" "clobber")]) @@ -2423,10 +2423,10 @@ case 1: return AS1 (brcc,%2); case 2: - return (AS1 (brcs,_PC_+2) CR_TAB + return (AS1 (brcs,.+2) CR_TAB AS1 (rjmp,%2)); } - return (AS1 (brcs,_PC_+4) CR_TAB + return (AS1 (brcs,.+4) CR_TAB AS1 (jmp,%2)); }") @@ -2458,10 +2458,10 @@ case 1: return AS1 (brcc,%2); case 2: - return (AS1 (brcs,_PC_+2) CR_TAB + return (AS1 (brcs,.+2) CR_TAB AS1 (rjmp,%2)); } - return (AS1 (brcs,_PC_+4) CR_TAB + return (AS1 (brcs,.+4) CR_TAB AS1 (jmp,%2)); }") @@ -2488,10 +2488,10 @@ case 1: return AS1 (brcc,%1); case 2: - return (AS1 (brcs,_PC_+2) CR_TAB + return (AS1 (brcs,.+2) CR_TAB AS1 (rjmp,%1)); } - return (AS1 (brcs,_PC_+4) CR_TAB + return (AS1 (brcs,.+4) CR_TAB AS1 (jmp,%1)); }") |