From 69a8af43607b00f63fdc84cc1d267eea4c4dc39e Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 2 Apr 1999 12:44:02 +0200 Subject: [PATCH] i386.c (print_operand_address, case REG): Do not use ESI addressing mode for the K6. * i386.c (print_operand_address, case REG): Do not use ESI addressing mode for the K6. * i386.c (print_operand_address, case MULT): Use more efficient encoding (mult (reg) (const_int 2)). From-SVN: r26116 --- gcc/ChangeLog | 8 ++++++++ gcc/config/i386/i386.c | 17 +++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cf03778d8df..af1042da6df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Fri Apr 2 11:36:12 1999 Jan Hubicka (hubicka@paru.cas.cz) + + * i386.c (print_operand_address, case REG): Do not use ESI addressing + mode for the K6. + + * i386.c (print_operand_address, case MULT): Use more efficient + encoding (mult (reg) (const_int 2)). + Thu Apr 1 17:01:50 1999 Richard Henderson Move over patch from Bernd Schmidt from GC branch: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e288a15b3cf..7a3c332ac0c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3772,6 +3772,11 @@ print_operand_address (file, addr) switch (GET_CODE (addr)) { case REG: + /* ESI addressing makes instruction vector decoded on the K6. We can + avoid this by ESI+0 addressing. */ + if (REGNO_REG_CLASS (REGNO (addr)) == SIREG + && ix86_cpu == PROCESSOR_K6 && !optimize_size) + output_addr_const (file, const0_rtx); ADDR_BEG (file); fprintf (file, "%se", RP); fputs (hi_reg_name[REGNO (addr)], file); @@ -3887,8 +3892,16 @@ print_operand_address (file, addr) ireg = XEXP (addr, 0); } - output_addr_const (file, const0_rtx); - PRINT_B_I_S (NULL_RTX, ireg, scale, file); + /* (reg,reg,) is shorter than (,reg,2). */ + if(scale == 2) + { + PRINT_B_I_S (ireg, ireg, 1, file); + } + else + { + output_addr_const (file, const0_rtx); + PRINT_B_I_S (NULL_RTX, ireg, scale, file); + } } break; -- 2.30.2