blob: cad63189af3c93e261618dd14257990b89eab532 [file] [log] [blame]
Vladimir Markofb6db3f2016-07-21 12:59:46 +01001%default {"wide":"", "r1":"s1", "r2":"s2", "cond":"lt"}
Bill Buzbee3b0b4b92016-02-02 13:45:36 +00002 /*
3 * Compare two floating-point values. Puts 0, 1, or -1 into the
4 * destination register based on the results of the comparison.
5 */
6 /* op vAA, vBB, vCC */
7 FETCH w0, 1 // w0<- CCBB
8 lsr w4, wINST, #8 // w4<- AA
9 and w2, w0, #255 // w2<- BB
10 lsr w3, w0, #8 // w3<- CC
11 GET_VREG$wide $r1, w2
12 GET_VREG$wide $r2, w3
Bill Buzbee3b0b4b92016-02-02 13:45:36 +000013 fcmp $r1, $r2
Vladimir Markofb6db3f2016-07-21 12:59:46 +010014 cset w0, ne
15 cneg w0, w0, $cond
Bill Buzbee3b0b4b92016-02-02 13:45:36 +000016 FETCH_ADVANCE_INST 2 // advance rPC, load rINST
17 GET_INST_OPCODE ip // extract opcode from rINST
18 SET_VREG w0, w4 // vAA<- w0
19 GOTO_OPCODE ip // jump to next instruction