On Wed, 18 May 2005 14:17:59 -0700, Richard Henderson wrote > On Thu, May 19, 2005 at 04:58:32AM +0800, Ling-hua Tseng wrote: > > I got 4 lines "SI". > > (In the ARM's iWMMXt V8QI testing, I got the message: "V8QI") > > Then you need to debug your targetm.vector_mode_supported_p. > > Starting around stor-layout.c line 1609: > > for (; mode != VOIDmode ; mode = GET_MODE_WIDER_MODE > (mode)) if (GET_MODE_NUNITS (mode) == nunits > && GET_MODE_INNER (mode) == innermode && > targetm.vector_mode_supported_p (mode)) break; > > /* For integers, try mapping it to a same-sized scalar > mode. */ if (mode == VOIDmode && > GET_MODE_CLASS (innermode) == MODE_INT) mode = > mode_for_size (nunits * GET_MODE_BITSIZE (innermode), > MODE_INT, 0); > > The compiler has passed through the first loop without finding > a supported vector mode that matches nunits=4 && inner=QImode. > > r~ The targetm.vector_mode_supported_p is pointed to the genernal hook "hook_bool_mode_false". But I have already put the following lines in my <target>.c: ===================================[top]==================================== ... #include "target-def.h" ... static bool unicore_vector_mode_supported_p(enum machine_mode mode); ... struct gcc_target targetm = TARGET_INITIALIZER; ... #undef TARGET_VECTOR_MODE_SUPPORTED_P #define TARGET_VECTOR_MODE_SUPPORTED_P unicore_vector_mode_supported_p ... static bool unicore_vector_mode_supported_p(enum machine_mode mode) { switch(mode) { case V4QImode: case V2HImode: return true; default: return false; } } ... ===================================[end]====================================
Doesn't it enough to let the targetm.vector_mode_supported_p to be pointed to my unicore_vector_mode_supported_p() ?