This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Volatile Memory accesses in Branch Delay Slots
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jakob Wenzel <wenzel at rs dot tu-darmstadt dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 25 Jul 2017 12:24:53 +0200
- Subject: Re: Volatile Memory accesses in Branch Delay Slots
- Authentication-results: sourceware.org; auth=none
- References: <fcf6729c-525f-7245-1871-79ec900a6ff1@rs.tu-darmstadt.de>
> The function responsible for this behavior seems to be
> resource_conflicts_p in reorg.c. Sadly, I could not find any comments
> explaining why volatile accesses cannot be put into delay slots.
>
> What is the reason for this behavior? I am unable to think of any
> situation where allowing volatile memory accesses in branch delay slots
> leads to problems. Am I missing a case? Or are negative effects limited
> to other architectures?
Delay slot filling is a code movement optimization and such optimizations are
not valid for volatile memory accesses in the general case.
--
Eric Botcazou