On 3/27/15 08:05, Chen Gang wrote: > For misalignment memory access, c6x gcc will cause issue, so need remove > "clobber (match_scratch ...)" which will be symmetric with "movmisalign > <mode>_load", then pass compiling and generate correct assembly code. > > The related issue: > > [root@localhost c6x]# cat test.i > int oxu_driver_init(void) > { > *(volatile unsigned int *)(-1) = *(unsigned int *)(-1);
Oh, sorry, I use 11 instead of -1 for generating the assembly code (-1 and 11 lead the same result). [...] > oxu_driver_init: > mvk .d1 11, A4 > ldnw .d1t1 *A4, A3 > nop 4 > stnw .d1t1 A3, *A4 > ret .s2 B3 > nop 5 > .size oxu_driver_init, .-oxu_driver_init > .ident "GCC: (GNU) 5.0.0 20150321 (experimental)" > [...] Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed