diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2006-08-09 16:38:45 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2006-08-09 16:38:45 +0000 |
commit | cef6b86c004ea1b65ca4178e569c388fb07a347e (patch) | |
tree | cbfcedff7be2fe615e69736cecd53aaf551a0dd8 /gcc | |
parent | 9e7ef3a8817b56393718469bc2f82d7855f684a3 (diff) | |
download | gcc-cef6b86c004ea1b65ca4178e569c388fb07a347e.zip gcc-cef6b86c004ea1b65ca4178e569c388fb07a347e.tar.gz gcc-cef6b86c004ea1b65ca4178e569c388fb07a347e.tar.bz2 |
rs6000.c (print_operand): Fix comment and adjust.
* config/rs6000/rs6000.c (print_operand) <D>: Fix comment and adjust.
(rs6000_generate_compare): Tweak comments.
* config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Fix comment.
From-SVN: r116041
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 15 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 2 |
3 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b0119e1..c6d24dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-08-09 Eric Botcazou <ebotcazou@adacore.com> + + * config/rs6000/rs6000.c (print_operand) <D>: Fix comment and adjust. + (rs6000_generate_compare): Tweak comments. + * config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Fix comment. + 2006-08-09 Alexandre Oliva <aoliva@redhat.com> * var-tracking.c (enum micro_operation_type): Add MO_COPY. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 676f964..47734a4 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -10283,13 +10283,14 @@ print_operand (FILE *file, rtx x, int code) return; case 'D': - /* Like 'J' but get to the EQ bit. */ + /* Like 'J' but get to the GT bit only. */ gcc_assert (GET_CODE (x) == REG); - /* Bit 1 is EQ bit. */ - i = 4 * (REGNO (x) - CR0_REGNO) + 2; + /* Bit 1 is GT bit. */ + i = 4 * (REGNO (x) - CR0_REGNO) + 1; - fprintf (file, "%d", i); + /* Add one for shift count in rlinm for scc. */ + fprintf (file, "%d", i + 1); return; case 'E': @@ -11086,7 +11087,7 @@ rs6000_generate_compare (enum rtx_code code) /* First, the compare. */ compare_result = gen_reg_rtx (comp_mode); - /* SPE FP compare instructions on the GPRs. Yuck! */ + /* E500 FP compare instructions on the GPRs. Yuck! */ if ((TARGET_E500 && !TARGET_FPRS && TARGET_HARD_FLOAT) && rs6000_compare_fp_p) { @@ -11096,8 +11097,8 @@ rs6000_generate_compare (enum rtx_code code) if (op_mode == VOIDmode) op_mode = GET_MODE (rs6000_compare_op1); - /* Note: The E500 comparison instructions set the GT bit (x + - 1), on success. This explains the mess. */ + /* The E500 FP compare instructions toggle the GT bit (CR bit 1) only. + This explains the following mess. */ switch (code) { diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 611d9e1..92590a7 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -55,7 +55,7 @@ (UNSPEC_TLSGOTTPREL 28) (UNSPEC_TLSTLS 29) (UNSPEC_FIX_TRUNC_TF 30) ; fadd, rounding towards zero - (UNSPEC_MV_CR_GT 31) ; move_from_CR_eq_bit + (UNSPEC_MV_CR_GT 31) ; move_from_CR_gt_bit (UNSPEC_STFIWX 32) (UNSPEC_POPCNTB 33) (UNSPEC_FRES 34) |