This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cxx-mem-model] bitfield tests



The memory model is not implementable on strict-alignment targets
that do not have a byte store operation.  But we previously said that ;)

Yes. I think we should issue an error when we have such a target and the user tries -fmemory-model=c++0x. However, how many strict-alignment targets are not byte addressable nowadays?


Also consider global vars

char a;
char b;

accessing them on strict-align targets may access adjacent globals
(that's a problem anyway, also with alias analysis).

Good point. I am adding a test to that effect (see attached patch).


BTW, I assume you mean strict-align targets WITHOUT byte-addressability as above. I have spot-checked your scenario on a handful of important targets that have strict alignment, and all of them work without touching adjacent global vars:

	arm-elf		OK
	sparc-linux	OK
	ia64-linux	OK
	alpha-linux	OK, but only with -mbwx (byte addressability)

rth tells me that we shouldn't worry about ancient non-byte addressable Alphas, so the last isn't an issue.

So... do you have any important targets in mind, because I don't see this being a problem for most targets? As can be expected, I am only interested in x86*, powerpc*, and s390, especially since a cursory glance on other important targets didn't exhibit any problems. However, given my target bias, I am willing to look into any important targets that are problematic (I'm hoping none :)).

Let me know if you see anything else, and please take a quick peek at the attached patch below, which I will be committing shortly.

As usual, thanks.
Aldy

Attachment: curr
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]