If you decide to install gcc-3.1 from source, here's a patch from Jan
Hubicka which allows mess/cpu/z80gb/z80gb.c to build using -O2 or -O3 with
-march=athlon[-tbird]. It also fixes a couple of other bugs.
diff -Nur gcc-3.1/gcc/config/i386/i386.md gcc-3.1-patched/gcc/config/i386/i386.md
--- gcc-3.1/gcc/config/i386/i386.md Mon Apr 29 09:07:26 2002
+++ gcc-3.1-patched/gcc/config/i386/i386.md Sat May 18 21:00:56 2002
@@ -2014,7 +2014,7 @@
;; For 64BIT abi we always round up to 8 bytes.
(define_insn "*pushqi2_rex64"
[(set (match_operand:QI 0 "push_operand" "=X")
- (match_operand:QI 1 "nonmemory_no_elim_operand" "ri"))]
+ (match_operand:QI 1 "nonmemory_no_elim_operand" "qi"))]
"TARGET_64BIT"
"push{q}\t%q1"
[(set_attr "type" "push")
@@ -11768,7 +11768,7 @@
(ashiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0")
(match_operand:QI 2 "const_int_1_operand" "I"))
(const_int 0)))
- (set (match_operand:QI 0 "nonimmediate_operand" "=rm")
+ (set (match_operand:QI 0 "nonimmediate_operand" "=qm")
(ashiftrt:QI (match_dup 1) (match_dup 2)))]
"ix86_match_ccmode (insn, CCGOCmode)
&& (TARGET_PENTIUM || TARGET_PENTIUMPRO)
@@ -11789,7 +11789,7 @@
(ashiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0")
(match_operand:QI 2 "immediate_operand" "I"))
(const_int 0)))
- (set (match_operand:QI 0 "nonimmediate_operand" "=rm")
+ (set (match_operand:QI 0 "nonimmediate_operand" "=qm")
(ashiftrt:QI (match_dup 1) (match_dup 2)))]
"ix86_match_ccmode (insn, CCGOCmode)
&& ix86_binary_operator_ok (ASHIFTRT, QImode, operands)"