This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to improve find_base_term ADDRESSOF handling
- To: rth at cygnus dot com
- Subject: Re: Patch to improve find_base_term ADDRESSOF handling
- From: John Wehle <john at feith dot com>
- Date: Fri, 8 Sep 2000 15:10:20 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org
>> (mem/f:SI (addressof:SI (reg/v:SI 45) 42 0x18470480) 6)
>>
>> don't alias because it doesn't know that the base term for the
>> address of a register is the stack pointer.
>
> Actually, don't you want to say that the base term for the addressof
> is itself? Since it's not even certain at this point that the register
> will be forced to memory, nothing should be able to alias it except
> direct references, no?
Perhaps, though I'm not looking to be that aggressive right now.
BTW, the current patch should probably read:
case ADDRESSOF:
return reg_base_value[STACK_POINTER_REGNUM];
instead of:
case ADDRESSOF:
return stack_pointer_rtx;
since alias.c has the following comment:
A base address can be an ADDRESS, SYMBOL_REF, or LABEL_REF. ADDRESS
expressions represent certain special values: function arguments and
the stack, frame, and argument pointers.
and stack_pointer_rtx is not an ADDRESS, SYMBOL_REF, or LABEL_REF.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------