From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: "Dragos Badea" Cc: gcc@gcc.gnu.org Subject: Re: instruction codes - novice questions Date: Wed, 29 Mar 2000 08:56:00 -0000 Message-id: <4518.954348448@upchuck> References: <001c01bf9976$c0b6cf60$3725558d@cs.pub.ro> X-SW-Source: 2000-03/msg00761.html In message < 001c01bf9976$c0b6cf60$3725558d@cs.pub.ro >you write: > > 1. Here it is part of after-flow-pass dump.=20 > > (insn 9 6 11 (set (reg:SI 22) > (mem/f:SI (plus:SI (reg:SI 6 %ebp) > (const_int -8 [0xfffffff8])) 0)) 48 {movsi+2} (nil) > (nil)) > > Could you tell me please, when were > 48 {movsi+2}=20 > fields added and which is their meaning (what is +2 ?). The insn matched pattern #48 in the backend. To find pattern #48 in the backend, first find the "movsi" pattern, then go forward two patterns (movsi+2) > 2.Are the instructions scheduled by sched.c in a 1-1 relation to asm = > output instructions (without taking into account the afterwards effect = > of peephole optimizations) ? The scheduler schedules insns; the relation of insns to assembly instructions depends entirely on how many assembly instructions are emitted by your patterns in the md file. ie, if each pattern in the md file emitted a single assembly instruction, then there would be a 1:1 relation, if each pattern emitted 5 assembly instructions then there would be a 1:5 relation. It all depends on how you write your machine description. We recommend you try to emit only a single instruction in each pattern in your md file. jeff