|
From: | Andrew Hutchinson |
Subject: | Re: [avr-gcc-list] Bug 31786 spill in class 'BASE_POINTER_REGS' |
Date: | Tue, 01 Jan 2008 17:25:52 -0500 |
User-agent: | Thunderbird 2.0.0.9 (Windows/20071031) |
Here are changes.
Since Im using different GCC release (4.3 experimental) and have a few debugging dump spots added, I cant give you a proper patch. But since it only involves 3 lines I have listed it below: Nothing crashed and no adverse code size problem on the stuff I tried. It got smaller but some (all) of that might have been GCC 4.3. For example AVR butterfly .text size went from 13722 to 13516. All GCC libraries compiled without incident. In avr.h around line 450 or so #define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, IND_LEVELS, WIN) \ .. .. if (fit) \ { \ if (reg_equiv_address[REGNO (XEXP (X, 0))] != 0) \ { \ int regno = REGNO (XEXP (X, 0)); \ rtx mem = make_memloc (X, regno); \ push_reload (XEXP (mem,0), NULL, &XEXP (mem,0), NULL, \ POINTER_REGS, Pmode, VOIDmode, 0, 0, \ 1, ADDR_TYPE (TYPE)); \ push_reload (mem, NULL_RTX, &XEXP (X, 0), NULL, \ BASE_POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \ OPNUM, TYPE); \ goto WIN; \ } \ if(0) { \ push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL, \ BASE_POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \ OPNUM, TYPE); \ goto WIN; \ } \ \ } \ Make sure you have line continuation characters on lines added! Then in avr.c around line 950 or so int legitimate_address_p (enum machine_mode mode, rtx x, int strict) .. . . . if (! strict || REGNO (XEXP (x,0)) == REG_X || REGNO (XEXP (x,0)) == REG_Y || REGNO (XEXP (x,0)) == REG_Z) Does someone have a test bench set up to shake this down? Andy |
[Prev in Thread] | Current Thread | [Next in Thread] |