2006-08-22 20:22:46 +08:00
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
// Random ideas for the ARM backend.
|
|
|
|
//===---------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
Consider implementing a select with two conditional moves:
|
|
|
|
|
|
|
|
cmp x, y
|
|
|
|
moveq dst, a
|
|
|
|
movne dst, b
|
2006-09-22 19:36:17 +08:00
|
|
|
|
|
|
|
----------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
%tmp1 = shl int %b, ubyte %c
|
|
|
|
%tmp4 = add int %a, %tmp1
|
|
|
|
|
|
|
|
compiles to
|
|
|
|
|
|
|
|
add r0, r0, r1, lsl r2
|
|
|
|
|
|
|
|
but
|
|
|
|
|
|
|
|
%tmp1 = shl int %b, ubyte %c
|
|
|
|
%tmp4 = add int %tmp1, %a
|
|
|
|
|
|
|
|
compiles to
|
|
|
|
mov r1, r1, lsl r2
|
|
|
|
add r0, r1, r0
|
|
|
|
|
|
|
|
----------------------------------------------------------
|
2006-10-04 01:27:58 +08:00
|
|
|
|
2006-10-07 22:03:39 +08:00
|
|
|
add an offset to FLDS/FLDD addressing mode
|
2006-10-04 01:27:58 +08:00
|
|
|
|
|
|
|
----------------------------------------------------------
|