On 10/21/2015 05:12 PM, Sandra Loosemore wrote:
On 10/20/2015 03:27 PM, Richard Henderson wrote:
+@deftypefn {Target Hook} bool TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID
(addr_space_t @var{as})
+Define this to modify the default handling of address 0 for the
+address space. Return true if 0 should be considered a valid address.
+@end deftypefn
+
I'm confused by this new hook. How does it interact with
-fdelete-null-pointer-checks?
It's kind of like -fdelete-null-pointer-checks on a per-address-space basis.
E.g. nios2-elf defaults
flag_delete_null_pointer_checks to 0 precisely because address 0 is
legitimate on that target. The avr and cr16 backends simply override
flag_delete_null_pointer_checks. Do backends that already frob one thing
need to frob the other as well?
No. All three of these targets have address 0 valid in the generic address
space, so there it might be best to leave things as-is.
Are there any changes to the user documentation for
-fdelete-null-pointer-checks required?
I shouldn't think so.
r~