This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: code inefficiencies on 68k/coldfire



I'm in the midst of adding coldfire V4e instructions to 2.95.3, and
I'm seeing output of this type:

.stabn 68,0,483,.LM226-out_point
.LM226:
.LBB41:
	move.l %d5,%a3	| 600	cfv4_movsi/1
	move.l %a3,%d0	| 607	cfv4_movsi/1
	lsl.l #3,%d0	| 221	ashlsi3
	move.l %d0,%a3	| 610	cfv4_movsi/1

Note that this is equivalent to:

	move.l %d5,%d0
        lsl.l #3,%d0
        move.l %d0,%a3

Does anybody have an idea on how to convince gcc that its slow to move
from %d5 *through* %a3 to %d0 if the value in %a3 will be
clobbered(and yes, %a3 is used in as an address later on)????


Here's the relavent portion of bogus.c.lreg:

(note 217 216 218 ("bogus.c") 483)

(note 218 217 536 0 NOTE_INSN_BLOCK_BEG)

;; Start of basic block 18, registers live: 14 [%a6] 15 [%sp] 29 30 31 33
(note 536 218 600 [bb 18] NOTE_INSN_BASIC_BLOCK)

(insn 600 536 221 (set (reg/v:SI 74)
        (reg/v:SI 33)) 47 {cfv4_movsi} (nil)
    (nil))

(insn 221 600 223 (set (reg/v:SI 74)
        (ashift:SI (reg/v:SI 74)
            (const_int 3 [0x3]))) 303 {ashlsi3} (nil)
    (expr_list:REG_EQUAL (mult:SI (reg/v:SI 33)
            (const_int 8 [0x8]))
        (nil)))

(note 223 221 224 "" NOTE_INSN_DELETED)



And the relavent portion of bogus.c.greg:

(note 217 216 218 ("bogus.c") 483)

(note 218 217 536 0 NOTE_INSN_BLOCK_BEG)

;; Start of basic block 18, registers live: 14 [%a6] 15 [%sp] 29 30 31 33
(note 536 218 600 [bb 18] NOTE_INSN_BASIC_BLOCK)

(insn 600 536 607 (set (reg/v:SI 11 %a3)
        (reg/v:SI 5 %d5)) 47 {cfv4_movsi} (nil)
    (nil))

(insn 607 600 221 (set (reg:SI 0 %d0)
        (reg/v:SI 11 %a3)) 47 {cfv4_movsi} (nil)
    (nil))

(insn 221 607 610 (set (reg:SI 0 %d0)
        (ashift:SI (reg:SI 0 %d0)
            (const_int 3 [0x3]))) 303 {ashlsi3} (nil)
    (expr_list:REG_EQUAL (mult:SI (reg/v:SI 5 %d5)
            (const_int 8 [0x8]))
        (nil)))

(insn 610 221 223 (set (reg/v:SI 11 %a3)
        (reg:SI 0 %d0)) 47 {cfv4_movsi} (nil)
    (nil))

(note 223 610 224 "" NOTE_INSN_DELETED)

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]