staticchar*tst_cc_loc=NULL;#definecris_tst_cc_init()\do{tst_cc_loc="test_cc failed at "CURRENT_LOCATION;}while(0)/* We need a real symbol to signal error. */staticvoid_err(void){if(!tst_cc_loc)tst_cc_loc="tst_cc_failed\n";_fail(tst_cc_loc);}externinlinevoidcris_tst_cc_n1(void){asmvolatile("bpl _err\n""nop\n");}externinlinevoidcris_tst_cc_n0(void){asmvolatile("bmi _err\n""nop\n");}externinlinevoidcris_tst_cc_z1(void){asmvolatile("bne _err\n""nop\n");}externinlinevoidcris_tst_cc_z0(void){asmvolatile("beq _err\n""nop\n");}externinlinevoidcris_tst_cc_v1(void){asmvolatile("bvc _err\n""nop\n");}externinlinevoidcris_tst_cc_v0(void){asmvolatile("bvs _err\n""nop\n");}externinlinevoidcris_tst_cc_c1(void){asmvolatile("bcc _err\n""nop\n");}externinlinevoidcris_tst_cc_c0(void){asmvolatile("bcs _err\n""nop\n");}externinlinevoidcris_tst_mov_cc(intn,intz){if(n)cris_tst_cc_n1();elsecris_tst_cc_n0();if(z)cris_tst_cc_z1();elsecris_tst_cc_z0();asmvolatile(""::"g"(_err));}externinlinevoidcris_tst_cc(constintn,constintz,constintv,constintc){if(n)cris_tst_cc_n1();elsecris_tst_cc_n0();if(z)cris_tst_cc_z1();elsecris_tst_cc_z0();if(v)cris_tst_cc_v1();elsecris_tst_cc_v0();if(c)cris_tst_cc_c1();elsecris_tst_cc_c0();asmvolatile(""::"g"(_err));}