AnsweredAssumed Answered

LSP instructions still generated when MPC5643L does not support LSP APU

Question asked by bcmer on Jul 30, 2019
Latest reply on Aug 2, 2019 by Edmar Wienskoski



I'm seeing LSP instructions in my disassembly such as "zstdd", "zldd", "zvaddhss", but the MPC5643L does not support LSP, it only supports SPE. I have tried using the "-mno-lsp" flag and double checked all the include headers to make sure they are for the MPC5643L, but the LSP instructions are still generated. I've ran the debugger and it stops at "se_illegal" instruction. 



C code: 


(void) memset(var, 0, sizeof(minMax_S));


// where var is a pointer to a structure that contains float min and float max. 




(void) memset(var, 0, sizeof(minMax_S));
3a2f4: 10 c6 32 16 zvaddhss r6,r6,r6
3a2f8: 48 03 se_li r3,0
3a2fa: 70 e8 e0 00 e_lis r7,16384
3a2fe: 10 c1 13 21 zstdd r6,16(r1)
3a302: 10 c1 0b 21 zstdd r6,8(r1)
3a306: 01 34 se_mr r4,r3
3a308: 1c e7 32 8c e_add16i r7,r7,12940




-S32 v2.1 & v2017.R1






If I use the -mlsp flag, this is the following error I get, which matches the location of where the LSP instructions are generated without the -mlsp flag: 


X.c:3921:1: error: insn does not satisfy its constraints:



(insn/f 291 290 292 2 (set (mem/c:V2SI (plus:SI (reg/f:SI 1 %r1)

(const_int 24 [0x18])) [117 S8 A8])

(reg:V2SI 31 %r31)) X.c:3911 2475 {*movv2si_internal}

(expr_list:REG_DEAD (reg:V2SI 31 %r31)


X.c:3921:1: internal compiler error: in copyprop_hardreg_forward_1, at regcprop.c:775

Please submit a full bug report,

with preprocessed source if appropriate.

See <> for instructions.




If I use -fno-builtin-memset, the LSP instructions are not generated anymore. However, there are still other LSP instruction scattered in the disassembly for code that is not using memset.