8123 ins_encode( form3_g0_rs2_rd_move( src, dst ), enc_convP2B( dst, src ) ); |
8123 ins_encode( form3_g0_rs2_rd_move( src, dst ), enc_convP2B( dst, src ) ); |
8124 ins_pipe(ialu_clr_and_mover); |
8124 ins_pipe(ialu_clr_and_mover); |
8125 %} |
8125 %} |
8126 #endif |
8126 #endif |
8127 |
8127 |
|
8128 instruct cmpLTMask0( iRegI dst, iRegI src, immI0 zero, flagsReg ccr ) %{ |
|
8129 match(Set dst (CmpLTMask src zero)); |
|
8130 effect(KILL ccr); |
|
8131 size(4); |
|
8132 format %{ "SRA $src,#31,$dst\t# cmpLTMask0" %} |
|
8133 ins_encode %{ |
|
8134 __ sra($src$$Register, 31, $dst$$Register); |
|
8135 %} |
|
8136 ins_pipe(ialu_reg_imm); |
|
8137 %} |
|
8138 |
8128 instruct cmpLTMask_reg_reg( iRegI dst, iRegI p, iRegI q, flagsReg ccr ) %{ |
8139 instruct cmpLTMask_reg_reg( iRegI dst, iRegI p, iRegI q, flagsReg ccr ) %{ |
8129 match(Set dst (CmpLTMask p q)); |
8140 match(Set dst (CmpLTMask p q)); |
8130 effect( KILL ccr ); |
8141 effect( KILL ccr ); |
8131 ins_cost(DEFAULT_COST*4); |
8142 ins_cost(DEFAULT_COST*4); |
8132 format %{ "CMP $p,$q\n\t" |
8143 format %{ "CMP $p,$q\n\t" |
8142 effect(KILL ccr, TEMP tmp); |
8153 effect(KILL ccr, TEMP tmp); |
8143 ins_cost(DEFAULT_COST*3); |
8154 ins_cost(DEFAULT_COST*3); |
8144 |
8155 |
8145 format %{ "SUBcc $p,$q,$p\t! p' = p-q\n\t" |
8156 format %{ "SUBcc $p,$q,$p\t! p' = p-q\n\t" |
8146 "ADD $p,$y,$tmp\t! g3=p-q+y\n\t" |
8157 "ADD $p,$y,$tmp\t! g3=p-q+y\n\t" |
8147 "MOVl $tmp,$p\t! p' < 0 ? p'+y : p'" %} |
8158 "MOVlt $tmp,$p\t! p' < 0 ? p'+y : p'" %} |
8148 ins_encode( enc_cadd_cmpLTMask(p, q, y, tmp) ); |
|
8149 ins_pipe( cadd_cmpltmask ); |
|
8150 %} |
|
8151 |
|
8152 instruct cadd_cmpLTMask2( iRegI p, iRegI q, iRegI y, iRegI tmp, flagsReg ccr ) %{ |
|
8153 match(Set p (AddI (SubI p q) (AndI (CmpLTMask p q) y))); |
|
8154 effect( KILL ccr, TEMP tmp); |
|
8155 ins_cost(DEFAULT_COST*3); |
|
8156 |
|
8157 format %{ "SUBcc $p,$q,$p\t! p' = p-q\n\t" |
|
8158 "ADD $p,$y,$tmp\t! g3=p-q+y\n\t" |
|
8159 "MOVl $tmp,$p\t! p' < 0 ? p'+y : p'" %} |
|
8160 ins_encode( enc_cadd_cmpLTMask(p, q, y, tmp) ); |
8159 ins_encode( enc_cadd_cmpLTMask(p, q, y, tmp) ); |
8161 ins_pipe( cadd_cmpltmask ); |
8160 ins_pipe( cadd_cmpltmask ); |
8162 %} |
8161 %} |
8163 |
8162 |
8164 //----------Arithmetic Conversion Instructions--------------------------------- |
8163 //----------Arithmetic Conversion Instructions--------------------------------- |