Revision f3f478a7
b/tcg/ppc/tcg-target.c | ||
---|---|---|
866 | 866 |
int imm; |
867 | 867 |
uint32_t op; |
868 | 868 |
|
869 |
imm = const_arg2 ? ((int16_t) arg2 == arg2) : 0; |
|
870 | 869 |
switch (cond) { |
871 |
case TCG_COND_EQ: op = imm ? CMPLI : CMPL; break; |
|
872 |
case TCG_COND_NE: op = imm ? CMPLI : CMPL; break; |
|
873 |
case TCG_COND_LT: op = imm ? CMPI : CMP; break; |
|
874 |
case TCG_COND_GE: op = imm ? CMPI : CMP; break; |
|
875 |
case TCG_COND_LE: op = imm ? CMPI : CMP; break; |
|
876 |
case TCG_COND_GT: op = imm ? CMPI : CMP; break; |
|
877 |
case TCG_COND_LTU: op = imm ? CMPLI : CMPL; break; |
|
878 |
case TCG_COND_GEU: op = imm ? CMPLI : CMPL; break; |
|
879 |
case TCG_COND_LEU: op = imm ? CMPLI : CMPL; break; |
|
880 |
case TCG_COND_GTU: op = imm ? CMPLI : CMPL; break; |
|
870 |
case TCG_COND_EQ: |
|
871 |
case TCG_COND_NE: |
|
872 |
if (const_arg2) { |
|
873 |
if ((int16_t) arg2 == arg2) { |
|
874 |
op = CMPI; |
|
875 |
imm = 1; |
|
876 |
break; |
|
877 |
} |
|
878 |
else if ((uint16_t) arg2 == arg2) { |
|
879 |
op = CMPLI; |
|
880 |
imm = 1; |
|
881 |
break; |
|
882 |
} |
|
883 |
} |
|
884 |
op = CMPL; |
|
885 |
imm = 0; |
|
886 |
break; |
|
887 |
|
|
888 |
case TCG_COND_LT: |
|
889 |
case TCG_COND_GE: |
|
890 |
case TCG_COND_LE: |
|
891 |
case TCG_COND_GT: |
|
892 |
if (const_arg2) { |
|
893 |
if ((int16_t) arg2 == arg2) { |
|
894 |
op = CMPI; |
|
895 |
imm = 1; |
|
896 |
break; |
|
897 |
} |
|
898 |
} |
|
899 |
op = CMP; |
|
900 |
imm = 0; |
|
901 |
break; |
|
902 |
|
|
903 |
case TCG_COND_LTU: |
|
904 |
case TCG_COND_GEU: |
|
905 |
case TCG_COND_LEU: |
|
906 |
case TCG_COND_GTU: |
|
907 |
if (const_arg2) { |
|
908 |
if ((uint16_t) arg2 == arg2) { |
|
909 |
op = CMPLI; |
|
910 |
imm = 1; |
|
911 |
break; |
|
912 |
} |
|
913 |
} |
|
914 |
op = CMPL; |
|
915 |
imm = 0; |
|
916 |
break; |
|
917 |
|
|
881 | 918 |
default: |
882 | 919 |
tcg_abort (); |
883 | 920 |
} |
Also available in: Unified diff