Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#40 Modified BURS to better handle a special case of COND_MOV

closed
Dave Grove
None
5
2012-09-21
2006-03-23
G. Kolpin
No

Modified BURS to better handle the special case of a
conditional move instruction where the true and false
values are integers and differ by one. Previously, the
code generated used the following to place either
value into result: result = ((cond ? 0 : -1) &
(false_const - true_const)) + true_const .

In the special case where true_const - false_const ==
1, we can optimize slightly so that result = (cond ? 1
: 0) + false_const .

When false_const - true_const == 1, we first must
negate the conditional result: result = (cond ? -1 : 0)
+ false_const .

STATEMENT OF ORIGIN FOR A SINGLE CONTRIBUTOR

I, Garrett Kolpin:

(a) represent that either:

(i) I am the only author and owner of the contributed
software
(described as/entitled Modified BURS to handle
special case for a conditional move instruction
),
which was neither derived nor copied from any
other software,
or

(ii) that any exception to (i) is software which was
obtained under the
CPL (Common Public License),

and

(b) hereby agree to license this contributed software
under the CPL.

Discussion

  • G. Kolpin
    G. Kolpin
    2006-03-23

    Unifed output format

     
  • G. Kolpin
    G. Kolpin
    2006-03-23

    To be used with ed

     
  • Ian Rogers
    Ian Rogers
    2006-03-23

    Logged In: YES
    user_id=308843

    The patch looks good to me (although I'm not sure if its
    against the current CVS head). The patch saves one AND in
    the case where the conditional move arguments are both
    integer and differ by 1. This special case wasn't documented
    in the Intel or AMD optimzination manual where I lifted this
    optimization of conditional move from. Well done Garrett for
    spotting this!

    Regards, Ian Rogers