"SHANE MILLER, BLOOMBERG/ 731 LEXIN" <smille...@bloomberg.net> writes:
> Hi, I compile .c files using both gcc.3.4.6 and gcc-4.3.2 chaining to Sun's > assembler "Sun Compiler Common 10 Patch 09/04/2007" in both cases: > > gcc -O3 -D_SOLARIS -D_SPARC -Wall -Wa,-xarch=v8plus -fexceptions -c ... > How can I turn pseudo assembler instructions off and/or what switch can I add > to the gcc line to make this BUS error go away? Either the assembler is wrong > and/or gcc aligned a variable on the wrong boundary. Details follow. > stx %g0, [%i0+56] <- BUS ERROR HERE. 8 byte operation > mov %i1, %o0 on memory on a non-8 byte boundary > Contrast with the 3.4.6 output: > mov 0, %o4 <- no stx: this works > mov 0, %o5 This message is inappropriate for the gcc@gcc.gnu.org mailing list, which is for gcc development. It would be appropriate for the gcc-h...@gcc.gnu.org mailing list. Please take any followups to gcc-help. Thanks. gcc will only use the stx instruction when it believes that the input is 8 byte aligned. So either gcc is confused or your code is incorrect. It's hard to say anything else without seeing some of your code. A possibly relevant command line option is -mno-unaligned-doubles, q.v. I note that you are using -Wa,-xarch=v8plus. I don't know too much about SPARC, but: why are you only passing the option to the assembler? Is there any reason that you are not simply using -mv8plus? Also, how is your gcc configured? Ian