From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 10 Mar 2005 11:34:44 -0700 From: "Ronald G. Minnich" To: 9fans@cse.psu.edu Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [9fans] got it Topicbox-Message-UUID: 223d1d64-ead0-11e9-9d60-3106f5b1d025 an optimization is dumping onto another, it seems. on arm. ulong *x, y[64]; x = y; *x++ = 1; *x++ = 2; assembly gives: MOVW $y-260(SP),R3 MOVW $1, R2 MOVW.P R2, $4(R3) so the 260 puts you two words before the first element of Y, I'm guessing (otherwise it would be y-252, right? 63*4). Then it does a pre-increment and offset by 4, which puts you right at the first element of y. Which all fails badly if you're setting x to a constant, as in constant page table value in memory for startup. That's my reading anyway. I'm still unsure, all I know is the .s code looks wrong to me for the l.s changes I'm making. (I'm too lazy to write assembly, I try to have C compilers do it for me. Usually works. Maybe not this time.) ron