Message ID | 534D9A6E.9090609@yahoo.com |
---|---|
State | New |
Headers | show |
I typically leave the mode off when the operand accepts a CONST_INT as I've had problems with patterns matching CONST_INTs otherwise, as CONST_INT rtx's do not have a mode (or have VOIDmode). (yes, I know gcc is supposed to accomodate that, but like I said, I've had problems...)
On 15/04/14 22:58, DJ Delorie wrote: > I typically leave the mode off when the operand accepts a CONST_INT as > I've had problems with patterns matching CONST_INTs otherwise, as > CONST_INT rtx's do not have a mode (or have VOIDmode). > > (yes, I know gcc is supposed to accomodate that, but like I said, I've > had problems...) Ok, that's fine. I was just trying to mop up one little bit of the sea of warnings. It seems a little inconsistent, however, that *movqi_real and *xorqi3_real don't specify modes but *movhi_real and *andqi_real/*iorqi_real do (and they also accept CONST_INTs). Not that I'm advocating generating more warnings, but my inner OCD likes consistency :) Richard.
> It seems a little inconsistent, however, that *movqi_real and > *xorqi3_real don't specify modes but *movhi_real and > *andqi_real/*iorqi_real do (and they also accept CONST_INTs). Not that > I'm advocating generating more warnings, but my inner OCD likes > consistency :) Adding the mode might be the right way, but I've seen cases where it wasn't. My paranoia supercedes my OCD ;-)
diff --git a/gcc/config/rl78/rl78-real.md b/gcc/config/rl78/rl78-real.md index 5d5c598..847a82d 100644 --- a/gcc/config/rl78/rl78-real.md +++ b/gcc/config/rl78/rl78-real.md @@ -45,7 +45,7 @@ (define_insn "*movqi_real" [(set (match_operand:QI 0 "nonimmediate_operand" "=g,RaxbcWab,RaxbcWab,a, bcx,R, WabWd2WhlWh1WhbWbcWs1v, bcx") - (match_operand 1 "general_operand" "0,K, M, RInt8sJvWabWdeWd2WhlWh1WhbWbcWs1,Wab,aInt8J,a, R"))] + (match_operand:QI 1 "general_operand" "0,K, M, RInt8sJvWabWdeWd2WhlWh1WhbWbcWs1,Wab,aInt8J,a, R"))] "rl78_real_insns_ok ()" "@ ; mov\t%0, %1 @@ -194,7 +194,7 @@ (define_insn "*xorqi3_real" [(set (match_operand:QI 0 "nonimmediate_operand" "=A,R,v") (xor:QI (match_operand:QI 1 "general_operand" "%0,0,0") - (match_operand 2 "general_operand" "iRvWabWhbWh1Whl,A,i"))) + (match_operand:QI 2 "general_operand" "iRvWabWhbWh1Whl,A,i"))) ] "rl78_real_insns_ok ()" "xor\t%0, %2" diff --git a/gcc/config/rl78/rl78-virt.md b/gcc/config/rl78/rl78-virt.md index 1db3751..189cf79 100644 --- a/gcc/config/rl78/rl78-virt.md +++ b/gcc/config/rl78/rl78-virt.md @@ -35,7 +35,7 @@ (define_insn "*movqi_virt" [(set (match_operand:QI 0 "nonimmediate_operand" "=vY,v,Wfr") - (match_operand 1 "general_operand" "vInt8JY,Wfr,vInt8J"))] + (match_operand:QI 1 "general_operand" "vInt8JY,Wfr,vInt8J"))] "rl78_virt_insns_ok ()" "v.mov %0, %1" [(set_attr "valloc" "op1")] @@ -126,7 +126,7 @@ (define_insn "*xor3_virt" [(set (match_operand:QI 0 "rl78_nonfar_nonimm_operand" "=v,vm,m") (xor:QI (match_operand:QI 1 "rl78_nonfar_operand" "%0,vm,vm") - (match_operand 2 "general_operand" "i,vm,vim"))) + (match_operand:QI 2 "general_operand" "i,vm,vim"))) ] "rl78_virt_insns_ok ()" "v.xor\t%0, %1, %2" diff --git a/gcc/config/rl78/rl78.md b/gcc/config/rl78/rl78.md index eb4c468..ede4eac 100644 --- a/gcc/config/rl78/rl78.md +++ b/gcc/config/rl78/rl78.md @@ -208,7 +208,7 @@ (define_expand "addsi3" [(set (match_operand:SI 0 "nonimmediate_operand" "=&vm") (plus:SI (match_operand:SI 1 "general_operand" "vim") - (match_operand 2 "general_operand" "vim"))) + (match_operand:SI 2 "general_operand" "vim"))) ] "" "emit_insn (gen_addsi3_internal_virt (operands[0], operands[1],