[amd64] Some constant folding in F_POS_INT_INDEX.
[amd64] Reorder the arguments to cmp_reg_reg().

cmp_reg_reg() now compares its arguments in
the same order as the cmp_reg*_imm() variants.

Fixes F_POP_TO_MARK.

Probably fixes index overruns in F_INDEX and F_LOCAL_INDEX.