- if(ifx && !AOP_SIZE(result)){
- symbol *tlbl;
- /* if they are both bit variables */
- if (AOP_TYPE(left) == AOP_CRY &&
- ((AOP_TYPE(right) == AOP_CRY) || (AOP_TYPE(right) == AOP_LIT))) {
- if(AOP_TYPE(right) == AOP_LIT){
- unsigned long lit = (unsigned long)floatFromVal(AOP(IC_RIGHT(ic))->aopu.aop_lit);
- if(lit == 0L){
- emitcode("mov","c,%s",AOP(left)->aopu.aop_dir);
- emitcode("cpl","c");
- } else if(lit == 1L) {
- emitcode("mov","c,%s",AOP(left)->aopu.aop_dir);
- } else {
- emitcode("clr","c");
- }
- /* AOP_TYPE(right) == AOP_CRY */
- } else {
- symbol *lbl = newiTempLabel(NULL);
- emitcode("mov","c,%s",AOP(left)->aopu.aop_dir);
- emitcode("jb","%s,%05d$",AOP(right)->aopu.aop_dir,(lbl->key+100));
- emitcode("cpl","c");
- emitcode("","%05d$:",(lbl->key+100));
- }
- /* if true label then we jump if condition
- supplied is true */
- tlbl = newiTempLabel(NULL);
- if ( IC_TRUE(ifx) ) {
- emitcode("jnc","%05d$",tlbl->key+100);
- emitcode("ljmp","%05d$",IC_TRUE(ifx)->key+100);
- } else {
- emitcode("jc","%05d$",tlbl->key+100);
- emitcode("ljmp","%05d$",IC_FALSE(ifx)->key+100);
- }
- emitcode("","%05d$:",tlbl->key+100);
- } else {
- tlbl = newiTempLabel(NULL);
- gencjneshort(left, right, tlbl);
- if ( IC_TRUE(ifx) ) {
- emitcode("ljmp","%05d$",IC_TRUE(ifx)->key+100);
- emitcode("","%05d$:",tlbl->key+100);
- } else {
- symbol *lbl = newiTempLabel(NULL);
- emitcode("sjmp","%05d$",lbl->key+100);
- emitcode("","%05d$:",tlbl->key+100);
- emitcode("ljmp","%05d$",IC_FALSE(ifx)->key+100);
- emitcode("","%05d$:",lbl->key+100);
- }
- }
- /* mark the icode as generated */
- ifx->generated = 1;
- goto release ;
- }
-
- /* if they are both bit variables */
- if (AOP_TYPE(left) == AOP_CRY &&
- ((AOP_TYPE(right) == AOP_CRY) || (AOP_TYPE(right) == AOP_LIT))) {
- if(AOP_TYPE(right) == AOP_LIT){
- unsigned long lit = (unsigned long)floatFromVal(AOP(IC_RIGHT(ic))->aopu.aop_lit);
- if(lit == 0L){
- emitcode("mov","c,%s",AOP(left)->aopu.aop_dir);
- emitcode("cpl","c");
- } else if(lit == 1L) {
- emitcode("mov","c,%s",AOP(left)->aopu.aop_dir);
- } else {
- emitcode("clr","c");
- }
- /* AOP_TYPE(right) == AOP_CRY */
- } else {
- symbol *lbl = newiTempLabel(NULL);
- emitcode("mov","c,%s",AOP(left)->aopu.aop_dir);
- emitcode("jb","%s,%05d$",AOP(right)->aopu.aop_dir,(lbl->key+100));
- emitcode("cpl","c");
- emitcode("","%05d$:",(lbl->key+100));
- }
- /* c = 1 if egal */
- if (AOP_TYPE(result) == AOP_CRY && AOP_SIZE(result)){
- outBitC(result);
- goto release ;
- }
- if (ifx) {
- genIfxJump (ifx,"c");
- goto release ;
- }
- /* if the result is used in an arithmetic operation
- then put the result in place */
- outBitC(result);
- } else {
- gencjne(left,right,newiTempLabel(NULL));
- if (AOP_TYPE(result) == AOP_CRY && AOP_SIZE(result)) {
- aopPut(AOP(result),"a",0);
- goto release ;
- }
- if (ifx) {
- genIfxJump (ifx,"a");
- goto release ;
- }
- /* if the result is used in an arithmetic operation
- then put the result in place */
- if (AOP_TYPE(result) != AOP_CRY)
- outAcc(result);
- /* leave the result in acc */
- }